From a75b008ab9db1beffba256a11158abe24392db7d Mon Sep 17 00:00:00 2001 From: Rodrigo Bermudez Schettino Date: Tue, 7 Aug 2018 08:27:24 +0200 Subject: [PATCH 1/2] Formatting from Docusaurus Running yarn start changed the format of en.json automatically. From b2cc20db3aa12824a05a0e3dac7fe99eb694b4b3 Mon Sep 17 00:00:00 2001 From: Rodrigo Bermudez Schettino Date: Tue, 7 Aug 2018 08:34:42 +0200 Subject: [PATCH 2/2] Add example with inline HTML to WebView Show required props to render inline HTML in WebView. --- docs/webview.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/webview.md b/docs/webview.md index 3e39a25b311..e1850cde331 100644 --- a/docs/webview.md +++ b/docs/webview.md @@ -21,6 +21,24 @@ class MyWeb extends Component { } ``` +Minimal example with inline HTML: + +``` +import React, { Component } from 'react'; +import { WebView } from 'react-native'; + +class MyInlineWeb extends Component { + render() { + return ( + Hello world' }} + /> + ); + } +} +``` + You can use this component to navigate back and forth in the web view's history and configure various properties for the web content. > **Security Warning:** Currently, `onMessage` and `postMessage` do not allow specifying an origin. This can lead to cross-site scripting attacks if an unexpected document is loaded within a `WebView` instance. Please refer to the MDN documentation for [`Window.postMessage()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) for more details on the security implications of this.