summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webmessaging/Channel_postMessage_DataCloneErr.any.js
blob: 048820fa6be3e30bc3da1081b69b83725b9b8eb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// META: title=postMessage() with a host object raises DataCloneError

    var description = "Throw a DataCloneError when a host object (e.g. a DOM node) is used with postMessage.";

    test(function()
    {
        var channel = new MessageChannel();
        channel.port1.start();

        assert_throws_dom("DATA_CLONE_ERR", function()
        {
            channel.port1.postMessage(globalThis);
        });
    }, description);