@phenixrts/sdk
Version:
JavaScript SDK
48 lines (47 loc) • 2.82 kB
TypeScript
import IGlobalScope from './IGlobalScope';
import INetworkInformation from './INetworkInformation';
import IProvidedGlobalScope from './IProvidedGlobalScope';
import IDisposable from '../lang/IDisposable';
import ReadOnlySubject from '../rx/ReadOnlySubject';
export declare class GlobalScope implements IGlobalScope {
private static readonly _instance;
private static readonly _readOnlyInstance;
private readonly _document;
private readonly _location;
private readonly _navigator;
private readonly _window;
constructor(providedGlobalScope: IProvidedGlobalScope);
static setInstance(providedGlobalScope: IProvidedGlobalScope): void;
static getInstance(): ReadOnlySubject<IGlobalScope | null>;
static subscribe(callback: (value: IGlobalScope | null) => void): IDisposable;
get FormData(): typeof FormData;
get HTMLVideoElement(): typeof HTMLVideoElement;
get MediaStream(): typeof MediaStream;
get MediaStreamTrack(): typeof MediaStreamTrack;
get RTCPeerConnection(): typeof RTCPeerConnection;
get RTCSessionDescription(): typeof RTCSessionDescription;
get RTCIceCandidate(): typeof RTCIceCandidate;
get URL(): typeof URL;
get URLSearchParams(): typeof URLSearchParams;
get addDocumentEventListener(): (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
get addWindowEventListener(): (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
get clearInterval(): (id?: number | undefined) => void;
get clearTimeout(): (id?: number | undefined) => void;
get documentCreateElement(): <Element extends HTMLElement>(tag: string) => Element;
get documentHasFocus(): () => boolean;
get documentIsHidden(): boolean;
get documentQuerySelector(): <Element extends HTMLElement>(tag: string) => Element | null;
get fetch(): (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
get locationHostname(): string;
get locationSearch(): string;
get navigatorConnection(): INetworkInformation | undefined;
get navigatorIsOnLine(): boolean;
get pageLoadTime(): number | undefined;
get queueMicrotask(): (microtask: () => void) => void;
get removeDocumentEventListener(): (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
get removeWindowEventListener(): (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
get setInterval(): (handler: string | Function, timeout?: number | undefined) => number;
get setTimeout(): (handler: string | Function, timeout?: number | undefined) => number;
}
declare const _default: ReadOnlySubject<IGlobalScope | null>;
export default _default;