Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var handlerExecuted = false;
["div", "body", "frameset"].forEach(elementName => {
["readystatechange", "visibilitychange"].forEach(eventName => {
let attributeName = `on${eventName}`;
test(t => {
t.add_cleanup(_ => { handlerExecuted = false });
let element = document.createElement(elementName);
element.setAttribute(attributeName, "handlerExecuted = true;")
element.dispatchEvent(new Event(eventName, {bubbles: false}));
assert_false(handlerExecuted);
},`${elementName}.on${eventName} is not an event handler content attribute`);
});
});
</script>