浏览代码

Update docs to reflect Android version compatibility

Salvatore Randazzo 5 年前
父节点
当前提交
c83fefe6ce
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      docs/Guide.md

+ 6
- 0
docs/Guide.md 查看文件

303
 
303
 
304
 This is a script that runs **before** the web page loads for the first time. It only runs once, even if the page is reloaded or navigated away. This is useful if you want to inject anything into the window, localstorage, or document prior to the web code executing. 
304
 This is a script that runs **before** the web page loads for the first time. It only runs once, even if the page is reloaded or navigated away. This is useful if you want to inject anything into the window, localstorage, or document prior to the web code executing. 
305
 
305
 
306
+> Android Compatibility: Applications targeting Build.VERSION_CODES.N or later, JavaScript state from an empty WebView is no longer persisted across navigations like loadUrl(java.lang.String). 
307
+For example, global variables and functions defined before calling loadUrl(java.lang.String) will not exist in the loaded page. 
308
+Applications should use addJavascriptInterface(Object, String) instead to persist JavaScript objects across navigations.
309
+
310
+
311
+
306
 ```jsx
312
 ```jsx
307
 import React, { Component } from 'react';
313
 import React, { Component } from 'react';
308
 import { View } from 'react-native';
314
 import { View } from 'react-native';