/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/drag-drop/directives/assertions.ts
20 строк
599 B
Naji
docs: replace angular.io links with angular.dev (#29734)
19 сен 2024, 13:57
Не верифицирован
19 сен 2024, 13:57
5782834
Код
Авторство
О чём код?
/** * @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 */ /** * Asserts that a particular node is an element. * @param node Node to be checked. * @param name Name to attach to the error message. */ export function assertElementNode(node: Node, name: string): asserts node is HTMLElement { if (node.nodeType !== 1) { throw Error( `${name} must be attached to an element node. ` + `Currently attached to "${node.nodeName}".`, ); } }