mirror of
https://github.com/jquery/jquery.git
synced 2026-02-02 13:25:03 -05:00
Fixes gh-2133
Fixes gh-2501
Closes gh-2504
Refs gh-1950
Refs gh-1949
Refs gh-2397
Refs gh-1537
Refs gh-2504
Refs 842958e7ae
28 lines
652 B
JavaScript
28 lines
652 B
JavaScript
define([
|
|
"../var/document",
|
|
"../var/support"
|
|
], function( document, support ) {
|
|
|
|
(function() {
|
|
var i, eventName,
|
|
div = document.createElement( "div" );
|
|
|
|
// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)
|
|
for ( i in { submit: true, change: true, focusin: true }) {
|
|
eventName = "on" + i;
|
|
|
|
if ( !(support[ i ] = eventName in window) ) {
|
|
// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
|
|
div.setAttribute( eventName, "t" );
|
|
support[ i ] = div.attributes[ eventName ].expando === false;
|
|
}
|
|
}
|
|
|
|
// Null elements to avoid leaks in IE.
|
|
div = null;
|
|
})();
|
|
|
|
return support;
|
|
|
|
});
|