react-native-webview-bootpay 11.26.20 → 13.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -31
- package/android/build.gradle +70 -112
- package/android/gradle.properties +5 -6
- package/android/src/main/java/kr/co/bootpay/webview/BPCBasicAuthCredential.java +11 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +354 -434
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebView.java +350 -259
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewClient.java +253 -399
- package/android/src/main/java/kr/co/bootpay/webview/{WebViewConfig.java → BPCWebViewConfig.java} +3 -4
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewFileProvider.java +1 -1
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManager.java +290 -877
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManagerImpl.kt +664 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewModule.java +29 -520
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewModuleImpl.java +554 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewPackage.java +56 -0
- package/android/src/main/java/kr/co/bootpay/webview/BootpayUrlHelper.java +122 -0
- package/android/src/main/java/kr/co/bootpay/webview/events/TopCustomMenuSelectionEvent.kt +24 -0
- package/android/src/main/java/kr/co/bootpay/webview/events/TopNewWindowEvent.kt +25 -0
- package/android/src/newarch/com/reactnativecommunity/webview/BPCWebViewManager.java +544 -0
- package/android/src/newarch/com/reactnativecommunity/webview/BPCWebViewModule.java +57 -0
- package/apple/BPCWebView.h +22 -126
- package/apple/BPCWebView.mm +528 -0
- package/apple/BPCWebViewDecisionManager.h +20 -0
- package/apple/BPCWebViewDecisionManager.m +47 -0
- package/apple/BPCWebViewImpl.h +150 -0
- package/apple/{BPCWebView.m → BPCWebViewImpl.m} +381 -214
- package/apple/BPCWebViewManager.h +4 -8
- package/apple/{BPCWebViewManager.m → BPCWebViewManager.mm} +93 -149
- package/{android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream → ios/.DS_Store} +0 -0
- package/ios/{BPCWebView.xcodeproj → RNCWebView.xcodeproj}/project.pbxproj +18 -18
- package/ios/main.jsbundle +457 -0
- package/lib/BPCWebViewNativeComponent.d.ts +242 -0
- package/lib/BPCWebViewNativeComponent.d.ts.map +1 -0
- package/lib/BPCWebViewNativeComponent.js +6 -0
- package/lib/NativeBPCWebView.d.ts +10 -0
- package/lib/NativeBPCWebView.d.ts.map +1 -0
- package/lib/NativeBPCWebView.js +2 -0
- package/lib/NativeRNCWebView.d.ts +10 -0
- package/lib/NativeRNCWebView.d.ts.map +1 -0
- package/lib/NativeRNCWebView.js +2 -0
- package/lib/RNCWebViewNativeComponent.d.ts +242 -0
- package/lib/RNCWebViewNativeComponent.d.ts.map +1 -0
- package/lib/RNCWebViewNativeComponent.js +6 -0
- package/lib/WebView.android.d.ts.map +1 -1
- package/lib/WebView.android.js +53 -29
- package/lib/WebView.ios.d.ts.map +1 -1
- package/lib/WebView.ios.js +49 -28
- package/lib/WebView.macos.d.ts.map +1 -1
- package/lib/WebView.macos.js +10 -14
- package/lib/WebView.windows.d.ts.map +1 -1
- package/lib/WebView.windows.js +4 -6
- package/lib/WebViewNativeComponent.macos.d.ts +2 -2
- package/lib/WebViewNativeComponent.macos.js +2 -2
- package/lib/WebViewShared.d.ts +4 -2
- package/lib/WebViewShared.d.ts.map +1 -1
- package/lib/WebViewShared.js +8 -2
- package/lib/WebViewTypes.d.ts +62 -95
- package/lib/WebViewTypes.d.ts.map +1 -1
- package/lib/WebViewTypes.js +0 -16
- package/macos/RNCWebView.xcodeproj/project.pbxproj +44 -44
- package/package.json +38 -20
- package/react-native-webview-bootpay.podspec +22 -3
- package/react-native.config.js +1 -2
- package/src/BPCWebViewNativeComponent.ts +281 -0
- package/src/NativeBPCWebView.ts +14 -0
- package/src/WebView.android.tsx +229 -0
- package/src/WebView.ios.tsx +232 -0
- package/src/WebView.macos.tsx +177 -0
- package/src/WebView.styles.ts +44 -0
- package/src/WebView.tsx +18 -0
- package/src/WebView.windows.tsx +156 -0
- package/src/WebViewNativeComponent.macos.ts +8 -0
- package/src/WebViewNativeComponent.windows.ts +10 -0
- package/src/WebViewShared.tsx +235 -0
- package/src/WebViewTypes.ts +1287 -0
- package/src/__tests__/WebViewShared-test.js +208 -0
- package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +8 -0
- package/src/index.ts +4 -0
- package/windows/.gitignore +353 -0
- package/windows/ReactNativeWebView/ReactNativeWebView.vcxproj +1 -1
- package/windows/ReactNativeWebView/ReactWebView.idl +1 -0
- package/windows/ReactNativeWebView/ReactWebView2.cpp +142 -19
- package/windows/ReactNativeWebView/ReactWebView2.h +3 -0
- package/windows/ReactNativeWebView/ReactWebView2Manager.cpp +29 -5
- package/windows/ReactNativeWebView/pch.h +1 -0
- package/android/.editorconfig +0 -6
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/results.bin +0 -1
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebChromeClient$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebChromeClient.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewClient.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewFileProvider.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$2.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$3.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$4.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$2.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$MimeType.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewPackage.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BasicAuthCredential.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BuildConfig.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/URLUtil.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/WebViewConfig.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopMessageEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/desugar_graph.bin +0 -0
- package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/results.bin +0 -1
- package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/c0e86b44db04fcaf424a5b7ce79324f4/results.bin +0 -1
- package/android/build/generated/source/buildConfig/debug/kr/co/bootpay/webview/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -106
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -4
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1861
- package/android/build/intermediates/compiled_local_resources/debug/out/xml_file_provider_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -2
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$3.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/URLUtil.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/WebViewConfig.class +0 -0
- package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -3
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -210
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -106
- package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
- package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +0 -18
- package/android/build/intermediates/packaged_res/debug/xml/file_provider_paths.xml +0 -6
- package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-webview-bootpay_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebChromeClient$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/URLUtil.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/WebViewConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1381
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -229
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-webview-bootpay_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewPackage.kt +0 -15
- package/android/src/main/java/kr/co/bootpay/webview/BasicAuthCredential.java +0 -11
- package/ios/BPCWebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/BPCWebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/BPCWebView.xcodeproj/project.xcworkspace/xcuserdata/ehowlsla.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/BPCWebView.xcodeproj/xcuserdata/ehowlsla.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/WebViewNativeComponent.android.d.ts +0 -4
- package/lib/WebViewNativeComponent.android.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.android.js +0 -3
- package/lib/WebViewNativeComponent.ios.d.ts +0 -4
- package/lib/WebViewNativeComponent.ios.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.ios.js +0 -3
|
@@ -1,42 +1,65 @@
|
|
|
1
1
|
package kr.co.bootpay.webview;
|
|
2
2
|
|
|
3
|
+
import androidx.annotation.Nullable;
|
|
4
|
+
|
|
3
5
|
import android.annotation.SuppressLint;
|
|
4
6
|
import android.app.Dialog;
|
|
7
|
+
import android.content.Context;
|
|
8
|
+
import android.graphics.Rect;
|
|
5
9
|
import android.os.Build;
|
|
6
10
|
import android.text.TextUtils;
|
|
11
|
+
import android.util.AttributeSet;
|
|
12
|
+
import android.util.Log;
|
|
13
|
+
|
|
14
|
+
import android.view.ActionMode;
|
|
15
|
+
import android.view.Menu;
|
|
16
|
+
import android.view.MenuItem;
|
|
7
17
|
import android.view.MotionEvent;
|
|
18
|
+
import android.view.View;
|
|
8
19
|
import android.webkit.JavascriptInterface;
|
|
20
|
+
import android.webkit.ValueCallback;
|
|
9
21
|
import android.webkit.WebChromeClient;
|
|
10
22
|
import android.webkit.WebView;
|
|
11
23
|
import android.webkit.WebViewClient;
|
|
12
24
|
|
|
13
|
-
import
|
|
14
|
-
|
|
25
|
+
import com.facebook.common.logging.FLog;
|
|
15
26
|
import com.facebook.react.bridge.Arguments;
|
|
16
27
|
import com.facebook.react.bridge.CatalystInstance;
|
|
17
28
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
18
|
-
import com.facebook.react.bridge.
|
|
29
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
19
30
|
import com.facebook.react.bridge.WritableMap;
|
|
20
31
|
import com.facebook.react.bridge.WritableNativeArray;
|
|
21
32
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
22
33
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
34
|
+
import com.facebook.react.uimanager.UIManagerHelper;
|
|
23
35
|
import com.facebook.react.uimanager.UIManagerModule;
|
|
24
36
|
import com.facebook.react.uimanager.events.ContentSizeChangeEvent;
|
|
25
37
|
import com.facebook.react.uimanager.events.Event;
|
|
26
38
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
39
|
+
import com.facebook.react.uimanager.events.RCTEventEmitter;
|
|
27
40
|
import com.facebook.react.views.scroll.OnScrollDispatchHelper;
|
|
28
41
|
import com.facebook.react.views.scroll.ScrollEvent;
|
|
29
42
|
import com.facebook.react.views.scroll.ScrollEventType;
|
|
43
|
+
import kr.co.bootpay.webview.events.TopCustomMenuSelectionEvent;
|
|
44
|
+
import kr.co.bootpay.webview.events.TopLoadingProgressEvent;
|
|
45
|
+
import kr.co.bootpay.webview.events.TopMessageEvent;
|
|
46
|
+
|
|
47
|
+
import org.json.JSONException;
|
|
48
|
+
import org.json.JSONObject;
|
|
30
49
|
|
|
31
50
|
import java.io.UnsupportedEncodingException;
|
|
32
51
|
import java.net.URLEncoder;
|
|
52
|
+
import java.util.List;
|
|
53
|
+
import java.util.Map;
|
|
54
|
+
|
|
55
|
+
public class BPCWebView extends WebView implements LifecycleEventListener {
|
|
56
|
+
protected @Nullable
|
|
57
|
+
String injectedJS;
|
|
58
|
+
protected @Nullable
|
|
59
|
+
String injectedJSBeforeContentLoaded;
|
|
60
|
+
protected @Nullable
|
|
61
|
+
BPCWebViewBridge bridge;
|
|
33
62
|
|
|
34
|
-
import kr.co.bootpay.webview.events.TopMessageEvent;
|
|
35
|
-
/**
|
|
36
|
-
* Subclass of {@link WebView} that implements {@link LifecycleEventListener} interface in order
|
|
37
|
-
* to call {@link WebView#destroy} on activity destroy event and also to clear the client
|
|
38
|
-
*/
|
|
39
|
-
class BPCWebView extends WebView implements LifecycleEventListener {
|
|
40
63
|
|
|
41
64
|
/** bootpay added start ***/
|
|
42
65
|
protected static final String JAVASCRIPT_INTERFACE = "BootpayRNWebView";
|
|
@@ -51,321 +74,389 @@ class BPCWebView extends WebView implements LifecycleEventListener {
|
|
|
51
74
|
}
|
|
52
75
|
/** bootpay added end ***/
|
|
53
76
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
protected boolean sendContentSizeChangeEvents = false;
|
|
74
|
-
private OnScrollDispatchHelper mOnScrollDispatchHelper;
|
|
75
|
-
protected boolean hasScrollEvent = false;
|
|
76
|
-
protected boolean nestedScrollEnabled = false;
|
|
77
|
-
protected ProgressChangedFilter progressChangedFilter;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* WebView must be created with an context of the current activity
|
|
81
|
-
* <p>
|
|
82
|
-
* Activity Context is required for creation of dialogs internally by WebView
|
|
83
|
-
* Reactive Native needed for access to ReactNative internal system functionality
|
|
84
|
-
*/
|
|
85
|
-
public BPCWebView(ThemedReactContext reactContext) {
|
|
86
|
-
super(reactContext);
|
|
87
|
-
this.createCatalystInstance();
|
|
88
|
-
progressChangedFilter = new ProgressChangedFilter();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
public void setIgnoreErrFailedForThisURL(String url) {
|
|
92
|
-
mBPCWebViewClient.setIgnoreErrFailedForThisURL(url);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
public void setBasicAuthCredential(BasicAuthCredential credential) {
|
|
96
|
-
mBPCWebViewClient.setBasicAuthCredential(credential);
|
|
97
|
-
}
|
|
77
|
+
/**
|
|
78
|
+
* android.webkit.WebChromeClient fundamentally does not support JS injection into frames other
|
|
79
|
+
* than the main frame, so these two properties are mostly here just for parity with iOS & macOS.
|
|
80
|
+
*/
|
|
81
|
+
protected boolean injectedJavaScriptForMainFrameOnly = true;
|
|
82
|
+
protected boolean injectedJavaScriptBeforeContentLoadedForMainFrameOnly = true;
|
|
83
|
+
|
|
84
|
+
protected boolean messagingEnabled = false;
|
|
85
|
+
protected @Nullable
|
|
86
|
+
String messagingModuleName;
|
|
87
|
+
protected @Nullable
|
|
88
|
+
BPCWebViewClient mBPCWebViewClient;
|
|
89
|
+
protected @Nullable
|
|
90
|
+
CatalystInstance mCatalystInstance;
|
|
91
|
+
protected boolean sendContentSizeChangeEvents = false;
|
|
92
|
+
private OnScrollDispatchHelper mOnScrollDispatchHelper;
|
|
93
|
+
protected boolean hasScrollEvent = false;
|
|
94
|
+
protected boolean nestedScrollEnabled = false;
|
|
95
|
+
protected ProgressChangedFilter progressChangedFilter;
|
|
98
96
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
/**
|
|
98
|
+
* WebView must be created with an context of the current activity
|
|
99
|
+
* <p>
|
|
100
|
+
* Activity Context is required for creation of dialogs internally by WebView
|
|
101
|
+
* Reactive Native needed for access to ReactNative internal system functionality
|
|
102
|
+
*/
|
|
103
|
+
public BPCWebView(ThemedReactContext reactContext) {
|
|
104
|
+
super(reactContext);
|
|
105
|
+
this.createCatalystInstance();
|
|
106
|
+
progressChangedFilter = new ProgressChangedFilter();
|
|
107
|
+
}
|
|
102
108
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
public void setIgnoreErrFailedForThisURL(String url) {
|
|
110
|
+
mBPCWebViewClient.setIgnoreErrFailedForThisURL(url);
|
|
111
|
+
}
|
|
106
112
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
public void setBasicAuthCredential(BPCBasicAuthCredential credential) {
|
|
114
|
+
mBPCWebViewClient.setBasicAuthCredential(credential);
|
|
115
|
+
}
|
|
110
116
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
117
|
+
public void setSendContentSizeChangeEvents(boolean sendContentSizeChangeEvents) {
|
|
118
|
+
this.sendContentSizeChangeEvents = sendContentSizeChangeEvents;
|
|
119
|
+
}
|
|
115
120
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
121
|
+
public void setHasScrollEvent(boolean hasScrollEvent) {
|
|
122
|
+
this.hasScrollEvent = hasScrollEvent;
|
|
123
|
+
}
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
+
public void setNestedScrollEnabled(boolean nestedScrollEnabled) {
|
|
126
|
+
this.nestedScrollEnabled = nestedScrollEnabled;
|
|
127
|
+
}
|
|
125
128
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
requestDisallowInterceptTouchEvent(true);
|
|
129
|
+
@Override
|
|
130
|
+
public void onHostResume() {
|
|
131
|
+
// do nothing
|
|
130
132
|
}
|
|
131
|
-
return super.onTouchEvent(event);
|
|
132
|
-
}
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
@Override
|
|
135
|
+
public void onHostPause() {
|
|
136
|
+
// do nothing
|
|
137
|
+
}
|
|
137
138
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
new ContentSizeChangeEvent(
|
|
142
|
-
this.getId(),
|
|
143
|
-
w,
|
|
144
|
-
h
|
|
145
|
-
)
|
|
146
|
-
);
|
|
139
|
+
@Override
|
|
140
|
+
public void onHostDestroy() {
|
|
141
|
+
cleanupCallbacksAndDestroy();
|
|
147
142
|
}
|
|
148
|
-
}
|
|
149
143
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
@Override
|
|
145
|
+
public boolean onTouchEvent(MotionEvent event) {
|
|
146
|
+
if (this.nestedScrollEnabled) {
|
|
147
|
+
requestDisallowInterceptTouchEvent(true);
|
|
148
|
+
}
|
|
149
|
+
return super.onTouchEvent(event);
|
|
156
150
|
}
|
|
157
|
-
}
|
|
158
151
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
152
|
+
@Override
|
|
153
|
+
protected void onSizeChanged(int w, int h, int ow, int oh) {
|
|
154
|
+
super.onSizeChanged(w, h, ow, oh);
|
|
155
|
+
|
|
156
|
+
if (sendContentSizeChangeEvents) {
|
|
157
|
+
dispatchEvent(
|
|
158
|
+
this,
|
|
159
|
+
new ContentSizeChangeEvent(
|
|
160
|
+
this.getId(),
|
|
161
|
+
w,
|
|
162
|
+
h
|
|
163
|
+
)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
166
|
}
|
|
167
|
-
}
|
|
168
167
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return mBPCWebViewClient;
|
|
172
|
-
}
|
|
168
|
+
protected @Nullable
|
|
169
|
+
List<Map<String, String>> menuCustomItems;
|
|
173
170
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
public void setMenuCustomItems(List<Map<String, String>> menuCustomItems) {
|
|
172
|
+
this.menuCustomItems = menuCustomItems;
|
|
173
|
+
}
|
|
177
174
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
175
|
+
@Override
|
|
176
|
+
public ActionMode startActionMode(ActionMode.Callback callback, int type) {
|
|
177
|
+
if(menuCustomItems == null ){
|
|
178
|
+
return super.startActionMode(callback, type);
|
|
179
|
+
}
|
|
181
180
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
return super.startActionMode(new ActionMode.Callback2() {
|
|
182
|
+
@Override
|
|
183
|
+
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
|
184
|
+
for (int i = 0; i < menuCustomItems.size(); i++) {
|
|
185
|
+
menu.add(Menu.NONE, i, i, (menuCustomItems.get(i)).get("label"));
|
|
186
|
+
}
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
@Override
|
|
191
|
+
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
189
194
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
195
|
+
@Override
|
|
196
|
+
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
|
197
|
+
WritableMap wMap = Arguments.createMap();
|
|
198
|
+
BPCWebView.this.evaluateJavascript(
|
|
199
|
+
"(function(){return {selection: window.getSelection().toString()} })()",
|
|
200
|
+
new ValueCallback<String>() {
|
|
201
|
+
@Override
|
|
202
|
+
public void onReceiveValue(String selectionJson) {
|
|
203
|
+
Map<String, String> menuItemMap = menuCustomItems.get(item.getItemId());
|
|
204
|
+
wMap.putString("label", menuItemMap.get("label"));
|
|
205
|
+
wMap.putString("key", menuItemMap.get("key"));
|
|
206
|
+
String selectionText = "";
|
|
207
|
+
try {
|
|
208
|
+
selectionText = new JSONObject(selectionJson).getString("selection");
|
|
209
|
+
} catch (JSONException ignored) {}
|
|
210
|
+
wMap.putString("selectedText", selectionText);
|
|
211
|
+
dispatchEvent(BPCWebView.this, new TopCustomMenuSelectionEvent(BPCWebView.this.getId(), wMap));
|
|
212
|
+
mode.finish();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
193
218
|
|
|
194
|
-
|
|
195
|
-
|
|
219
|
+
@Override
|
|
220
|
+
public void onDestroyActionMode(ActionMode mode) {
|
|
221
|
+
mode = null;
|
|
222
|
+
}
|
|
196
223
|
|
|
197
|
-
|
|
198
|
-
|
|
224
|
+
@Override
|
|
225
|
+
public void onGetContentRect (ActionMode mode,
|
|
226
|
+
View view,
|
|
227
|
+
Rect outRect){
|
|
228
|
+
if (callback instanceof ActionMode.Callback2) {
|
|
229
|
+
((ActionMode.Callback2) callback).onGetContentRect(mode, view, outRect);
|
|
230
|
+
} else {
|
|
231
|
+
super.onGetContentRect(mode, view, outRect);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}, type);
|
|
199
235
|
}
|
|
200
|
-
}
|
|
201
236
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
237
|
+
@Override
|
|
238
|
+
public void setWebViewClient(WebViewClient client) {
|
|
239
|
+
super.setWebViewClient(client);
|
|
240
|
+
if (client instanceof BPCWebViewClient) {
|
|
241
|
+
mBPCWebViewClient = (BPCWebViewClient) client;
|
|
242
|
+
mBPCWebViewClient.setProgressChangedFilter(progressChangedFilter);
|
|
243
|
+
}
|
|
206
244
|
}
|
|
207
245
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
246
|
+
WebChromeClient mWebChromeClient;
|
|
247
|
+
@Override
|
|
248
|
+
public void setWebChromeClient(WebChromeClient client) {
|
|
249
|
+
this.mWebChromeClient = client;
|
|
250
|
+
super.setWebChromeClient(client);
|
|
251
|
+
if (client instanceof BPCWebChromeClient) {
|
|
252
|
+
((BPCWebChromeClient) client).setProgressChangedFilter(progressChangedFilter);
|
|
253
|
+
}
|
|
214
254
|
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
public void setMessagingModuleName(String moduleName) {
|
|
218
|
-
messagingModuleName = moduleName;
|
|
219
|
-
}
|
|
220
255
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
evaluateJavascript(script, null);
|
|
224
|
-
return;
|
|
256
|
+
public WebChromeClient getWebChromeClient() {
|
|
257
|
+
return this.mWebChromeClient;
|
|
225
258
|
}
|
|
226
259
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
// UTF-8 should always be supported
|
|
231
|
-
throw new RuntimeException(e);
|
|
260
|
+
public @Nullable
|
|
261
|
+
BPCWebViewClient getBPCWebViewClient() {
|
|
262
|
+
return mBPCWebViewClient;
|
|
232
263
|
}
|
|
233
|
-
}
|
|
234
264
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
injectedJS != null &&
|
|
238
|
-
!TextUtils.isEmpty(injectedJS)) {
|
|
239
|
-
evaluateJavascriptWithFallback("(function() {\n" + injectedJS + ";\n})();");
|
|
265
|
+
public boolean getMessagingEnabled() {
|
|
266
|
+
return this.messagingEnabled;
|
|
240
267
|
}
|
|
241
|
-
}
|
|
242
268
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
269
|
+
protected BPCWebViewBridge createBPCWebViewBridge(BPCWebView webView) {
|
|
270
|
+
if (bridge == null) {
|
|
271
|
+
bridge = new BPCWebViewBridge(webView);
|
|
272
|
+
addJavascriptInterface(bridge, JAVASCRIPT_INTERFACE);
|
|
273
|
+
}
|
|
274
|
+
return bridge;
|
|
248
275
|
}
|
|
249
|
-
}
|
|
250
276
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
BPCWebView mContext = this;
|
|
277
|
+
protected void createCatalystInstance() {
|
|
278
|
+
ThemedReactContext reactContext = (ThemedReactContext) this.getContext();
|
|
254
279
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
280
|
+
if (reactContext != null) {
|
|
281
|
+
mCatalystInstance = reactContext.getCatalystInstance();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@SuppressLint("AddJavascriptInterface")
|
|
286
|
+
public void setMessagingEnabled(boolean enabled) {
|
|
287
|
+
if (messagingEnabled == enabled) {
|
|
261
288
|
return;
|
|
262
|
-
|
|
263
|
-
WritableMap data = mBPCWebViewClient.createWebViewEvent(webView, webView.getUrl());
|
|
264
|
-
data.putString("data", message);
|
|
289
|
+
}
|
|
265
290
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
291
|
+
messagingEnabled = enabled;
|
|
292
|
+
|
|
293
|
+
if (enabled) {
|
|
294
|
+
createBPCWebViewBridge(this);
|
|
271
295
|
}
|
|
272
|
-
});
|
|
273
|
-
} else {
|
|
274
|
-
WritableMap eventData = Arguments.createMap();
|
|
275
|
-
eventData.putString("data", message);
|
|
276
|
-
|
|
277
|
-
if (mCatalystInstance != null) {
|
|
278
|
-
this.sendDirectMessage("onMessage", eventData);
|
|
279
|
-
} else {
|
|
280
|
-
dispatchEvent(this, new TopMessageEvent(this.getId(), eventData));
|
|
281
|
-
}
|
|
282
296
|
}
|
|
283
|
-
}
|
|
284
297
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
WritableNativeArray params = new WritableNativeArray();
|
|
290
|
-
params.pushMap(event);
|
|
298
|
+
protected void evaluateJavascriptWithFallback(String script) {
|
|
299
|
+
evaluateJavascript(script, null);
|
|
300
|
+
}
|
|
291
301
|
|
|
292
|
-
|
|
293
|
-
|
|
302
|
+
public void callInjectedJavaScript() {
|
|
303
|
+
if (getSettings().getJavaScriptEnabled() &&
|
|
304
|
+
injectedJS != null &&
|
|
305
|
+
!TextUtils.isEmpty(injectedJS)) {
|
|
306
|
+
evaluateJavascriptWithFallback("(function() {\n" + injectedJS + ";\n})();");
|
|
307
|
+
}
|
|
308
|
+
}
|
|
294
309
|
|
|
295
|
-
|
|
296
|
-
|
|
310
|
+
public void callInjectedJavaScriptBeforeContentLoaded() {
|
|
311
|
+
if (getSettings().getJavaScriptEnabled() &&
|
|
312
|
+
injectedJSBeforeContentLoaded != null &&
|
|
313
|
+
!TextUtils.isEmpty(injectedJSBeforeContentLoaded)) {
|
|
314
|
+
evaluateJavascriptWithFallback("(function() {\n" + injectedJSBeforeContentLoaded + ";\n})();");
|
|
315
|
+
}
|
|
316
|
+
}
|
|
297
317
|
|
|
298
|
-
|
|
299
|
-
|
|
318
|
+
public void setInjectedJavaScriptObject(String obj) {
|
|
319
|
+
if (getSettings().getJavaScriptEnabled()) {
|
|
320
|
+
BPCWebViewBridge b = createBPCWebViewBridge(this);
|
|
321
|
+
b.setInjectedObjectJson(obj);
|
|
322
|
+
}
|
|
300
323
|
}
|
|
301
324
|
|
|
302
|
-
|
|
303
|
-
|
|
325
|
+
public void onMessage(String message) {
|
|
326
|
+
ThemedReactContext reactContext = getThemedReactContext();
|
|
327
|
+
BPCWebView mWebView = this;
|
|
328
|
+
|
|
329
|
+
if (mBPCWebViewClient != null) {
|
|
330
|
+
WebView webView = this;
|
|
331
|
+
webView.post(new Runnable() {
|
|
332
|
+
@Override
|
|
333
|
+
public void run() {
|
|
334
|
+
if (mBPCWebViewClient == null) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
WritableMap data = mBPCWebViewClient.createWebViewEvent(webView, webView.getUrl());
|
|
338
|
+
data.putString("data", message);
|
|
339
|
+
|
|
340
|
+
if (mCatalystInstance != null) {
|
|
341
|
+
mWebView.sendDirectMessage("onMessage", data);
|
|
342
|
+
} else {
|
|
343
|
+
dispatchEvent(webView, new TopMessageEvent(webView.getId(), data));
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
} else {
|
|
348
|
+
WritableMap eventData = Arguments.createMap();
|
|
349
|
+
eventData.putString("data", message);
|
|
350
|
+
|
|
351
|
+
if (mCatalystInstance != null) {
|
|
352
|
+
this.sendDirectMessage("onMessage", eventData);
|
|
353
|
+
} else {
|
|
354
|
+
dispatchEvent(this, new TopMessageEvent(this.getId(), eventData));
|
|
355
|
+
}
|
|
356
|
+
}
|
|
304
357
|
}
|
|
305
358
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
mOnScrollDispatchHelper.getXFlingVelocity(),
|
|
313
|
-
mOnScrollDispatchHelper.getYFlingVelocity(),
|
|
314
|
-
this.computeHorizontalScrollRange(),
|
|
315
|
-
this.computeVerticalScrollRange(),
|
|
316
|
-
this.getWidth(),
|
|
317
|
-
this.getHeight());
|
|
359
|
+
protected void sendDirectMessage(final String method, WritableMap data) {
|
|
360
|
+
WritableNativeMap event = new WritableNativeMap();
|
|
361
|
+
event.putMap("nativeEvent", data);
|
|
362
|
+
|
|
363
|
+
WritableNativeArray params = new WritableNativeArray();
|
|
364
|
+
params.pushMap(event);
|
|
318
365
|
|
|
319
|
-
|
|
366
|
+
mCatalystInstance.callFunction(messagingModuleName, method, params);
|
|
320
367
|
}
|
|
321
|
-
}
|
|
322
368
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
EventDispatcher eventDispatcher =
|
|
326
|
-
reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher();
|
|
327
|
-
eventDispatcher.dispatchEvent(event);
|
|
328
|
-
}
|
|
369
|
+
protected void onScrollChanged(int x, int y, int oldX, int oldY) {
|
|
370
|
+
super.onScrollChanged(x, y, oldX, oldY);
|
|
329
371
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
372
|
+
if (!hasScrollEvent) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (mOnScrollDispatchHelper == null) {
|
|
377
|
+
mOnScrollDispatchHelper = new OnScrollDispatchHelper();
|
|
378
|
+
}
|
|
334
379
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
380
|
+
if (mOnScrollDispatchHelper.onScrollChanged(x, y)) {
|
|
381
|
+
ScrollEvent event = ScrollEvent.obtain(
|
|
382
|
+
this.getId(),
|
|
383
|
+
ScrollEventType.SCROLL,
|
|
384
|
+
x,
|
|
385
|
+
y,
|
|
386
|
+
mOnScrollDispatchHelper.getXFlingVelocity(),
|
|
387
|
+
mOnScrollDispatchHelper.getYFlingVelocity(),
|
|
388
|
+
this.computeHorizontalScrollRange(),
|
|
389
|
+
this.computeVerticalScrollRange(),
|
|
390
|
+
this.getWidth(),
|
|
391
|
+
this.getHeight());
|
|
392
|
+
|
|
393
|
+
dispatchEvent(this, event);
|
|
394
|
+
}
|
|
339
395
|
}
|
|
340
|
-
super.destroy();
|
|
341
|
-
}
|
|
342
396
|
|
|
343
|
-
|
|
344
|
-
|
|
397
|
+
protected void dispatchEvent(WebView webView, Event event) {
|
|
398
|
+
ThemedReactContext reactContext = getThemedReactContext();
|
|
399
|
+
int reactTag = webView.getId();
|
|
400
|
+
UIManagerHelper.getEventDispatcherForReactTag(reactContext, reactTag).dispatchEvent(event);
|
|
401
|
+
}
|
|
345
402
|
|
|
346
|
-
|
|
347
|
-
|
|
403
|
+
protected void cleanupCallbacksAndDestroy() {
|
|
404
|
+
setWebViewClient(null);
|
|
405
|
+
destroy();
|
|
348
406
|
}
|
|
349
407
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
mContext.onMessage(message);
|
|
408
|
+
@Override
|
|
409
|
+
public void destroy() {
|
|
410
|
+
if (mWebChromeClient != null) {
|
|
411
|
+
mWebChromeClient.onHideCustomView();
|
|
412
|
+
}
|
|
413
|
+
super.destroy();
|
|
357
414
|
}
|
|
415
|
+
|
|
416
|
+
public ThemedReactContext getThemedReactContext() {
|
|
417
|
+
return (ThemedReactContext) this.getContext();
|
|
358
418
|
}
|
|
359
419
|
|
|
360
|
-
protected
|
|
361
|
-
|
|
420
|
+
protected class BPCWebViewBridge {
|
|
421
|
+
private String TAG = "BPCWebViewBridge";
|
|
422
|
+
BPCWebView mWebView;
|
|
423
|
+
String injectedObjectJson;
|
|
424
|
+
|
|
425
|
+
BPCWebViewBridge(BPCWebView c) {
|
|
426
|
+
mWebView = c;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
public void setInjectedObjectJson(String s) {
|
|
430
|
+
injectedObjectJson = s;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* This method is called whenever JavaScript running within the web view calls:
|
|
435
|
+
* - window[JAVASCRIPT_INTERFACE].postMessage
|
|
436
|
+
*/
|
|
437
|
+
@JavascriptInterface
|
|
438
|
+
public void postMessage(String message) {
|
|
439
|
+
if (mWebView.getMessagingEnabled()) {
|
|
440
|
+
mWebView.onMessage(message);
|
|
441
|
+
} else {
|
|
442
|
+
FLog.w(TAG, "ReactNativeWebView.postMessage method was called but messaging is disabled. Pass an onMessage handler to the WebView.");
|
|
443
|
+
}
|
|
444
|
+
}
|
|
362
445
|
|
|
363
|
-
|
|
364
|
-
|
|
446
|
+
@JavascriptInterface
|
|
447
|
+
public String injectedObjectJson() { return injectedObjectJson; }
|
|
365
448
|
}
|
|
366
449
|
|
|
367
|
-
|
|
368
|
-
|
|
450
|
+
|
|
451
|
+
protected static class ProgressChangedFilter {
|
|
452
|
+
private boolean waitingForCommandLoadUrl = false;
|
|
453
|
+
|
|
454
|
+
public void setWaitingForCommandLoadUrl(boolean isWaiting) {
|
|
455
|
+
waitingForCommandLoadUrl = isWaiting;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
public boolean isWaitingForCommandLoadUrl() {
|
|
459
|
+
return waitingForCommandLoadUrl;
|
|
460
|
+
}
|
|
369
461
|
}
|
|
370
|
-
}
|
|
371
462
|
}
|