MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / fireBridgeEvent

Function fireBridgeEvent

src/injected/util/index.js:21–25  ·  view source on GitHub ↗
(eventId, msg)

Source from the content-addressed store, hash-verified

19};
20
21export const fireBridgeEvent = (eventId, msg) => {
22 const detail = cloneInto ? cloneInto(msg, document) : msg;
23 const evtMain = new SafeCustomEvent(eventId, { __proto__: null, detail });
24 window::fire(evtMain);
25};
26
27export const bindEvents = (srcId, destId, bridge) => {
28 /* Using a separate event for `node` because CustomEvent can't transfer nodes,

Callers 2

handshakerFunction · 0.90
bindEventsFunction · 0.85

Calls 1

fireFunction · 0.50

Tested by

no test coverage detected