MCPcopy Create free account
hub / github.com/AirConsole/airconsole-api / dispatchCustomMessageEvent

Function dispatchCustomMessageEvent

tests/spec/methods/methods.js:5–11  ·  view source on GitHub ↗
(data, event_type)

Source from the content-addressed store, hash-verified

3var LOCATION = document.location.href;
4
5function dispatchCustomMessageEvent (data, event_type) {
6 event_type = event_type || 'message';
7 var fake_event = document.createEvent('CustomEvent'); // MUST be 'CustomEvent'
8 fake_event.initCustomEvent(event_type, false, false, null);
9 fake_event.data = data || {};
10 window.dispatchEvent(fake_event);
11};
12
13function tearDown() {};
14

Callers 10

testDeviceStatesFunction · 0.85
testSetupFunction · 0.85
testAdsFunction · 0.85
testPremiumFunction · 0.85
testOnPauseOnResumeFunction · 0.85
testConnectivityFunction · 0.85
testMessagingFunction · 0.85
testCtrlInputsFunction · 0.85
testPlayerSilencingFunction · 0.85
testProfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected