<titledata-rh="true">Interface: Webview | Podman Desktop</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:image"content="https://podman-desktop.io/img/banner_podman-desktop.png"><metadata-rh="true"name="twitter:image"content="https://podman-desktop.io/img/banner_podman-desktop.png"><metadata-rh="true"property="og:url"content="https://podman-desktop.io/api/interfaces/Webview"><metadata-rh="true"property="og:locale"content="en"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docusaurus_version"content="current"><metadata-rh="true"name="docusaurus_tag"content="docs-api-current"><metadata-rh="true"name="docsearch:version"content="current"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-api-current"><metadata-rh="true"property="og:title"content="Interface: Webview | Podman Desktop"><metadata-rh="true"name="description"content="Displays html content, similarly to an iframe."><metadata-rh="true"property="og:description"content="Displays html content, similarly to an iframe."><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://podman-desktop.io/api/interfaces/Webview"><linkdata-rh="true"rel="alternate"href="https://podman-desktop.io/api/interfaces/Webview"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://podman-desktop.io/api/interfaces/Webview"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://MR01ANKQ9S-dsn.algolia.net"crossorigin="anonymous"><linkrel="alternate"type="application/rss+xml"href="/blog/rss.xml"title="Podman Desktop RSS Feed">
<linkrel="alternate"type="application/atom+xml"href="/blog/atom.xml"title="Podman Desktop Atom Feed">
<p>Displays html content, similarly to an iframe.</p>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="properties">Properties<ahref="#properties"class="hash-link"aria-label="Direct link to Properties"title="Direct link to Properties"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="cspsource">cspSource<ahref="#cspsource"class="hash-link"aria-label="Direct link to cspSource"title="Direct link to cspSource"></a></h3>
<p>Content security policy source for webview resources.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source">Source<ahref="#source"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="html">html<ahref="#html"class="hash-link"aria-label="Direct link to html"title="Direct link to html"></a></h3>
<blockquote>
<p><strong>html</strong>: <code>string</code></p>
</blockquote>
<p>HTML contents of the webview.</p>
<p>This should be a complete, valid html document. Changing this property causes the webview to be reloaded.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-1">Source<ahref="#source-1"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="ondidreceivemessage">onDidReceiveMessage<ahref="#ondidreceivemessage"class="hash-link"aria-label="Direct link to onDidReceiveMessage"title="Direct link to onDidReceiveMessage"></a></h3>
<p>Fired when the webview content posts a message.</p>
<p>Webview content can post strings or json serializable objects back to an extension.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-2">Source<ahref="#source-2"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="options">options<ahref="#options"class="hash-link"aria-label="Direct link to options"title="Direct link to options"></a></h3>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-3">Source<ahref="#source-3"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="methods">Methods<ahref="#methods"class="hash-link"aria-label="Direct link to Methods"title="Direct link to Methods"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="aswebviewuri">asWebviewUri()<ahref="#aswebviewuri"class="hash-link"aria-label="Direct link to asWebviewUri()"title="Direct link to asWebviewUri()"></a></h3>
<p>Convert a uri for the local file system to one that can be used inside webviews.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters">Parameters<ahref="#parameters"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns">Returns<ahref="#returns"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-4">Source<ahref="#source-4"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="postmessage">postMessage()<ahref="#postmessage"class="hash-link"aria-label="Direct link to postMessage()"title="Direct link to postMessage()"></a></h3>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters-1">Parameters<ahref="#parameters-1"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns-1">Returns<ahref="#returns-1"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-5">Source<ahref="#source-5"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>