@@ -4,7 +4,6 @@ import { Platform, NativeModules } from 'react-native';
4
4
import { WebView } from 'react-native-webview' ;
5
5
import type { WebViewNavigation } from 'react-native-webview' ;
6
6
import { connectActionSheet } from '@expo/react-native-action-sheet' ;
7
- import { URL as WhatwgURL } from 'react-native-url-polyfill' ;
8
7
9
8
import type {
10
9
AlertWordsState ,
@@ -133,15 +132,15 @@ export type Props = $ReadOnly<{|
133
132
*/
134
133
const assetsUrl =
135
134
Platform . OS === 'ios'
136
- ? new WhatwgURL ( NativeModules . ZLPConstants . resourceURL )
137
- : new WhatwgURL ( 'file:///android_asset/' ) ;
135
+ ? new URL ( NativeModules . ZLPConstants . resourceURL )
136
+ : new URL ( 'file:///android_asset/' ) ;
138
137
139
138
/**
140
139
* The URL of the webview-assets folder.
141
140
*
142
141
* This is the folder populated at build time by `tools/build-webview`.
143
142
*/
144
- const webviewAssetsUrl = new WhatwgURL ( 'webview/' , assetsUrl ) ;
143
+ const webviewAssetsUrl = new URL ( 'webview/' , assetsUrl ) ;
145
144
146
145
class MessageList extends Component < Props > {
147
146
static contextType = ThemeContext ;
@@ -253,7 +252,7 @@ class MessageList extends Component<Props> {
253
252
* and cross-domain security restrictions have somewhere to
254
253
* believe that this document originates from.
255
254
*/
256
- const baseUrl = new WhatwgURL ( 'index.html' , webviewAssetsUrl ) ;
255
+ const baseUrl = new URL ( 'index.html' , webviewAssetsUrl ) ;
257
256
258
257
// Paranoia^WSecurity: only load `baseUrl`, and only load it once. Any other
259
258
// requests should be handed off to the OS, not loaded inside the WebView.
0 commit comments