UNPKG

trimble-connect-workspace-api

Version:

Trimble Connect Workspace API

28 lines (27 loc) 1.45 kB
import { IDispatcher } from ".."; export declare const generateClientId: () => string; /** Returns `true` when this function is called in application running inside a WebView2 window */ export declare const isWebView: () => boolean; /** Returns `true` when this function is called in application running inside a CefSharp window */ export declare const isCef: () => boolean; export declare const isWindow: (obj: any) => obj is Window; export declare const isIFrame: (obj: any) => obj is HTMLIFrameElement; export declare const getCefProxy: () => Promise<IDispatcher>; export declare const getWebViewProxy: () => IDispatcher; export declare const getWebKitProxy: () => IDispatcher; export declare const getHybridWebViewHostProxy: () => IDispatcher; /** * Returns either the argument `originalDispatcher`, or a Webview2 or CefSharp proxy object. * * If this function is invoked with `originalDispatcher(window.parent)`, * and `window.parent === window`, then `originalDispatcher` is the current window. * * (See: https://developer.mozilla.org/en-US/docs/Web/API/Window/parent) * * If `originalDispatcher` is the current window, the function checks * if it is running inside a CefSharp or WebView host, and applies proxy to forward * the message to .NET application. * * If proxy is not applicable, `originalDispatcher` is returned. */ export declare const resolveMessageDispatcher: (originalDispatcher: IDispatcher) => Promise<IDispatcher>;