diff options
Diffstat (limited to 'test/data/testinit.js')
-rw-r--r-- | test/data/testinit.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/data/testinit.js b/test/data/testinit.js index baf758205..aafe2902c 100644 --- a/test/data/testinit.js +++ b/test/data/testinit.js @@ -144,16 +144,12 @@ this.createXMLFragment = function() { return frag; }; -window.fireNative = document.createEvent ? - function( node, type ) { - var event = document.createEvent( "HTMLEvents" ); - - event.initEvent( type, true, true ); - node.dispatchEvent( event ); - } : - function( node, type ) { - node.fireEvent( "on" + type, document.createEventObject() ); - }; +window.fireNative = function( node, type ) { + var event = document.createEvent( "HTMLEvents" ); + + event.initEvent( type, true, true ); + node.dispatchEvent( event ); +}; /** * Add random number to url to stop caching |