diff options
Diffstat (limited to 'ext/broadcast_channel/01_broadcast_channel.js')
-rw-r--r-- | ext/broadcast_channel/01_broadcast_channel.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/broadcast_channel/01_broadcast_channel.js b/ext/broadcast_channel/01_broadcast_channel.js index d89b19a1b..dad94860d 100644 --- a/ext/broadcast_channel/01_broadcast_channel.js +++ b/ext/broadcast_channel/01_broadcast_channel.js @@ -98,7 +98,7 @@ } postMessage(message) { - webidl.assertBranded(this, BroadcastChannel); + webidl.assertBranded(this, BroadcastChannelPrototype); const prefix = "Failed to execute 'postMessage' on 'BroadcastChannel'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -121,7 +121,7 @@ } close() { - webidl.assertBranded(this, BroadcastChannel); + webidl.assertBranded(this, BroadcastChannelPrototype); this[_closed] = true; const index = ArrayPrototypeIndexOf(channels, this); @@ -134,6 +134,7 @@ defineEventHandler(BroadcastChannel.prototype, "message"); defineEventHandler(BroadcastChannel.prototype, "messageerror"); + const BroadcastChannelPrototype = BroadcastChannel.prototype; window.__bootstrap.broadcastChannel = { BroadcastChannel }; })(this); |