1 | /**
|
2 | * The namespace for DOM utilities.
|
3 | */
|
4 | export declare namespace DOMUtils {
|
5 | /**
|
6 | * Get the index of the node at a client position, or `-1`.
|
7 | */
|
8 | function hitTestNodes(nodes: HTMLElement[] | HTMLCollection, x: number, y: number): number;
|
9 | /**
|
10 | * Find the first element matching a class name.
|
11 | * Only use this function when the element existence is guaranteed.
|
12 | */
|
13 | function findElement(parent: HTMLElement, className: string): HTMLElement;
|
14 | /**
|
15 | * Find the first element matching a class name.
|
16 | */
|
17 | function findElements(parent: HTMLElement, className: string): HTMLCollectionOf<HTMLElement>;
|
18 | /**
|
19 | * Create a DOM id with prefix "id-" to solve bug for UUIDs beginning with numbers.
|
20 | */
|
21 | function createDomID(): string;
|
22 | /**
|
23 | * Check whether the active element descendant from given parent is editable.
|
24 | * When checking active elements it includes elements in the open shadow DOM.
|
25 | */
|
26 | function hasActiveEditableElement(parent: Node | DocumentFragment, root?: ShadowRoot | Document): boolean;
|
27 | }
|