diff --git a/ReactWindows/ReactNative/Views/Web/ReactWebViewManager.cs b/ReactWindows/ReactNative/Views/Web/ReactWebViewManager.cs index d583e413f90..d875bac31c3 100644 --- a/ReactWindows/ReactNative/Views/Web/ReactWebViewManager.cs +++ b/ReactWindows/ReactNative/Views/Web/ReactWebViewManager.cs @@ -51,10 +51,10 @@ public override IReadOnlyDictionary CommandsMap } /// - /// Sets flag signaling whether JavaScript is enabled. + /// Sets whether JavaScript is enabled or not. /// /// A webview instance. - /// + /// A flag signaling whether JavaScript is enabled. [ReactProp("javaScriptEnabled")] public void SetJavaScriptEnabled(WebView view, bool enabled) { @@ -62,10 +62,10 @@ public void SetJavaScriptEnabled(WebView view, bool enabled) } /// - /// Sets flag signaling whether Indexed DB is enabled. + /// Sets whether Indexed DB is enabled or not. /// /// A webview instance. - /// + /// A flag signaling whether Indexed DB is enabled. [ReactProp("indexedDbEnabled")] public void SetIndexedDbEnabled(WebView view, bool enabled) { @@ -76,7 +76,7 @@ public void SetIndexedDbEnabled(WebView view, bool enabled) /// Sets the JavaScript to be injected when the webpage loads. /// /// A webview instance. - /// + /// An injected JavaScript. [ReactProp("injectedJavaScript")] public void SetInjectedJavaScript(WebView view, string injectedJavaScript) { @@ -87,7 +87,7 @@ public void SetInjectedJavaScript(WebView view, string injectedJavaScript) /// Sets webview source. /// /// A webview instance. - /// + /// A source for the webview (either static html or an uri). [ReactProp("source")] public void SetSource(WebView view, JObject source) { @@ -137,11 +137,9 @@ public void SetSource(WebView view, JObject source) var headers = source.Value("headers"); if (headers != null) { - IEnumerator> enumerator = ((JObject)headers).GetEnumerator(); - enumerator.Reset(); - while (enumerator.MoveNext()) + foreach (var header in headers) { - request.Headers.Append(enumerator.Current.Key, enumerator.Current.Value.Value()); + request.Headers.Append(header.Key, header.Value.Value()); } } diff --git a/ReactWindows/js/Components/WebView/WebView.windows.js b/ReactWindows/js/Components/WebView/WebView.windows.js index 481d0630674..18b7137dede 100644 --- a/ReactWindows/js/Components/WebView/WebView.windows.js +++ b/ReactWindows/js/Components/WebView/WebView.windows.js @@ -108,8 +108,7 @@ var WebView = React.createClass({ /** * Used on Android and Windows only, JS is enabled by default for WebView on iOS - * @platform android - * @platform windows + * @platform android, windows */ javaScriptEnabled: PropTypes.bool,