<imgsrc="images/webviewer.png"alt="Picture of WebViewer component"/>
<p>Component for viewing Web pages. The Home URL can be specified in the Designer or in the Blocks Editor. The view can be set to follow links when they are tapped, and users can fill in Web forms. Warning: This is not a full browser. For example, pressing the phone's hardware Back key will exit the app, rather than move back in the browser history.<p/>You can use the WebViewer.WebViewString property to communicate between your app and Javascript code running in the Webviewer page. In the app, you get and set WebViewString. In the WebViewer, you include Javascript that references the window.AppInventor object, using the methoods </emgetWebViewString()</em> and <em>setWebViewString(text)</em>. <p/>For example, if the WebViewer opens to a page that contains the Javascript command <br/><em>document.write("The answer is" + window.AppInventor.getWebViewString());</em><br/>and if you set WebView.WebVewString to "hello", then the web page will show </br><em>The answer is hello</em>. <br/>And if the Web page contains Javascript that executes the command <br/><em>windowAppInventor.setWebViewString("hello from Javascript")</em>, <br/>then the value of the WebViewString property will be <br/><em>hello from Javascript</em>. </p>
<p>Component for viewing Web pages. The Home URL can be specified in the Designer or in the Blocks Editor. The view can be set to follow links when they are tapped, and users can fill in Web forms. Warning: This is not a full browser. For example, pressing the phone's hardware Back key will exit the app, rather than move back in the browser history.<p/>You can use the WebViewer.WebViewString property to communicate between your app and Javascript code running in the Webviewer page. In the app, you get and set WebViewString. In the WebViewer, you include Javascript that references the window.AppInventor object, using the methods <em>getWebViewString()</em> and <em>setWebViewString(text)</em>. <p/>For example, if the WebViewer opens to a page that contains the Javascript command <br/><em>document.write("The answer is" + window.AppInventor.getWebViewString());</em><br/>and if you set WebView.WebVewString to "hello", then the web page will show </br><em>The answer is hello</em>. <br/>And if the Web page contains Javascript that executes the command <br/><em>windowAppInventor.setWebViewString("hello from Javascript")</em>, <br/>then the value of the WebViewString property will be <br/><em>hello from Javascript</em>. <br/>Calling setWebViewString from JavaScript will also run the WebViewStringChanged event so that the blocks can handle when the WebViewString property changes.</p>
<dd>Event that runs when the AppInventor.setWebViewString method is called from JavaScript. The new WebViewString is given by the value parameter.</dd>