aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/support.js
blob: 1912b8430bc7a0e163fdc3dc75960cb2ab54efd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
define([
	"../var/support"
], function( support ) {

(function () {
	var i, eventName,
		div = document.createElement("div" );

	// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
	// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
	for ( i in { submit: true, change: true, focusin: true }) {
		div.setAttribute( eventName = "on" + i, "t" );

		support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
	}

	// Null elements to avoid leaks in IE.
	div = null;
})();

return support;

});