mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
20 lines
518 B
HTML
20 lines
518 B
HTML
<!doctype html>
|
|
<title>CustomEvent</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<div id="log"></div>
|
|
<script>
|
|
test(function() {
|
|
var type = "foo";
|
|
|
|
var target = document.createElement("div");
|
|
target.addEventListener(type, this.step_func(function(evt) {
|
|
assert_equals(evt.type, type);
|
|
}), true);
|
|
|
|
var fooEvent = document.createEvent("CustomEvent");
|
|
fooEvent.initEvent(type, true, true);
|
|
target.dispatchEvent(fooEvent);
|
|
});
|
|
</script>
|