MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / pageDispatchCustomEvent

Function pageDispatchCustomEvent

packages/message/common.ts:15–22  ·  view source on GitHub ↗
(eventType: string, detail: T)

Source from the content-addressed store, hash-verified

13export const pageRemoveEventListener = performanceClone.removeEventListener.bind(performanceClone);
14const detailClone = typeof cloneInto === "function" ? cloneInto : null;
15export const pageDispatchCustomEvent = <T = any>(eventType: string, detail: T) => {
16 if (detailClone && detail) detail = <T>detailClone(detail, performanceClone);
17 const ev = new CustomEventClone(eventType, {
18 detail,
19 cancelable: true,
20 });
21 return pageDispatchEvent(ev);
22};
23
24// flag协商
25export function negotiateEventFlag(

Callers 5

nativeSendMethod · 0.90
negotiateEventFlagFunction · 0.85
fnEventFlagListenerFunction · 0.85
getEventFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected