From 4d99daaa914398b24e9783b47858434e25bb5fcb Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 7 May 2018 12:23:50 -0700 Subject: [PATCH] Fix RNTester WebBrowser example Reviewed By: yungsters Differential Revision: D7890708 fbshipit-source-id: e96c2283f92ae151152f89bebd95141852ff40b1 --- RNTester/js/WebViewExample.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RNTester/js/WebViewExample.js b/RNTester/js/WebViewExample.js index d55d17ca60e..84b99001ecf 100644 --- a/RNTester/js/WebViewExample.js +++ b/RNTester/js/WebViewExample.js @@ -27,6 +27,7 @@ var DISABLED_WASH = 'rgba(255,255,255,0.25)'; var TEXT_INPUT_REF = 'urlInput'; var WEBVIEW_REF = 'webview'; var DEFAULT_URL = 'https://m.facebook.com'; +const FILE_SYSTEM_ORIGIN_WHITE_LIST = ['file://*', 'http://*', 'https://*']; class WebViewExample extends React.Component<{}, $FlowFixMeState> { state = { @@ -241,6 +242,7 @@ class MessagingTest extends React.Component<{}, $FlowFixMeState> { backgroundColor: BGWASH, height: 100, }} + originWhitelist={FILE_SYSTEM_ORIGIN_WHITE_LIST} source={require('./messagingtest.html')} onMessage={this.onMessage} /> @@ -414,6 +416,7 @@ exports.examples = [ backgroundColor: BGWASH, height: 100, }} + originWhitelist={FILE_SYSTEM_ORIGIN_WHITE_LIST} source={require('./helloworld.html')} scalesPageToFit={true} />