krafthaus/bauhaus

View on GitHub
bower_components/jquery/src/event/support.js

Summary

Maintainability
B
5 hrs
Test Coverage
define([
    "../var/support"
], function( support ) {

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

    // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)
    for ( i in { submit: true, change: true, focusin: true }) {
        eventName = "on" + i;

        if ( !(support[ i + "Bubbles" ] = eventName in window) ) {
            // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
            div.setAttribute( eventName, "t" );
            support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;
        }
    }

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

return support;

});