# Web

<div align="left"><img src="https://963067965-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MIJW5nbmYRaSNWePAac%2F-MIxu2KP4MClY9gv_q2W%2F-MIxukSHdxAF4DJrqI-W%2FProperty-Web.png?alt=media&#x26;token=a773bcc4-8a5e-4713-8feb-666e45aa483c" alt=""></div>

| Property         | Function                                                                                                                                                                                                                             | Type                                                                                                                |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| Url              | <p>Sets URL address<br><br><strong>Actions editor:</strong><br><code>Property > Web > Url</code><br><strong>Code:</strong><br><code>widget.content.webUrl</code></p>                                                                 | `string`                                                                                                            |
| Popup links      | <p>If Ignore, do not open pop-up links, else open in the same window<br><br><strong>Actions editor:</strong><br><code>Property > Web > Popup links</code><br><strong>Code:</strong><br><code>widget.content.popupBehavior</code></p> | <p><code>enum</code><br><br><strong>Values:</strong><br><code>Ignore</code><br><code>OpenInTheSameWindow</code></p> |
| Js result        | <p>Holds result of actionRunJavaScript<br><br><strong>Actions editor:</strong><br><code>Property > Web > Js result</code><br><strong>Code:</strong><br><code>widget.content.javaScripResult</code></p>                               | `string`                                                                                                            |
| Snapshot         | <p>Web page snapshot<br><br><strong>Actions editor:</strong><br><code>Property > Web > Snapshot</code><br><strong>Code:</strong><br><code>widget.content.snapshot</code></p>                                                         | `string`                                                                                                            |
| Current url      | <p>Gets current url<br><br><strong>Actions editor:</strong><br><code>Property > Web > Current url</code><br><strong>Code:</strong><br><code>widget.content.currentUrl</code></p>                                                     | `string`                                                                                                            |
| Current url hash | <p>Gets current url<br><br><strong>Actions editor:</strong><br><code>Property > Web > Current url hash</code><br><strong>Code:</strong><br><code>widget.content.currentUrlHash</code></p>                                            | `string`                                                                                                            |
| Current title    | <p>Gets current page title<br><br><strong>Actions editor:</strong><br><code>Property > Web > Current title</code><br><strong>Code:</strong><br><code>widget.content.webPageTitle</code></p>                                          | `string`                                                                                                            |
| Progress         | <p>Gets loading progress<br><br><strong>Actions editor:</strong><br><code>Property > Web > Progress</code><br><strong>Code:</strong><br><code>widget.content.loadProgress</code></p>                                                 | `int`                                                                                                               |
| Error            | <p>Gets loading error text<br><br><strong>Actions editor:</strong><br><code>Property > Web > Error</code><br><strong>Code:</strong><br><code>widget.content.error</code></p>                                                         | `string`                                                                                                            |

## Actions

| Property           | Function                                                                                                                                                                                                                                                                                     |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Run JavaScript     | <p>Run custom javascript code, i.e. <code>alert(document.title + document.location)</code><br><br><strong>Actions editor:</strong><br><code>Actions > Common > Run JavaScript</code><br><strong>Code:</strong><br><code>widget.content.script.actionRunJavaScript(QString script)</code></p> |
| Go back            | <p>Go back to previous page<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Go back</code><br><strong>Code:</strong><br><code>widget.content.script.actionGoBack()</code></p>                                                                                            |
| Go forward         | <p>Go forward to next page<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Go forward</code><br><strong>Code:</strong><br><code>widget.content.script.actionGoForward()</code></p>                                                                                       |
| Stop               | <p>Stops loading the current url<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Stop</code><br><strong>Code:</strong><br><code>widget.content.script.actionStop()</code></p>                                                                                            |
| Reload             | <p>Reload the current url<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Reload</code><br><strong>Code:</strong><br><code>widget.content.script.actionReload()</code></p>                                                                                               |
| Load html document | <p>Loads the specified html content to the web view<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Load html document</code><br><strong>Code:</strong><br><code>widget.content.script.actionLoadHtml(QString html)</code></p>                                           |
| Set url            | <p><strong>Actions editor:</strong><br><code>Actions > Common > Set url</code><br><strong>Code:</strong><br><code>widget.content.script.actionSetUrl(QString url)</code></p>                                                                                                                 |

## Events

| Property              | Function                                                                                                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Run JavaScript        | <p><strong>Actions editor:</strong><br><code>Event > Run JavaScript</code><br><strong>Code:</strong><br><code>widget.content.script.eventJavaScriptRunned()</code></p>                                                   |
| Page loaded           | <p>Event when page is loaded<br><br><strong>Actions editor:</strong><br><code>Event > Page loaded</code><br><strong>Code:</strong><br><code>widget.content.script.eventLoaded()</code></p>                               |
| Error                 | <p>Event when error is raised<br><br><strong>Actions editor:</strong><br><code>Event > Error</code><br><strong>Code:</strong><br><code>widget.content.script.eventError()</code></p>                                     |
| Load progress changed | <p>Event when page loading progress is changed<br><br><strong>Actions editor:</strong><br><code>Event > Load progress changed</code><br><strong>Code:</strong><br><code>widget.content.script.eventProgress()</code></p> |
| Url changed           | <p>Event when url is changed<br><br><strong>Actions editor:</strong><br><code>Event > Url changed</code><br><strong>Code:</strong><br><code>widget.content.script.eventUrlChanged()</code></p>                           |
