Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /workers/postMessage_clone_port_error.htm - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title> postMessage(): cloning source port </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
test(function() {
var channel = new MessageChannel();
channel.port1.start();
assert_throws_dom("DataCloneError", function() {
channel.port1.postMessage("ports", [channel.port1]);
});
});
</script>