OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Event.type</title> |
| 3 <link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"> |
| 4 <link rel="help" href="https://dom.spec.whatwg.org/#dom-event-type"> |
| 5 <script src="../../../../resources/testharness.js"></script> |
| 6 <script src="../../../../resources/testharnessreport.js"></script> |
| 7 <div id="log"></div> |
| 8 <script> |
| 9 test(function() { |
| 10 var e = document.createEvent("Event") |
| 11 assert_equals(e.type, ""); |
| 12 }, "Event.type should initially be the empty string"); |
| 13 test(function() { |
| 14 var e = document.createEvent("Event") |
| 15 e.initEvent("foo", false, false) |
| 16 assert_equals(e.type, "foo") |
| 17 }, "Event.type should be initialized by initEvent"); |
| 18 test(function() { |
| 19 var e = new Event("bar") |
| 20 assert_equals(e.type, "bar") |
| 21 }, "Event.type should be initialized by the constructor"); |
| 22 </script> |
OLD | NEW |