# WebMessage sample page

This page demonstrates basic interaction between the host app and the webview by means of Web Messages.

## Posting Messages

Messages can be posted from the host app to this using the functions `::PostWebMessageAsJson` and `::PostWebMessageAsString`. Try using the menu item "Script->" to send the message `{"SetColor":"blue"}`. It should change the text color of this paragraph.

## Receiving Messages

The host app can receive messages by registering an event handler with `::add_WebMessageReceived`. If you enter text and click "Send", this will send a message to the host app which will change the text of the title bar.

## Round trip

The host app can send messages back in response to received messages. If you click "Get window bounds", the host app will report back the bounds of its window, which will appear in the text box.

## IFrame