gecko-dev/dom/broadcastchannel/tests/broadcastchannel_pref_worke...

12 строки
177 B
JavaScript

onmessage = function() {
var exists = true;
try {
var bc = new BroadcastChannel('foobar');
} catch(e) {
exists = false;
}
postMessage({ exists: exists });
}