File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,10 @@ if (typeof window == 'undefined') {
1818 DominoAdapter . makeCurrent ( ) ;
1919 ( global as any ) . document = getDOM ( ) . getDefaultDocument ( ) ;
2020
21- // Trick to avoid Event patching from
22- // https://github.com/angular/angular/blob/7cf5e95ac9f0f2648beebf0d5bd9056b79946970/packages/platform-browser/src/dom/events/dom_events.ts#L112-L132
23- // It fails with Domino with TypeError: Cannot assign to read only property
24- // 'stopImmediatePropagation' of object '#<Event>'
25- ( global as any ) . Event = null ;
26-
2721 // For animation tests, see
2822 // https://github.com/angular/angular/blob/main/packages/animations/browser/src/render/shared.ts#L140
2923 ( global as any ) . Element = domino . impl . Element ;
3024 ( global as any ) . isBrowser = false ;
3125 ( global as any ) . isNode = true ;
26+ ( global as any ) . Event = domino . impl . Event ;
3227}
Original file line number Diff line number Diff line change @@ -130,7 +130,6 @@ async function loadDominoOrNull():
130130
131131/**
132132 * Ensure that global has `Document` if we are in node.js
133- * @publicApi
134133 */
135134export async function ensureDocument ( ) : Promise < void > {
136135 if ( ( global as any ) . isBrowser ) {
@@ -147,11 +146,7 @@ export async function ensureDocument(): Promise<void> {
147146 savedDocument = ( global as any ) . document ;
148147 ( global as any ) . window = window ;
149148 ( global as any ) . document = window . document ;
150- // Trick to avoid Event patching from
151- // https://github.com/angular/angular/blob/7cf5e95ac9f0f2648beebf0d5bd9056b79946970/packages/platform-browser/src/dom/events/dom_events.ts#L112-L132
152- // It fails with Domino with TypeError: Cannot assign to read only property
153- // 'stopImmediatePropagation' of object '#<Event>'
154- ( global as any ) . Event = null ;
149+ ( global as any ) . Event = domino . impl . Event ;
155150 savedNode = ( global as any ) . Node ;
156151 // Domino types do not type `impl`, but it's a documented field.
157152 // See: https://www.npmjs.com/package/domino#usage.
You can’t perform that action at this time.
0 commit comments