UNPKG

@datadog/mobile-react-native-webview

Version:

A client-side React Native module to interact with react-native-webview and Datadog

29 lines 978 B
export declare const DATADOG_MESSAGE_PREFIX = "[DATADOG]"; /** * Internal Datadog Message Type */ export type DatadogMessageType = /** * Signals errors that occured during the execution of JavaScript code in the WebView. */ 'ERROR' /** * Signals events that should be forwarded and consumed by the native SDK. */ | 'NATIVE_EVENT'; /** * Internal Datadog Message Format. */ export type DatadogMessageFormat = { type: DatadogMessageType; message: string; }; /** * Wraps the given JS Code in a try and catch block, including a * comment with the given allowedHosts in JSON format * @param javascriptCode The JS Code to wrap in a try and catch block. * @returns the wrapped JS code. */ export declare function wrapJsCodeWithAllowedHosts(javascriptCode?: string, allowedHosts?: string[]): string | undefined; export declare function wrapJsCodeInTryAndCatch(javascriptCode: string | undefined): string | undefined; //# sourceMappingURL=webview-js-utils.d.ts.map