UNPKG

1.8 kBTypeScriptView Raw
1export declare const isIE: boolean;
2export declare const isEdge: boolean;
3export declare const isEdgeOrIE: boolean;
4export declare const isOpera: boolean;
5export declare const isFirefox: boolean;
6export declare const isWebKit: boolean;
7export declare const isChrome: boolean;
8export declare const isSafari: boolean;
9export declare const isIPad: boolean;
10export declare const isNative: boolean;
11export declare const isBasicWasmSupported: boolean;
12/**
13 * Resolves after the next animation frame if no parameter is given,
14 * or after the given number of animation frames.
15 */
16export declare function animationFrame(n?: number): Promise<void>;
17/**
18 * Parse a magnitude value (e.g. width, height, left, top) from a CSS attribute value.
19 * Returns the given default value (or undefined) if the value cannot be determined,
20 * e.g. because it is a relative value like `50%` or `auto`.
21 */
22export declare function parseCssMagnitude(value: string | null, defaultValue: number): number;
23/**
24 * Parse the number of milliseconds from a CSS time value.
25 * Returns the given default value (or undefined) if the value cannot be determined.
26 */
27export declare function parseCssTime(time: string | null, defaultValue: number): number;
28/**
29 * Prevent browser back/forward navigation of a mouse wheel event.
30 */
31export declare function preventNavigation(event: WheelEvent): void;
32export declare type PartialCSSStyle = Omit<Partial<CSSStyleDeclaration>, 'visibility' | 'display' | 'parentRule' | 'getPropertyPriority' | 'getPropertyValue' | 'item' | 'removeProperty' | 'setProperty'>;
33export declare function measureTextWidth(text: string | string[], style?: PartialCSSStyle): number;
34export declare function measureTextHeight(text: string | string[], style?: PartialCSSStyle): number;
35//# sourceMappingURL=browser.d.ts.map
\No newline at end of file