/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/aria/private/utils/element.ts
20 строк
491 B
Andrey Dolgachev
refactor(aria/accordion): Replace ContentChildren with manual registration of triggers (#33027)
16 апр 2026, 01:28
Не верифицирован
16 апр 2026, 01:28
100dc2b
Код
Авторство
О чём код?
/** * @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 */ export interface HasElement { element: HTMLElement; } /** * Sort directives by their document order. */ export function sortDirectives(a: HasElement, b: HasElement) { return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0 ? 1 : -1; }