OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <title>CustomEvent</title> |
| 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="/resources/testharnessreport.js"></script> |
| 5 <div id="log"></div> |
| 6 <script> |
| 7 test(function() { |
| 8 var type = "foo"; |
| 9 |
| 10 var target = document.createElement("div"); |
| 11 target.addEventListener(type, this.step_func(function(evt) { |
| 12 assert_equals(evt.type, type); |
| 13 }), true); |
| 14 |
| 15 var fooEvent = document.createEvent("CustomEvent"); |
| 16 fooEvent.initEvent(type, true, true); |
| 17 target.dispatchEvent(fooEvent); |
| 18 }); |
| 19 </script> |
OLD | NEW |