import { ContentsquareModule } from '../core/nativeModules'; import CSQMethodFilter from '../csq/CSQMethodFilter'; /** * Injects the Contentsquare SDK in the native WebView found at the reference. * * @param {number} webViewTag the nativeTag of the WebView - from which we will extract the React Tag. */ export const injectWebView = (webViewTag: number): void => { CSQMethodFilter.executeMethodIfAllowed( ContentsquareModule.injectWebView(webViewTag), 'default' ); }; /** * Removes the Contentsquare SDK injection in the native WebView found at the reference. * * @param {number} webViewTag the nativeTag of the WebView - from which we will extract the React Tag. */ export const removeWebViewInjection = (webViewTag: number): void => { CSQMethodFilter.executeMethodIfAllowed( ContentsquareModule.removeWebViewInjection(webViewTag), 'default' ); };