UNPKG

1.83 kBTypeScriptView Raw
1import { Action } from "./core/types";
2export declare type DispatchOptions<T extends CustomEvent> = {
3 target: EventTarget;
4 cancelable: boolean;
5 detail: T["detail"];
6};
7export declare function activateScriptElement(element: HTMLScriptElement): HTMLScriptElement;
8export declare function createDocumentFragment(html: string): DocumentFragment;
9export declare function dispatch<T extends CustomEvent>(eventName: string, { target, cancelable, detail }?: Partial<DispatchOptions<T>>): CustomEvent<T["detail"]>;
10export declare function nextAnimationFrame(): Promise<void>;
11export declare function nextEventLoopTick(): Promise<void>;
12export declare function nextMicrotask(): Promise<void>;
13export declare function parseHTMLDocument(html?: string): Document;
14export declare function unindent(strings: TemplateStringsArray, ...values: any[]): string;
15export declare function uuid(): string;
16export declare function getAttribute(attributeName: string, ...elements: (Element | undefined)[]): string | null;
17export declare function hasAttribute(attributeName: string, ...elements: (Element | undefined)[]): boolean;
18export declare function markAsBusy(...elements: Element[]): void;
19export declare function clearBusyState(...elements: Element[]): void;
20export declare function waitForLoad(element: HTMLLinkElement, timeoutInMilliseconds?: number): Promise<void>;
21export declare function getHistoryMethodForAction(action: Action): (data: any, unused: string, url?: string | URL | null | undefined) => void;
22export declare function getVisitAction(...elements: (Element | undefined)[]): Action | null;
23export declare function getMetaElement(name: string): HTMLMetaElement | null;
24export declare function getMetaContent(name: string): string | null;
25export declare function setMetaContent(name: string, content: string): HTMLMetaElement;