|
@@ -89,6 +89,27 @@ class MyWeb extends Component {
|
89
|
89
|
}
|
90
|
90
|
```
|
91
|
91
|
|
|
92
|
+**Access local assets by WebViewAssetLoader on android x**
|
|
93
|
+
|
|
94
|
+Android x provide a new way to access assets, by using WebViewAssetLoader. now we can access assets via uri **https://appassets.androidplatform.net/assets/some-assets**
|
|
95
|
+
|
|
96
|
+For example:
|
|
97
|
+
|
|
98
|
+```tsx
|
|
99
|
+<WebView
|
|
100
|
+ ref={webViewRef}
|
|
101
|
+ originWhitelist={['*']}
|
|
102
|
+ source={{
|
|
103
|
+ uri: 'https://appassets.androidplatform.net/assets/index.html',
|
|
104
|
+ }}
|
|
105
|
+ onLoadEnd={sendRequests}
|
|
106
|
+ onMessage={(event) => {
|
|
107
|
+ console.log('resolve', event);
|
|
108
|
+ resolve(event.nativeEvent.data);
|
|
109
|
+ }}
|
|
110
|
+/>
|
|
111
|
+```
|
|
112
|
+
|
92
|
113
|
</details>
|
93
|
114
|
|
94
|
115
|
### Controlling navigation state changes
|