aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-01-13 22:59:20 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-01-13 23:00:14 -0500
commit348e1a75c87d13a0c87c6cc58b82bf9746e7eb9c (patch)
tree8e0a9f37c37094b67cf863143367be04b9d80d11
parenteff59f97ac63dd723b6932e7c6e2186735315401 (diff)
downloadjquery-348e1a75c87d13a0c87c6cc58b82bf9746e7eb9c.tar.gz
jquery-348e1a75c87d13a0c87c6cc58b82bf9746e7eb9c.zip
de486684 with moar guard for IE6
(cherry picked from commit 6c29dd24e9786dfd61cdfdb5d21ffcb5694e25ea)
-rw-r--r--test/unit/event.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index bc98f73cb..6984b4945 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -1234,7 +1234,7 @@ test(".trigger() doesn't bubble load event (#10717)", function() {
test("Delegated events in SVG (#10791; #13180)", function() {
expect(2);
- var instanceRoot, e,
+ var useElem, e,
svg = jQuery(
"<svg height='1' version='1.1' width='1' xmlns='http://www.w3.org/2000/svg'>" +
"<defs><rect id='ref' x='10' y='20' width='100' height='60' r='10' rx='10' ry='10'></rect></defs>" +
@@ -1258,11 +1258,11 @@ test("Delegated events in SVG (#10791; #13180)", function() {
// Fire a native click on an SVGElementInstance (the instance tree of an SVG <use>)
// to confirm that it doesn't break our event delegation handling (#13180)
- instanceRoot = svg.find("#use")[0].instanceRoot;
- if ( instanceRoot && document.createEvent ) {
+ useElem = svg.find("#use")[0];
+ if ( document.createEvent && useElem && useElem.instanceRoot ) {
e = document.createEvent("MouseEvents");
e.initEvent( "click", true, true );
- instanceRoot.dispatchEvent( e );
+ useElem.instanceRoot.dispatchEvent( e );
}
jQuery("#qunit-fixture").off("click");