MCPcopy
hub / github.com/angular/angular / dispatchEvent

Method dispatchEvent

packages/platform-server/src/domino_adapter.ts:104–113  ·  view source on GitHub ↗
(el: Node, evt: any)

Source from the content-addressed store, hash-verified

102 }
103
104 override dispatchEvent(el: Node, evt: any) {
105 el.dispatchEvent(evt);
106
107 // Dispatch the event to the window also.
108 const doc = el.ownerDocument || el;
109 const win = (doc as any).defaultView;
110 if (win) {
111 win.dispatchEvent(evt);
112 }
113 }
114
115 override getUserAgent(): string {
116 return 'Fake user agent';

Calls

no outgoing calls

Tested by 4

testDuplicateFunction · 0.36
testAddRemoveFunction · 0.36
testDifferentFunction · 0.36
testPassiveFunction · 0.36