/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/platform-server/init/src/shims.ts
20 строк
694 B
Alan Agius
build: consolidate domino bundling in platform-server
25 мар 2026, 23:31
25 мар 2026, 23:31
b40d11e
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import domino from '../../third_party/domino/bundled-domino'; /** * Apply the necessary shims to make DOM globals (such as `Element`, `HTMLElement`, etc.) available * on the environment. */ export function applyShims(): void { // Make all Domino types available in the global env. // NB: Any changes here should also be done in `packages/platform-server/src/domino_adapter.ts`. Object.assign(globalThis, domino.impl); (globalThis as any)['KeyboardEvent'] = domino.impl.Event; }