aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2013-09-02 19:21:09 +0200
committerMichał Gołębiowski <m.goleb@gmail.com>2013-09-06 03:40:49 +0200
commitbadcd1b6f301e6253405f17759c1270549a34e12 (patch)
tree85c41bdda0cfcfa7a12b3a4d5bb5022e6a06684d /src/event
parent9035cab8c8574404c9eaeb795d0d87f4df772d45 (diff)
downloadjquery-badcd1b6f301e6253405f17759c1270549a34e12.tar.gz
jquery-badcd1b6f301e6253405f17759c1270549a34e12.zip
Fix #10814. Fix #14084. Make support tests lazy and broken out to components.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/support.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/event/support.js b/src/event/support.js
new file mode 100644
index 000000000..1912b8430
--- /dev/null
+++ b/src/event/support.js
@@ -0,0 +1,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;
+
+});