fixes #29 fixes #272 fixes #221 fixes #105 fixes #66 BREAKING CHANGE: Communication from webview to react-native has been completely rewritten. React-native-webview will not use or override window.postMessage anymore. Reasons behind these changes can be found throughout so many issues that it made sense to go that way. Instead of using window.postMessage(data, *), please now use window.ReactNativeWebView.postMessage(data). Side note: if you wish to keep compatibility with the old version when you upgrade, you can use the injectedJavascript prop to do that: const injectedJavascript = `(function() { window.postMessage = function(data) { window.ReactNativeWebView.postMessage(data); }; })()`; Huge thanks to @jordansexton and @KoenLav!
|
|
||
109 |
|
109 |
|
110 |
|
110 |
|
111 |
|
111 |
|
112 |
|
|
|
|
112 |
|
|
113 |
|
113 |
|
114 |
|
114 |
|
115 |
|
115 |
|
|
|
||
138 |
|
138 |
|
139 |
|
139 |
|
140 |
|
140 |
|
|
141 |
|
|
141 |
|
142 |
|
142 |
|
|
|
|
143 |
|
|
143 |
|
144 |
|
144 |
|
145 |
|
145 |
|
146 |
|
|
|
||
239 |
|
240 |
|
240 |
|
241 |
|
241 |
|
242 |
|
|
243 |
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
242 |
|
247 |
|
243 |
|
248 |
|
244 |
|
249 |
|
|
|
||
312 |
|
317 |
|
313 |
|
318 |
|
314 |
|
319 |
|
|
320 |
|
|
315 |
|
321 |
|
316 |
|
|
|
317 |
|
|
|
|
322 |
|
|
318 |
|
323 |
|
319 |
|
|
|
|
324 |
|
|
320 |
|
325 |
|
321 |
|
326 |
|
322 |
|
327 |
|
|
|
||
342 |
|
347 |
|
343 |
|
348 |
|
344 |
|
349 |
|
345 |
|
|
|
346 |
|
|
|
347 |
|
|
|
348 |
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
|
362 |
|
|
|
363 |
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
|
367 |
|
|
|
368 |
|
|
|
369 |
|
350 |
|
370 |
|
351 |
|
371 |
|
352 |
|
|
|
||
196 |
|
196 |
|
197 |
|
197 |
|
198 |
|
198 |
|
199 |
|
|
|
|
199 |
|
|
200 |
|
200 |
|
201 |
|
|
|
|
201 |
|
|
202 |
|
202 |
|
203 |
|
203 |
|
204 |
|
204 |
|
|
|
||
11 |
|
11 |
|
12 |
|
12 |
|
13 |
|
13 |
|
14 |
|
|
|
|
14 |
|
|
15 |
|
15 |
|
16 |
|
16 |
|
17 |
|
17 |
|
|
|
||
86 |
|
86 |
|
87 |
|
87 |
|
88 |
|
88 |
|
89 |
|
|
|
|
89 |
|
|
90 |
|
90 |
|
91 |
|
91 |
|
92 |
|
92 |
|
|
|
||
236 |
|
236 |
|
237 |
|
237 |
|
238 |
|
238 |
|
239 |
|
|
|
|
239 |
|
|
240 |
|
240 |
|
241 |
|
241 |
|
242 |
|
242 |
|
|
|
||
246 |
|
246 |
|
247 |
|
247 |
|
248 |
|
248 |
|
249 |
|
|
|
|
249 |
|
|
250 |
|
250 |
|
251 |
|
251 |
|
252 |
|
252 |
|
|
|
||
289 |
|
289 |
|
290 |
|
290 |
|
291 |
|
291 |
|
292 |
|
|
|
293 |
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|
292 |
|
304 |
|
293 |
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
|
310 |
|
|
|
311 |
|
|
|
312 |
|
|
|
313 |
|
|
|
314 |
|
|
|
315 |
|
|
|
316 |
|
|
|
317 |
|
|
|
318 |
|
|
|
319 |
|
|
|
320 |
|
|
|
321 |
|
|
|
322 |
|
|
|
323 |
|
|
|
324 |
|
|
|
325 |
|
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
|
310 |
|
|
|
311 |
|
|
|
312 |
|
|
|
313 |
|
|
326 |
|
314 |
|
327 |
|
315 |
|
328 |
|
316 |
|
|
|
||
13 |
|
13 |
|
14 |
|
14 |
|
15 |
|
15 |
|
16 |
|
|
|
|
16 |
|
|
17 |
|
17 |
|
18 |
|
18 |
|
19 |
|
19 |
|
|
|
||
101 |
|
101 |
|
102 |
|
102 |
|
103 |
|
103 |
|
104 |
|
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
105 |
|
120 |
|
106 |
|
121 |
|
107 |
|
122 |
|
|
|
||
148 |
|
163 |
|
149 |
|
164 |
|
150 |
|
165 |
|
151 |
|
|
|
|
166 |
|
|
152 |
|
167 |
|
153 |
|
168 |
|
154 |
|
169 |
|
|
|
||
184 |
|
199 |
|
185 |
|
200 |
|
186 |
|
201 |
|
187 |
|
|
|
|
202 |
|
|
188 |
|
203 |
|
189 |
|
204 |
|
190 |
|
205 |
|
|
|
||
253 |
|
268 |
|
254 |
|
269 |
|
255 |
|
270 |
|
256 |
|
|
|
257 |
|
271 |
|
258 |
|
272 |
|
259 |
|
273 |
|
|
|
||
264 |
|
278 |
|
265 |
|
279 |
|
266 |
|
280 |
|
|
281 |
|
|
267 |
|
282 |
|
268 |
|
283 |
|
269 |
|
284 |
|
|
|
||
303 |
|
318 |
|
304 |
|
319 |
|
305 |
|
320 |
|
306 |
|
|
|
|
321 |
|
|
307 |
|
322 |
|
308 |
|
323 |
|
309 |
|
|
|
|
324 |
|
|
310 |
|
325 |
|
311 |
|
326 |
|
312 |
|
327 |
|
|
|
||
520 |
|
535 |
|
521 |
|
536 |
|
522 |
|
537 |
|
523 |
|
|
|
524 |
|
538 |
|
525 |
|
539 |
|
526 |
|
540 |
|
|
|
||
528 |
|
542 |
|
529 |
|
543 |
|
530 |
|
544 |
|
531 |
|
|
|
532 |
|
|
|
533 |
|
|
|
534 |
|
|
|
535 |
|
|
|
536 |
|
|
|
537 |
|
|
|
538 |
|
|
|
539 |
|
|
|
540 |
|
|
|
541 |
|
|
|
542 |
|
|
|
543 |
|
|
|
544 |
|
|
|
545 |
|
|
|
546 |
|
|
|
547 |
|
|
|
548 |
|
|
|
549 |
|
|
|
550 |
|
|
|
551 |
|
|
|
552 |
|
|
|
553 |
|
|
|
554 |
|
|
|
555 |
|
|
|
556 |
|
545 |
|
557 |
|
546 |
|
558 |
|
547 |
|
559 |
|
548 |
|
|
549 |
|
|
560 |
|
550 |
|
561 |
|
551 |
|
562 |
|
552 |
|
|
|
||
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
|
||
157 |
|
157 |
|
158 |
|
158 |
|
159 |
|
159 |
|
160 |
|
|
|
161 |
|
160 |
|
162 |
|
161 |
|
|
162 |
|
|
163 |
|
163 |
|
164 |
|
164 |
|
165 |
|
165 |
|
|
|
||
232 |
|
232 |
|
233 |
|
233 |
|
234 |
|
234 |
|
235 |
|
|
|
236 |
|
|
|
237 |
|
235 |
|
238 |
|
236 |
|
239 |
|
237 |
|
|
|
||
268 |
|
266 |
|
269 |
|
267 |
|
270 |
|
268 |
|
271 |
|
|
|
272 |
|
269 |
|
|
270 |
|
|
273 |
|
271 |
|
274 |
|
272 |
|
275 |
|
273 |
|
|
|
||
424 |
|
424 |
|
425 |
|
425 |
|
426 |
|
426 |
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
|
|
427 |
|
|
|
428 |
|
|
430 |
|
429 |
|
431 |
|
|
|
432 |
|
|
|
433 |
|
|
|
|
430 |
|
|
|
431 |
|
|
434 |
|
432 |
|
435 |
|
433 |
|
436 |
|
434 |
|