UNPKG

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