Commit 2279097 1 parent 2089cff commit 2279097 Copy full SHA for 2279097
File tree 1 file changed +5
-2
lines changed
html/webappapis/dynamic-markup-insertion/opening-the-input-stream
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,18 @@ test(t => {
59
59
frame . contentDocument . close ( ) ;
60
60
} , "IDL attribute event handlers are to be deactivated" ) ;
61
61
62
+ var thrower ;
63
+
62
64
test ( t => {
63
65
const frame = document . body . appendChild ( document . createElement ( "iframe" ) ) ,
64
66
body = frame . contentDocument . body ;
65
67
t . add_cleanup ( ( ) => frame . remove ( ) ) ;
66
68
const div = body . appendChild ( frame . contentDocument . createElement ( "div" ) ) ;
67
- div . setAttribute ( "onclick" , "throw new Error('element event listener not removed')" ) ;
69
+ thrower = t . step_func ( ( ) => { throw new Error ( 'element event listener not removed' ) ; } ) ;
70
+ div . setAttribute ( "onclick" , "parent.thrower()" ) ;
68
71
assert_not_equals ( div . onclick , null ) ;
69
72
frame . contentDocument . open ( ) ;
70
- assert_equals ( div . getAttribute ( "onclick" ) , "throw new Error('element event listener not removed' )" ) ;
73
+ assert_equals ( div . getAttribute ( "onclick" ) , "parent.thrower( )" ) ;
71
74
assert_equals ( div . onclick , null ) ;
72
75
const e = frame . contentDocument . createEvent ( "mouseevents" )
73
76
e . initEvent ( "click" , false , false ) ;
You can’t perform that action at this time.
0 commit comments