mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-11 22:32:38 +08:00
Allowing turning on / off DOM storage on android webviews
Summary: Was developing on a WebView and couldnt get it to run. Turns out its JS code mostly depends on `localStorage` and I realized it wasnt turned on in RN. This PR adds a prop, similar to `javascriptEnabledAndroid` to be able to turn DOM storage on / off. TBH I dont really know how it works on IOS, so I created an android specific thingy. I assume DOM storage is enabled by default on IOS. Closes https://github.com/facebook/react-native/pull/5065 Reviewed By: svcscm Differential Revision: D2797735 Pulled By: androidtrunkagent fb-gh-sync-id: cd60cfa4d24d80fb82e4f54f387a4517a99e75ab
This commit is contained in:
committed by
facebook-github-bot-4
parent
55fe7ac9ae
commit
6793128435
@@ -95,6 +95,7 @@ var WebViewExample = React.createClass({
|
||||
style={styles.webView}
|
||||
url={this.state.url}
|
||||
javaScriptEnabledAndroid={true}
|
||||
domStorageEnabledAndroid={true}
|
||||
onNavigationStateChange={this.onNavigationStateChange}
|
||||
onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
|
||||
startInLoadingState={true}
|
||||
|
||||
Reference in New Issue
Block a user