File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1234,7 +1234,7 @@ test(".trigger() doesn't bubble load event (#10717)", function() {
1234
1234
test ( "Delegated events in SVG (#10791; #13180)" , function ( ) {
1235
1235
expect ( 2 ) ;
1236
1236
1237
- var instanceRoot , e ,
1237
+ var useElem , e ,
1238
1238
svg = jQuery (
1239
1239
"<svg height='1' version='1.1' width='1' xmlns='http://www.w3.org/2000/svg'>" +
1240
1240
"<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() {
1258
1258
1259
1259
// Fire a native click on an SVGElementInstance (the instance tree of an SVG <use>)
1260
1260
// to confirm that it doesn't break our event delegation handling (#13180)
1261
- instanceRoot = svg . find ( "#use" ) [ 0 ] . instanceRoot ;
1262
- if ( instanceRoot && document . createEvent ) {
1261
+ useElem = svg . find ( "#use" ) [ 0 ] ;
1262
+ if ( document . createEvent && useElem && useElem . instanceRoot ) {
1263
1263
e = document . createEvent ( "MouseEvents" ) ;
1264
1264
e . initEvent ( "click" , true , true ) ;
1265
- instanceRoot . dispatchEvent ( e ) ;
1265
+ useElem . instanceRoot . dispatchEvent ( e ) ;
1266
1266
}
1267
1267
1268
1268
jQuery ( "#qunit-fixture" ) . off ( "click" ) ;
You can’t perform that action at this time.
0 commit comments