Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/user-activation/message-event-init.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<!--
Tentative due to:
-->
<title>MessageEvent constructor</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
var ev = new MessageEvent("test", { userActivation: navigator.userActivation })
assert_equals(ev.userActivation, navigator.userActivation, "userActivation attribute")
}, "MessageEventInit user activation set")
test(function() {
var ev = new MessageEvent("test")
assert_equals(ev.userActivation, null, "userActivation attribute")
}, "MessageEventInit user activation not set")
</script>