react-native-minimal-webview 1.2.0 → 1.3.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.
Files changed (98) hide show
  1. package/README.md +35 -31
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/expo/modules/minimalwebview/Asks.kt +5 -11
  4. package/android/src/main/java/expo/modules/minimalwebview/Hooks.kt +17 -11
  5. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebView.kt +83 -125
  6. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewClients.kt +16 -31
  7. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewModule.kt +18 -19
  8. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewNavigation.kt +24 -38
  9. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewScripts.kt +24 -36
  10. package/android/src/main/java/expo/modules/minimalwebview/NavigationRules.kt +19 -20
  11. package/android/src/main/java/expo/modules/minimalwebview/PlatformSettings.kt +41 -37
  12. package/android/src/main/java/expo/modules/minimalwebview/PullToRefresh.kt +14 -18
  13. package/android/src/main/java/expo/modules/minimalwebview/requests/Downloads.kt +12 -23
  14. package/android/src/main/java/expo/modules/minimalwebview/requests/FileUpload.kt +0 -1
  15. package/android/src/main/java/expo/modules/minimalwebview/requests/FullscreenVideo.kt +1 -4
  16. package/android/src/main/java/expo/modules/minimalwebview/requests/Permissions.kt +34 -24
  17. package/build/WebView.d.ts +11 -2
  18. package/build/WebView.d.ts.map +1 -1
  19. package/build/WebView.js +45 -71
  20. package/build/WebView.js.map +1 -1
  21. package/build/bridge/createBridge.d.ts +1 -5
  22. package/build/bridge/createBridge.d.ts.map +1 -1
  23. package/build/bridge/createBridge.js +3 -15
  24. package/build/bridge/createBridge.js.map +1 -1
  25. package/build/bridge/endpoint.d.ts +1 -2
  26. package/build/bridge/endpoint.d.ts.map +1 -1
  27. package/build/bridge/endpoint.js +5 -6
  28. package/build/bridge/endpoint.js.map +1 -1
  29. package/build/bridge/matchesOrigin.d.ts +11 -0
  30. package/build/bridge/matchesOrigin.d.ts.map +1 -0
  31. package/build/bridge/matchesOrigin.js +26 -0
  32. package/build/bridge/matchesOrigin.js.map +1 -0
  33. package/build/bridge/origins.d.ts +2 -13
  34. package/build/bridge/origins.d.ts.map +1 -1
  35. package/build/bridge/origins.js +1 -30
  36. package/build/bridge/origins.js.map +1 -1
  37. package/build/bridge/pageClient.generated.d.ts +1 -1
  38. package/build/bridge/pageClient.generated.d.ts.map +1 -1
  39. package/build/bridge/pageClient.generated.js +2 -2
  40. package/build/bridge/pageClient.generated.js.map +1 -1
  41. package/build/bridge/protocol.d.ts +3 -5
  42. package/build/bridge/protocol.d.ts.map +1 -1
  43. package/build/bridge/protocol.js +12 -14
  44. package/build/bridge/protocol.js.map +1 -1
  45. package/build/index.d.ts +1 -1
  46. package/build/index.js +1 -1
  47. package/build/navigationRules.d.ts +0 -5
  48. package/build/navigationRules.d.ts.map +1 -1
  49. package/build/navigationRules.js +3 -12
  50. package/build/navigationRules.js.map +1 -1
  51. package/build/reactNativeWebViewDefaults.d.ts +0 -4
  52. package/build/reactNativeWebViewDefaults.d.ts.map +1 -1
  53. package/build/reactNativeWebViewDefaults.js +0 -4
  54. package/build/reactNativeWebViewDefaults.js.map +1 -1
  55. package/build/reactNativeWebViewMessages.d.ts.map +1 -1
  56. package/build/reactNativeWebViewMessages.js +0 -1
  57. package/build/reactNativeWebViewMessages.js.map +1 -1
  58. package/build/refStore.d.ts +0 -2
  59. package/build/refStore.d.ts.map +1 -1
  60. package/build/refStore.js +0 -6
  61. package/build/refStore.js.map +1 -1
  62. package/build/types.d.ts +55 -39
  63. package/build/types.d.ts.map +1 -1
  64. package/ios/Asks.swift +6 -9
  65. package/ios/DelegateProxy.swift +4 -18
  66. package/ios/DownloadName.swift +0 -2
  67. package/ios/Downloads.swift +0 -2
  68. package/ios/Hooks.swift +4 -6
  69. package/ios/Loads.swift +37 -19
  70. package/ios/MinimalWebView+Dialogs.swift +5 -7
  71. package/ios/MinimalWebView+Navigation.swift +23 -49
  72. package/ios/MinimalWebView+Scripts.swift +10 -17
  73. package/ios/MinimalWebView.podspec +1 -2
  74. package/ios/MinimalWebView.swift +63 -128
  75. package/ios/MinimalWebViewModule.swift +1 -18
  76. package/ios/NavigationRules.swift +2 -9
  77. package/ios/OriginRules.swift +4 -13
  78. package/ios/PlatformSettings.swift +9 -30
  79. package/ios/ReadAccess.swift +0 -2
  80. package/ios/Records.swift +18 -0
  81. package/ios/Recovery.swift +2 -8
  82. package/ios/SharedCookies.swift +10 -25
  83. package/mocks/MinimalWebView.ts +5 -0
  84. package/package.json +11 -10
  85. package/src/WebView.tsx +58 -80
  86. package/src/bridge/createBridge.ts +5 -20
  87. package/src/bridge/endpoint.ts +6 -9
  88. package/src/bridge/matchesOrigin.ts +27 -0
  89. package/src/bridge/origins.ts +2 -30
  90. package/src/bridge/pageClient.generated.ts +2 -2
  91. package/src/bridge/pageClient.ts +1 -7
  92. package/src/bridge/protocol.ts +16 -18
  93. package/src/index.ts +1 -1
  94. package/src/navigationRules.ts +6 -12
  95. package/src/reactNativeWebViewDefaults.ts +0 -4
  96. package/src/reactNativeWebViewMessages.ts +0 -1
  97. package/src/refStore.ts +0 -7
  98. package/src/types.ts +55 -39
package/build/types.d.ts CHANGED
@@ -5,6 +5,7 @@ import type { AndroidSettingKeys, CGPoint, CGRect, CGSize, IOSSettingKeys, UIEdg
5
5
  /**
6
6
  * What the WebView loads: a URL, or an HTML string.
7
7
  * @see [Local files example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#local-files)
8
+ * @see [Bundled page folder example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#load-a-bundled-page-folder)
8
9
  * @group WebView
9
10
  */
10
11
  export type WebViewSource = {
@@ -195,7 +196,7 @@ export type NavigationState = {
195
196
  * - `failed`: a network or SSL error, or a renderer crash, cut it off.
196
197
  * - `cancelled`: it never showed a page (a stop before the response, a download, a 204, a redirect the rules blocked,
197
198
  * a load a newer one replaced); a stop after the page arrived is `cancelled` on iOS but `finished` on Android, and
198
- * a 204 is `finished` on iOS 17. On iOS a load replaced before it commits doesn't end: `loading` stays true and
199
+ * a 204 is `finished` below iOS 26.2. On iOS a load replaced before it commits doesn't end: `loading` stays true and
199
200
  * the newer load's outcome ends both.
200
201
  *
201
202
  * On Android with an Android System WebView older than 146, a load that never commits changes nothing here.
@@ -236,8 +237,8 @@ export type ProcessGoneEvent = {
236
237
  * the app is not in the background; a `load()`, `reload()` or new `source` meanwhile loads instead.
237
238
  *
238
239
  * - iOS: in place.
239
- * - Android: in a new WebView. The history is restored unless the `source` page was on screen. The props are
240
- * applied again, but not what `call` set.
240
+ * - Android: in a new WebView. The history is restored, unless the `source` page was on screen and reloads. The
241
+ * props are applied again, but not what `call` set.
241
242
  *
242
243
  * It is false when:
243
244
  *
@@ -513,8 +514,11 @@ export type Download = {
513
514
  * - `network`: connecting or reading the response failed, or a redirect was refused.
514
515
  * - `http`: the response had an error status (Android only: iOS saves what the server sent).
515
516
  * - `data` (the content): a bad `data:` or `blob:` URL, the page not reading its blob, an unsupported scheme, or
516
- * (Android) a file above 100 MB or a `blob:` URL the main frame can't read (a cross-origin iframe's, or one already
517
+ * (Android) a file above 100 MiB or a `blob:` URL the main frame can't read (a cross-origin iframe's, or one already
517
518
  * revoked).
519
+ *
520
+ * On Android a disk error while saving, such as a full disk, is `network` for an http(s) download and `data` for a
521
+ * `data:` or `blob:` one.
518
522
  * @group Page requests
519
523
  */
520
524
  export type DownloadFailure = {
@@ -592,7 +596,9 @@ export type IOSPrivateSettingKeys = {
592
596
  * `webView.opaque`, is skipped the same way: set it with `call('webView.setOpaque:', [false])`.
593
597
  *
594
598
  * A root's default keys are the package's, and yours go over them. A key the package doesn't set keeps WebKit's
595
- * default; a key you remove goes back to the value it had before you first set it.
599
+ * default; a key you remove goes back to the value it had before you first set it. For
600
+ * `webView.underPageBackgroundColor`, which WebKit derives from the page, that value is the color derived then, and it
601
+ * stays: set the key to `null` instead of removing it to go back to WebKit's default.
596
602
  *
597
603
  * WebKit has no mixed-content setting: it applies its own policy.
598
604
  * @ios
@@ -660,7 +666,8 @@ export type AndroidSettings = {
660
666
  *
661
667
  * - On: `javaScriptEnabled`, `domStorageEnabled`, `supportMultipleWindows`, `builtInZoomControls`,
662
668
  * `useWideViewPort`, `loadWithOverviewMode` and, with Android System WebView 146 and newer,
663
- * `backForwardCacheEnabled`.
669
+ * `backForwardCacheEnabled`. Older ones refuse `backForwardCacheEnabled: true`, in this prop and in `call`:
670
+ * a page restored from the cache there reports no load end.
664
671
  * - Off: `allowFileAccess`, `allowContentAccess`, `displayZoomControls` and `downloadFaviconsEnabled`.
665
672
  * - `mixedContentMode`: `MIXED_CONTENT_NEVER_ALLOW`.
666
673
  *
@@ -692,7 +699,8 @@ export type HookEvent<N extends string = string, P = Record<string, unknown>> =
692
699
  *
693
700
  * A package with a native hook exports a function that returns one, so that an app turns the hook on by putting it in
694
701
  * `extensions`.
695
- * @typeParam E - The hook's events, to type `onEvent`: a union of {@link HookEvent}s, which nothing checks at runtime.
702
+ * @typeParam E - The hook's events, to type `onEvent` and `onAsk`: a union of {@link HookEvent}s, which nothing checks
703
+ * at runtime.
696
704
  * @see [Native hooks guide](https://rasmuskard.github.io/react-native-minimal-webview/guides/native-hooks/)
697
705
  * @group Native hooks
698
706
  */
@@ -712,14 +720,19 @@ export type HookExtension<E extends HookEvent = HookEvent> = {
712
720
  */
713
721
  options?: unknown;
714
722
  /**
715
- * Each of the hook's events: it goes to the extension with the hook's key, and one no extension owns is dropped. For
716
- * an `ask`, the return value (a promise is awaited) is the answer, and `undefined`, or a value JSON can't encode,
717
- * answers null. `signal` is set only for an `ask`, and aborts when the core stops waiting for the answer: an ask has
718
- * no timeout, but one still open when the page goes away is answered null.
723
+ * Each of the hook's events: it goes to the extension with the hook's key, and one no extension owns is dropped. An
724
+ * `ask` goes to {@link HookExtension.onAsk} instead when the extension has one; without it, an `ask` comes here with
725
+ * `signal` set, and the return value is the answer as `onAsk` describes. `signal` is undefined for an `emit`.
719
726
  *
720
- * The latest `onEvent` always takes the events: a render with new handlers sends the core nothing.
727
+ * The latest `onEvent` and `onAsk` always take the events: a render with new handlers sends the core nothing.
721
728
  */
722
729
  onEvent?(event: E, signal?: AbortSignal): unknown;
730
+ /**
731
+ * Each of the hook's asks, in place of {@link HookExtension.onEvent}. The return value (a promise is awaited) is the
732
+ * answer, and `undefined`, or a value JSON can't encode, answers null. `signal` aborts when the core stops waiting
733
+ * for the answer: an ask has no timeout, but one still open when the page goes away is answered null.
734
+ */
735
+ onAsk?(event: E, signal: AbortSignal): unknown;
723
736
  };
724
737
  /**
725
738
  * A fullscreen change, for `onFullscreenChange`.
@@ -771,35 +784,33 @@ export type CodedError = Error & {
771
784
  code: ErrorCode;
772
785
  };
773
786
  /**
774
- * What the WebView loads, its settings, and the callbacks for its events and the page's requests.
787
+ * The props of `<WebView>`, of which only `source` is required.
775
788
  *
776
- * The ones from React Native's `ViewProps` (`style`, `testID`, `nativeID`, the accessibility props, layout and touch
777
- * events) go to the native view.
789
+ * React Native's `ViewProps` (`style`, `testID`, `nativeID`, the accessibility props, layout and touch events) go to
790
+ * the native view.
778
791
  *
779
792
  * Every `on…` callback is read when its event or request comes, so adding, changing or removing one applies to the
780
- * next, and a request without one gets the default described on its prop.
781
- *
782
- * One that answers a request and throws (or rejects) is logged with `console.error` and gives the refusing answer:
793
+ * next. A request without its callback gets the default its prop describes; one whose callback throws or rejects is
794
+ * logged with `console.error` and gets the refusing answer:
783
795
  *
784
796
  * - `onNavigationRequest`: `block`
785
797
  * - `onOpenExternal`: null (the core opens nothing)
786
798
  * - `onFileRequest`: cancel
787
799
  * - `onPermissionRequest`: deny
788
- * - an extension's `onEvent`: null
800
+ * - an extension's `onAsk` or `onEvent`: null
789
801
  *
790
802
  * The `signal` such a callback gets aborts when the core stops waiting for its answer (the page moved on, crashed or
791
803
  * unmounted), and a late answer is dropped.
792
804
  *
793
- * JS dialogs (`alert`, `confirm`, `prompt`) and HTTP auth have no prop.
805
+ * JS dialogs (`alert`, `confirm`, `prompt`) and HTTP auth have no prop: `dialogs` and `basicAuthCredential` of
806
+ * `@react-native-minimal-webview/extensions` take them over, or a native hook does. Without one:
794
807
  *
795
808
  * - iOS dialogs: a `UIAlertController` titled with the frame's host, or `JavaScript` for a frame without one
796
809
  * (`data:`, sandboxed, `file:`). One shows at a time; one that comes while another shows is cancelled.
797
- * - Android dialogs: WebView's own.
810
+ * - Android dialogs: WebView's own. One still on screen when its WebView unmounts stays there, and a WebView older
811
+ * than 149 then gets no touches until the app restarts. The `dialogs` extension shows no native dialog.
798
812
  * - HTTP auth: cancelled on Android. On iOS WebKit's default handling applies, so without a stored credential the
799
813
  * site's 401 page shows.
800
- *
801
- * `dialogs` and `basicAuthCredential` of `@react-native-minimal-webview/extensions` take them over, or a native hook
802
- * does.
803
814
  * @sortStrategy source-order
804
815
  * @group WebView
805
816
  */
@@ -912,8 +923,9 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
912
923
  * A false, null or undefined entry is left out, so `on && extension(…)` switches one on and off; see
913
924
  * {@link HookExtension.options} for what off means. A hook attaches when its key first appears, and a later change of
914
925
  * its `options` reaches it live, without recreating the WebView. A key turned on after the WebView was created
915
- * attaches its hook then, unless the hook has a `configure` step or its own WebView class (`webViewClass`,
916
- * `webViewFactory`): that one attaches only to a WebView mounted with its key on, and a warning says so.
926
+ * attaches its hook then, unless the hook attaches only to a WebView mounted with its key on, and a warning says so.
927
+ * The [guide's Lifecycle table](https://rasmuskard.github.io/react-native-minimal-webview/guides/native-hooks/#lifecycle)
928
+ * says which hooks do.
917
929
  * @see [Native hooks guide](https://rasmuskard.github.io/react-native-minimal-webview/guides/native-hooks/)
918
930
  */
919
931
  extensions?: readonly (HookExtension | false | null | undefined)[];
@@ -933,8 +945,9 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
933
945
  * for it;
934
946
  * - the WebView into `HTTPCookieStorage` on every cookie change, deletions included, as it happens.
935
947
  *
936
- * Android needs nothing: `CookieManager` is shared app-wide, and flushed when the app goes to the background. A
937
- * WebView on another `android.webView.profile` has that profile's cookies instead.
948
+ * Android needs nothing: `CookieManager` is shared app-wide, React Native's `fetch` uses it too, and it is flushed
949
+ * when the app goes to the background. A WebView on another `android.webView.profile` has that profile's cookies
950
+ * instead.
938
951
  * @default `false`
939
952
  * @ios
940
953
  * @see [Cookies example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#cookies)
@@ -1024,13 +1037,17 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
1024
1037
  * with an Android System WebView older than 146, an SSL error on a back/forward load isn't reported.
1025
1038
  *
1026
1039
  * A renderer crash isn't reported here: it makes the cut-off load's `outcome` `failed` and calls `onProcessGone`.
1040
+ *
1041
+ * On Android it also gets a `network` error with code `-1` when no WebView can be made, because Android System
1042
+ * WebView is missing, disabled or updating; {@link WebViewRef.reload | reload()} tries again.
1027
1043
  * @see [Loading and error screens example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#loading-and-error-screens)
1028
1044
  */
1029
1045
  onError?: (event: LoadErrorEvent) => void;
1030
1046
  /**
1031
1047
  * The renderer died; see {@link ProcessGoneEvent} for the recovery.
1032
1048
  *
1033
- * Android's WebViews share one renderer, so each of them reports its death.
1049
+ * Android's WebViews share one renderer, so each of them reports its death. On Android it comes before the
1050
+ * {@link WebViewProps.onLoadEnd | onLoadEnd} that fails a load the crash cut off after it committed.
1034
1051
  */
1035
1052
  onProcessGone?: (event: ProcessGoneEvent) => void;
1036
1053
  /** {@link NavigationState.loading | loading} went true. */
@@ -1121,13 +1138,14 @@ export type WebViewRef = {
1121
1138
  */
1122
1139
  get(key: string): Promise<unknown>;
1123
1140
  /**
1124
- * Calls a platform method, `root.method`, and resolves with its result through JSON. It acts on the WebView as it is
1125
- * when the call arrives: a navigation doesn't reject it.
1141
+ * Calls a platform method, `root.method`, with `args`, and resolves with its result through JSON.
1126
1142
  *
1127
- * The roots are those of {@link WebViewRef.get | get}. On Android `method` is a public method of the root's object;
1128
- * on iOS an Objective-C selector.
1143
+ * The roots are those of {@link WebViewRef.get | get}. On iOS `method` is an Objective-C selector; on Android a
1144
+ * public method of the root's object. Leave a trailing completion handler (iOS) or `ValueCallback` (Android) out of
1145
+ * `args`: the call resolves with what it reports, or on iOS rejects with its error.
1129
1146
  *
1130
- * Rejects with a {@link CodedError}: `not_found`, `unavailable` or `native_error`.
1147
+ * It acts on the WebView as it is when the call arrives: a navigation doesn't reject it. Rejects with a
1148
+ * {@link CodedError}: `not_found`, `unavailable` or `native_error`.
1131
1149
  *
1132
1150
  * The core owns, and so rejects:
1133
1151
  *
@@ -1139,11 +1157,9 @@ export type WebViewRef = {
1139
1157
  * `resumeTimers`, `evaluateJavascript` and remote debugging
1140
1158
  * ({@link AndroidWebView.setWebContentsDebuggingEnabled}).
1141
1159
  *
1142
- * A trailing completion handler (iOS) or `ValueCallback` (Android) is left out of `args`: the call resolves with what
1143
- * it reports, or on iOS rejects with its error. On iOS, a selector whose completion handler isn't in this package's
1144
- * SDK headers, or reports something other than an object, an error or an integer, rejects with `native_error`. On
1145
- * Android, a method that takes `args` as they are wins over one that also takes a callback, and a `null` in the
1146
- * callback's place passes none.
1160
+ * On iOS, a selector whose completion handler isn't in this package's SDK headers, or reports something other than
1161
+ * an object, an error or an integer, rejects with `native_error`. On Android, a method that takes `args` as they are
1162
+ * wins over one that also takes a callback, and a `null` in the callback's place passes none.
1147
1163
  *
1148
1164
  * One mistake the signature can't catch crashes the app: on iOS an object argument of the wrong class, and on Android
1149
1165
  * a `null` listener or callback other than the trailing `ValueCallback`, once WebView calls it. For a method that
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,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ACvB;;;;;OAKG;IACH,MAAM,IAAI,IAAI,CAAC;IACf,iEAAiE;IACjE,SAAS,IAAI,IAAI,CAAC;IAClB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,MAAM,IAAI,IAAI,CAAC;IACf,6FAA6F;IAC7F,WAAW,IAAI,IAAI,CAAC;IACpB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzD;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACxE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,kEAAkE;IAClE,QAAQ,IAAI,eAAe,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC7C,CAAC"}
package/ios/Asks.swift CHANGED
@@ -1,23 +1,20 @@
1
- /// Every `ask` (a page request, a navigation request or a hook's) waits here, by id, until JS answers it through
2
- /// `answer` or native gives up (nil, and the core's `askCancelled` to JS): a Document end or a timeout. `send` puts an event
3
- /// on the view's `onHookEvent`, which reaches the app's extensions' `onEvent`. Main thread only.
1
+ @MainActor
4
2
  final class Asks {
5
3
  private let send: ([String: Any]) -> Void
6
4
  private var pending: [Int: (Any?) -> Void] = [:]
7
5
  private var nextId = 0
8
- /// The view closed: JS is unmounted, and a hook may still hold its context.
9
6
  private var closed = false
10
7
 
11
8
  init(send: @escaping ([String: Any]) -> Void) {
12
9
  self.send = send
13
10
  }
14
11
 
15
- /// Sends the ask to JS and returns its id, for `cancel`. Once the view closed it answers nil at once.
12
+ /// Sends the ask to JS and returns its id, for `cancel`. Once the view closed it answers nil at once and returns nil.
16
13
  @discardableResult
17
- func ask(_ key: String, _ name: String, _ payload: [String: Any], _ onAnswer: @escaping (Any?) -> Void) -> Int {
14
+ func ask(_ key: String, _ name: String, _ payload: [String: Any], _ onAnswer: @escaping (Any?) -> Void) -> Int? {
18
15
  guard !closed else {
19
16
  onAnswer(nil)
20
- return 0 // no ask: cancel(0) finds nothing
17
+ return nil
21
18
  }
22
19
  nextId += 1
23
20
  pending[nextId] = onAnswer
@@ -25,7 +22,7 @@ final class Asks {
25
22
  return nextId
26
23
  }
27
24
 
28
- /// JS's answer. One for an ask that was answered or cancelled already is dropped.
25
+ /// An answer for an ask that was answered or cancelled already is dropped.
29
26
  func answer(_ id: Int, _ value: Any?) {
30
27
  pending.removeValue(forKey: id)?(value)
31
28
  }
@@ -37,7 +34,7 @@ final class Asks {
37
34
  onAnswer(nil)
38
35
  }
39
36
 
40
- /// Cancels every pending ask. At closing JS isn't told: it aborts its own handlers at unmount.
37
+ /// Cancels every pending ask, telling JS unless the view is closing.
41
38
  func documentEnded(_ reason: DocumentEnd) {
42
39
  if reason == .closing { closed = true }
43
40
  pending.keys.forEach { cancel($0, tell: reason != .closing) }
@@ -1,20 +1,15 @@
1
1
  import WebKit
2
2
 
3
- /// The WKWebView's navigation and UI delegate. It implements the observation callbacks the core doesn't, to give them
4
- /// to every hook delegate, and the authentication challenge, to offer it to each in turn; every other callback is
5
- /// forwarded to the core (MinimalWebView) or to a hook delegate, by the rule in `WebViewContext`. `responds(to:)` says
6
- /// yes for whatever any of them implements, which WebKit reads once, when the proxy is assigned as the delegate.
7
3
  final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
8
4
  private weak var core: NSObject?
9
5
  var navigationDelegates: [WKNavigationDelegate] = []
10
6
  var uiDelegates: [WKUIDelegate] = []
7
+ var hookDecides: (WKNavigationAction) -> Void = { _ in }
11
8
 
12
9
  init(core: NSObject) {
13
10
  self.core = core
14
11
  }
15
12
 
16
- /// The hook delegates for a callback: the list of the protocol that declares it. A selector neither protocol declares
17
- /// (a private one) goes to both lists.
18
13
  private func delegates(for selector: Selector) -> [NSObject] {
19
14
  let navigation = Self.declares(WKNavigationDelegate.self, selector)
20
15
  let ui = Self.declares(WKUIDelegate.self, selector)
@@ -78,9 +73,7 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
78
73
 
79
74
  private static let challenge = NSSelectorFromString("webView:didReceiveAuthenticationChallenge:completionHandler:")
80
75
 
81
- /// The action policy, a decision the first navigation delegate that implements either variant owns, else the core.
82
- /// WebKit calls only this variant once the delegate answers it, so the proxy answers it always and calls the owner's
83
- /// own variant, which makes the order of the list decide whichever variants the delegates implement.
76
+ /// WebKit calls only this variant when the delegate implements it: the proxy always does, and calls the owner's own.
84
77
  func webView(
85
78
  _ webView: WKWebView,
86
79
  decidePolicyFor navigationAction: WKNavigationAction,
@@ -88,6 +81,7 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
88
81
  decisionHandler: @escaping @MainActor (WKNavigationActionPolicy, WKWebpagePreferences) -> Void
89
82
  ) {
90
83
  let owner = takers(of: Self.actionPolicy).first
84
+ if owner != nil { hookDecides(navigationAction) }
91
85
  if let owner, owner.responds(to: Self.actionPolicyWithPreferences) {
92
86
  (owner as? WKNavigationDelegate)?.webView?(
93
87
  webView, decidePolicyFor: navigationAction, preferences: preferences, decisionHandler: decisionHandler)
@@ -101,16 +95,12 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
101
95
  private static let actionPolicyWithPreferences =
102
96
  NSSelectorFromString("webView:decidePolicyForNavigationAction:preferences:decisionHandler:")
103
97
 
104
- /// The hook delegates that implement a decision, in order: the first one takes it.
105
98
  private func takers(of decision: Selector) -> [NSObject] {
106
99
  delegates(for: decision).filter {
107
100
  $0.responds(to: decision) || decision == Self.actionPolicy && $0.responds(to: Self.actionPolicyWithPreferences)
108
101
  }
109
102
  }
110
103
 
111
- /// The warnings about the decisions the hook delegates take that this proxy hasn't given yet: one for a decision
112
- /// more than one of them implements, as only the first one gets it, and one for a decision the core makes from the
113
- /// app's props or their defaults, naming what stops applying.
114
104
  func newWarnings() -> [String] {
115
105
  Self.decisions.flatMap { decision, lost in
116
106
  let name = NSStringFromSelector(decision)
@@ -124,8 +114,6 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
124
114
 
125
115
  private var warned: Set<String> = []
126
116
 
127
- /// The decision callbacks: a hook delegate that implements one owns it, and `lost` is what stops applying when the
128
- /// core makes it from the props. WebKit never asks for the plain action policy, as the proxy answers the other variant.
129
117
  private static let decisions: [(selector: Selector, lost: String?)] = [
130
118
  (actionPolicy, "navigationRules, their defaults and onNavigationRequest don't apply to navigations"),
131
119
  (
@@ -146,13 +134,11 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
146
134
  ]
147
135
  }
148
136
 
149
- /// Hooks whose keys turn on together attach in registration order, which orders their delegates.
150
137
  func inRegistrationOrder(_ keys: Set<String>, _ registered: [String]) -> [String] {
151
138
  registered.filter(keys.contains) + keys.subtracting(registered).sorted()
152
139
  }
153
140
 
154
- /// Whether a `hookOptions` change leaves the hook on with the same value, so its hook has nothing to hear. Both values
155
- /// must be on, and equal as JSON: `NSNumber(false).isEqual(NSNumber(0))` is true, at any depth, as Android's isn't.
141
+ /// `NSNumber(false).isEqual(NSNumber(0))` is true, so the values compare as JSON.
156
142
  func staysOn(_ was: Any?, _ value: Any?) -> Bool {
157
143
  guard let was, let value else { return false }
158
144
  let json = { (value: Any) in try? JSONSerialization.data(withJSONObject: value, options: [.fragmentsAllowed, .sortedKeys]) }
@@ -1,8 +1,6 @@
1
1
  import Foundation
2
2
 
3
- /// The name a download is saved under, in a directory of its own.
4
3
  enum DownloadName {
5
- /// `suggested` with each `/` replaced by `_`; a result that is empty, `.` or `..` becomes `download`, as on Android (`URLUtilCompat.guessFileName`, then `Downloads.safeName`).
6
4
  static func safe(_ suggested: String) -> String {
7
5
  let name = suggested.replacingOccurrences(of: "/", with: "_")
8
6
  return name.isEmpty || name == "." || name == ".." ? "download" : name
@@ -1,6 +1,5 @@
1
1
  import WebKit
2
2
 
3
- /// The `onDownload` prop, through WKDownload. Without the prop, `openDownload` takes the URL.
4
3
  final class Downloads: NSObject, WKDownloadDelegate {
5
4
  private weak var view: MinimalWebView?
6
5
  private var files: [ObjectIdentifier: (url: URL, mimeType: String)] = [:]
@@ -9,7 +8,6 @@ final class Downloads: NSObject, WKDownloadDelegate {
9
8
  self.view = view
10
9
  }
11
10
 
12
- /// A main-frame response that is a file, not a page.
13
11
  static func isDownload(_ response: WKNavigationResponse) -> Bool {
14
12
  let disposition = (response.response as? HTTPURLResponse)?.value(forHTTPHeaderField: "Content-Disposition") ?? ""
15
13
  return response.isForMainFrame && (disposition.lowercased().hasPrefix("attachment") || !response.canShowMIMEType)
package/ios/Hooks.swift CHANGED
@@ -151,8 +151,8 @@ public protocol WebViewContext: AnyObject {
151
151
  /// Sends an event to JS: the extension with the hook's key gets `{ name, payload }` in its `onEvent`. It is dropped
152
152
  /// while the hook is off.
153
153
  func emit(_ name: String, _ payload: [String: Any])
154
- /// Sends the event as ``emit(_:_:)`` does, and calls `onAnswer` with the extension's `onEvent` return value, a
155
- /// promise awaited.
154
+ /// Sends the event as ``emit(_:_:)`` does, but to the extension's `onAsk` when it has one, and calls `onAnswer` with
155
+ /// that handler's return value, a promise awaited.
156
156
  ///
157
157
  /// It answers nil when the handler throws or there is none, or when the Document ends first; there is no timeout. It
158
158
  /// answers nil at once while the hook is off, and after the view closed.
@@ -217,7 +217,6 @@ public final class HookReply {
217
217
  }
218
218
  }
219
219
 
220
- /// A hook's view of the WebView: the core's context with the hook's key on its events. The view owns it and routes the delegates of the contexts that are on.
221
220
  final class HookContext: WebViewContext {
222
221
  let hook: MinimalWebViewHooks.Hook
223
222
  private weak var view: MinimalWebView?
@@ -303,8 +302,7 @@ final class HookContext: WebViewContext {
303
302
  handlers.forEach { $0(.closing) }
304
303
  }
305
304
 
306
- // A hook's own background work (a URLSession completion) may emit or ask; the view's asks are main-thread state.
307
- private func onMain(_ block: @escaping () -> Void) {
308
- if Thread.isMainThread { block() } else { DispatchQueue.main.async(execute: block) }
305
+ private func onMain(_ block: @escaping @MainActor () -> Void) {
306
+ if Thread.isMainThread { MainActor.assumeIsolated(block) } else { DispatchQueue.main.async(execute: block) }
309
307
  }
310
308
  }
package/ios/Loads.swift CHANGED
@@ -1,16 +1,13 @@
1
1
  import Foundation
2
2
 
3
- /// The main-frame loads' choices that need no WebView.
4
3
  enum Loads {
5
- /// Whether `a` and `b` are the same URL as WebKit reports one: with the scheme and host lowercase, the scheme's
6
- /// default port dropped, dot segments removed and an empty path `/`. The rest (userinfo, path, query, fragment) compares exactly. It picks
7
- /// out our own loads (`ownLoads`), which skip the navigation rules: WebKit reports the load of a `source.uri`
8
- /// of `https://Example.com:443` as `https://example.com/`.
4
+ /// Whether `a` and `b` are the same URL as WebKit reports one: WebKit reports a load of `https://Example.com:443` as
5
+ /// `https://example.com/`.
9
6
  static func sameURL(_ a: URL, _ b: URL) -> Bool {
10
7
  canonical(a.standardized) == canonical(b.standardized)
11
8
  }
12
9
 
13
- /// `url` in the form `sameURL` compares, dot segments aside (Recovery compares them as Android does).
10
+ /// `url` in the form `sameURL` compares, dot segments aside.
14
11
  static func canonical(_ url: URL) -> String {
15
12
  guard var components = URLComponents(url: url, resolvingAgainstBaseURL: false) else { return url.absoluteString }
16
13
  components.scheme = components.scheme?.lowercased()
@@ -20,26 +17,47 @@ enum Loads {
20
17
  return components.string ?? url.absoluteString
21
18
  }
22
19
 
23
- /// How a main-frame load WebKit ended with `error` went: its outcome, and the `onError` kind when it failed.
24
- static func ended(by error: NSError) -> (outcome: String, kind: String?) {
20
+ enum Outcome: String {
21
+ case finished, failed, cancelled
22
+ }
23
+
24
+ static func ended(by error: NSError) -> (outcome: Outcome, kind: String?) {
25
25
  switch (error.domain, error.code) {
26
- // Superseded or stopped (NSURLErrorCancelled), or a policy cancel (WebKitErrorFrameLoadInterruptedByPolicyChange:
27
- // a download, a 204, a blocked redirect): not an error.
26
+ // WebKitErrorFrameLoadInterruptedByPolicyChange: a download, a 204, a blocked redirect.
28
27
  case (NSURLErrorDomain, NSURLErrorCancelled), ("WebKitErrorDomain", 102):
29
- return (outcome: "cancelled", kind: nil)
30
- // WebKitErrorPlugInWillHandleLoad: a media file. WebKit ends the load once its media document has committed, and
31
- // the document's video loads the file itself (WebLocalFrameLoaderClient::committedLoad): the page shows, as on
32
- // Android.
28
+ return (outcome: .cancelled, kind: nil)
29
+ // WebKitErrorPlugInWillHandleLoad: WebKit ends the load once a media document has committed, and its video loads the file.
33
30
  case ("WebKitErrorDomain", 204):
34
- return (outcome: "finished", kind: nil)
35
- // The TLS handshake and certificate errors.
31
+ return (outcome: .finished, kind: nil)
36
32
  case (NSURLErrorDomain, NSURLErrorClientCertificateRequired...NSURLErrorSecureConnectionFailed):
37
- return (outcome: "failed", kind: "ssl")
33
+ return (outcome: .failed, kind: "ssl")
38
34
  default:
39
- return (outcome: "failed", kind: "network")
35
+ return (outcome: .failed, kind: "network")
40
36
  }
41
37
  }
42
38
  }
43
39
 
44
- /// The special schemes' default ports, which WebKit drops from a URL (the WHATWG URL Standard's).
40
+ /// The loads the view starts itself, which skip the navigation rules at their own main-frame policy check.
41
+ struct OwnLoads {
42
+ private var loads: [(url: URL, checksBefore: Int)] = []
43
+ private var checks = 0
44
+
45
+ mutating func started(_ url: URL) {
46
+ loads.append((url, checks))
47
+ }
48
+
49
+ /// Counts a main-frame policy check for `target`, and reports whether it is an own load's, which it uses up.
50
+ mutating func check(_ target: URL) -> Bool {
51
+ checks += 1
52
+ guard let own = loads.firstIndex(where: { Loads.sameURL($0.url, target) }) else { return false }
53
+ loads.remove(at: own)
54
+ return true
55
+ }
56
+
57
+ /// Drops each load that a check for another URL has passed over since it started.
58
+ mutating func committed() {
59
+ loads.removeAll { $0.checksBefore < checks }
60
+ }
61
+ }
62
+
45
63
  private let defaultPorts = ["http": 80, "https": 443, "ws": 80, "wss": 443, "ftp": 21]
@@ -1,7 +1,6 @@
1
1
  import UIKit
2
2
  import WebKit
3
3
 
4
- /// JS alert, confirm and prompt as UIAlertControllers. Android's WebChromeClient shows them by default.
5
4
  /// WebKit requires each completion handler to be called exactly once, including when no dialog can be shown.
6
5
  extension MinimalWebView: WKUIDelegate {
7
6
  func webView(
@@ -41,8 +40,6 @@ extension MinimalWebView: WKUIDelegate {
41
40
  showDialog(alert) { completionHandler(nil) }
42
41
  }
43
42
 
44
- /// WebKit asks the OS itself, with the app's Info.plist strings; a grant from `onPermissionRequest` skips only
45
- /// WebKit's own prompt.
46
43
  func webView(
47
44
  _ webView: WKWebView,
48
45
  requestMediaCapturePermissionFor origin: WKSecurityOrigin,
@@ -63,7 +60,6 @@ extension MinimalWebView: WKUIDelegate {
63
60
  }
64
61
  }
65
62
 
66
- /// The frame's host, or "JavaScript" when it has none (an opaque origin or `file:`), as Android titles a `data:` page's dialogs: a dialog must not look like the app's own alert.
67
63
  private func dialogTitle(_ frame: WKFrameInfo) -> String {
68
64
  let host = frame.securityOrigin.host
69
65
  return host.isEmpty ? "JavaScript" : host
@@ -77,13 +73,15 @@ extension MinimalWebView: WKUIDelegate {
77
73
  }
78
74
 
79
75
  private func action(_ title: String, _ style: UIAlertAction.Style, _ complete: @escaping () -> Void) -> UIAlertAction {
80
- UIAlertAction(title: title, style: style) { [weak self] _ in
81
- self?.dialog = nil
76
+ UIAlertAction(title: title, style: style) { [weak self] action in
77
+ // UIKit runs this after the dismissal animation, by when an unmount or a crash may have completed the dialog.
78
+ guard let self, dialog?.controller.actions.contains(action) == true else { return }
79
+ dialog = nil
82
80
  complete()
83
81
  }
84
82
  }
85
83
 
86
- /// Presents from the top of this view's window. If the top controller still has a presented one (one being dismissed) or is itself being presented, UIKit only logs and the page would stay blocked, so the dialog is cancelled instead.
84
+ /// UIKit only logs a present from a controller that has a presented one or is being presented.
87
85
  private func showDialog(_ alert: UIAlertController, cancel: @escaping () -> Void) {
88
86
  var top = window?.rootViewController
89
87
  while let next = top?.presentedViewController, !next.isBeingDismissed { top = next }