File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -527,6 +527,16 @@ export abstract class WebViewExtBase extends ContainerView {
527
527
*/
528
528
protected tempSuspendSrcLoading = false ;
529
529
530
+ /**
531
+ * Whether to install promise polyfill
532
+ */
533
+ injectPolyfills = true ;
534
+
535
+ /**
536
+ * Whether to install event bridge
537
+ */
538
+ injectBridge = true ;
539
+
530
540
/**
531
541
* Callback for the loadFinished-event. Called from the native-webview
532
542
*/
@@ -1359,8 +1369,12 @@ export abstract class WebViewExtBase extends ContainerView {
1359
1369
* Inject WebView JavaScript Bridge.
1360
1370
*/
1361
1371
protected async injectWebViewBridge ( ) : Promise < void > {
1362
- await this . executeJavaScript ( webViewBridge , false ) ;
1363
- await this . ensurePolyfills ( ) ;
1372
+ if ( this . injectBridge ) {
1373
+ await this . executeJavaScript ( webViewBridge , false ) ;
1374
+ }
1375
+ if ( this . injectPolyfills ) {
1376
+ await this . ensurePolyfills ( ) ;
1377
+ }
1364
1378
await this . injectViewPortMeta ( ) ;
1365
1379
}
1366
1380
You can’t perform that action at this time.
0 commit comments