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 | */
|
12 | function findElement(parent: HTMLElement, className: string): HTMLElement;
|
13 | /**
|
14 | * Find the first element matching a class name.
|
15 | */
|
16 | function findElements(parent: HTMLElement, className: string): HTMLCollectionOf<HTMLElement>;
|
17 | /**
|
18 | * Create a DOM id with prefix "id-" to solve bug for UUIDs beginning with numbers.
|
19 | */
|
20 | function createDomID(): string;
|
21 | /**
|
22 | * Check whether the active element descendant from given parent is editable.
|
23 | * When checking active elements it includes elements in the open shadow DOM.
|
24 | */
|
25 | function hasActiveEditableElement(parent: Node | DocumentFragment, root?: ShadowRoot | Document): boolean;
|
26 | }
|