web-view

This component displays a webpage from a specified URL, content from a datasource, or custom HTML.

You can also use the jig.document type to display web pages in full-screen mode or pass messages from your HTML content via JavaScript to the Jigx App.

Configuration options

Some properties are common to all components, see Common component properties for a list and their configuration options.

Core structure

uri

The source to be displayed in the web-view, for example, a URL.

Other options

content

HTML to render in the web-view.

height

The height of the web-view.

isEditable

A very basic implementation, if set to true, the web-view content becomes editable. This works only with content, not with a uri. The isEditable property is only available when using the web-view in a .

isTrackingTransparencyRequired

If set to true tracking transparency permission modal is shown before opening the URL. The default setting is true.

Consideration

  • The component.web-view can be used in jig.fullscreen, if the content needs to fill the screen.

Examples and code snippets

Web-view example (URL)

Web-view with URL
Web-view with URL

In this example, we open a target URL in the web-view component.

If the target URL is tracking data (e.g., cookies etc.), you are required by Apple to ask for user consent using the isTrackingTransparencyRequired option. It will ask for user consent the first time any web view in your solution tries to open a target URL.

Examples: See the full example using static data on GitHub. See the full example using dynamic data in GitHub.

Datasource: See the full datasource for static data on GitHub. See the full datasource for dynamic data in GitHub.

Web-view example (HTML Content)

Web-view with HTML content
Web-view with HTML content

In this example, we are passing raw HTML content to the web-view component. This can either be inline content (see example below) or content from a datasource. If your HTML content does not render as expected (e.g. font too small etc.) embed the meta HTML tag used in the example below in your HTML content.

Editable web-view content (Fullscreen)

In this example, the web-view component is used to make notes on a job. It is configured in a jig.full-screen to display content from a datasource. The isEditable property is set to true, allowing the text in the web-view to be edited. An execute-entity action ensures the updated HTML is saved to the database.

Editable web-view
Editable web-view

Last updated

Was this helpful?