Skip to content

Commit

Permalink
Added BroadcastChannel (#2734)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNeises committed Dec 20, 2023
1 parent bd024b5 commit 44fa7b0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions feature-detects/broadcastchannel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*!
{
"name": "Broadcast Channel",
"property": "broadcastchannel",
"authors": ["Alex Neises (@AlexNeises)"],
"caniuse": "broadcastchannel",
"tags": ["performance", "broadcastchannel"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel"
}]
}
!*/
/* DOC
Detects support for Broadcast Channels, allowing communication between different documents in different windows, tabs, frames, or iframes of the same origin.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('broadcastchannel', 'BroadcastChannel' in window);
});
1 change: 1 addition & 0 deletions lib/config-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"battery/battery",
"battery/lowbattery",
"blob",
"broadcastchannel",
"canvas/canvas",
"canvas/blending",
"canvas/todataurl",
Expand Down
1 change: 1 addition & 0 deletions test/browser/integration/caniuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ window.caniusecb = function(caniuse) {
boxdecorationbreak: 'css-boxdecorationbreak',
boxshadow: 'css-boxshadow',
boxsizing: 'css3-boxsizing',
broadcastchannel: 'broadcastchannel',
canvas: 'canvas',
canvasblending: 'canvas-blending',
canvastext: 'canvas-text',
Expand Down

0 comments on commit 44fa7b0

Please sign in to comment.