Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/events/EventTarget-addEventListener.any.html - WPT Dashboard Interop Dashboard
- /dom/events/EventTarget-addEventListener.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=EventTarget.addEventListener
// Step 1.
test(function() {
const et = new EventTarget();
assert_equals(et.addEventListener("x", null, false), undefined);
assert_equals(et.addEventListener("x", null, true), undefined);
assert_equals(et.addEventListener("x", null), undefined);
}, "Adding a null event listener should succeed");