瀏覽代碼

Update docs to reflect Android version compatibility

Salvatore Randazzo 4 年之前
父節點
當前提交
c83fefe6ce
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. 6
    0
      docs/Guide.md

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

@@ -303,6 +303,12 @@ _Under the hood_
303 303
 
304 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 312
 ```jsx
307 313
 import React, { Component } from 'react';
308 314
 import { View } from 'react-native';