blob: 843ed1c01abab4fb14ea8773341a27e18a46290d [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.web
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## Context {#Context}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=226)*
<p>Manages browsing state (e.g. LocalStorage, cookies, etc) associated with a set of <a class='link' href='#Frame'>Frame</a>.</p>
### CreateFrame {#Context.CreateFrame}
<p>Creates a new <a class='link' href='#Frame'>Frame</a> under this <a class='link' href='#Context'>Context</a>. Destruction of a <a class='link' href='#Context'>Context</a> triggers the
destruction of all of its associated <a class='link' href='#Frame'>Frame</a>. <a class='link' href='#Frame'>Frame</a> can be transferred to another
component but cannot be shared across multiple components.</p>
<ul>
<li><code>frame</code>: An interface request that will be bound to the created <a class='link' href='#Frame'>Frame</a>.</li>
</ul>
#### Request {#Context.CreateFrame_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>frame</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Frame'>Frame</a>&gt;</code>
</td>
</tr>
</table>
### CreateFrameWithParams {#Context.CreateFrameWithParams}
<p>Similar to <a class='link' href='#Context.CreateFrame'>Context.CreateFrame</a>, with extra parameters.</p>
<ul>
<li><code>params</code>: The configuration used to create the <a class='link' href='#Frame'>Frame</a>.
This method will fail with <code>ZX_ERR_INVALID_ARGS</code> if the table is not clonable.</li>
<li><code>frame</code>: An interface request that will be bound to the created <a class='link' href='#Frame'>Frame</a>.</li>
</ul>
#### Request {#Context.CreateFrameWithParams_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#CreateFrameParams'>CreateFrameParams</a></code>
</td>
</tr>
<tr>
<td><code>frame</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Frame'>Frame</a>&gt;</code>
</td>
</tr>
</table>
### GetCookieManager {#Context.GetCookieManager}
<p>Used to observe cookies for sites hosted under this Context.</p>
#### Request {#Context.GetCookieManager_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>manager</code></td>
<td>
<code>server_end&lt;<a class='link' href='#CookieManager'>CookieManager</a>&gt;</code>
</td>
</tr>
</table>
### GetRemoteDebuggingPort {#Context.GetRemoteDebuggingPort}
<p>Waits until debugging is available on one or more Frames, and returns the DevTools port
number. Multiple calls may be queued to received the port number.</p>
<p>If an error occurred, the <a class='link' href='#ContextError'>ContextError</a> will be set to this value:</p>
<ul>
<li><code>REMOTE_DEBUGGING_PORT_NOT_OPENED</code>: <code>remote_debugging_port</code> was not set in
<a class='link' href='#CreateContextParams'>CreateContextParams</a> or the remote debugging service failed to start.</li>
</ul>
#### Request {#Context.GetRemoteDebuggingPort_Request}
&lt;EMPTY&gt;
#### Response {#Context.GetRemoteDebuggingPort_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Context_GetRemoteDebuggingPort_Result'>Context_GetRemoteDebuggingPort_Result</a></code>
</td>
</tr>
</table>
## ContextProvider {#ContextProvider}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=17)*
<p>The top-level service interface which allows for the creation of Context resources.</p>
### Create {#ContextProvider.Create}
<p>Creates a new browser <a class='link' href='#Context'>Context</a> whose state is wholly independent and isolated from other
<a class='link' href='#Context'>Context</a>(<code>Contexts</code>).</p>
<ul>
<li><code>params</code>: The configuration used to create the <a class='link' href='#Context'>Context</a>.</li>
<li><code>context</code>: An interface request which will receive a bound <a class='link' href='#Context'>Context</a>
service.</li>
</ul>
#### Request {#ContextProvider.Create_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#CreateContextParams'>CreateContextParams</a></code>
</td>
</tr>
<tr>
<td><code>context</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Context'>Context</a>&gt;</code>
</td>
</tr>
</table>
## CookieManager {#CookieManager}
*Defined in [fuchsia.web/cookie.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/cookie.fidl;l=12)*
<p>Provides methods for monitoring and accessing browser cookie state.</p>
### GetCookieList {#CookieManager.GetCookieList}
<p>Returns a list of Cookies, optionally limited to those matching <code>url</code>, and optionally
<code>name</code>. <code>cookies</code> iterates over the matching cookies, including their <code>value</code>s.</p>
#### Request {#CookieManager.GetCookieList_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='#CookieName'>CookieName</a></code>
</td>
</tr>
<tr>
<td><code>cookies</code></td>
<td>
<code>server_end&lt;<a class='link' href='#CookiesIterator'>CookiesIterator</a>&gt;</code>
</td>
</tr>
</table>
### ObserveCookieChanges {#CookieManager.ObserveCookieChanges}
<p>Observe changes to all cookies named <code>name</code> that would be sent in a request to <code>url</code>.</p>
<p>If neither <code>url</code> nor <code>name</code> are set then all cookies are observed. If only <code>url</code> is set
then all cookies for that URL are observed. If both are set then only cookies matching both
fields are observed.</p>
<p><code>changes</code> iterates over a stream of cookie changes. Additions or updates are expressed as
complete cookies, while deletions are expressed as cookies with no <code>value</code> set.</p>
#### Request {#CookieManager.ObserveCookieChanges_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='#CookieName'>CookieName</a></code>
</td>
</tr>
<tr>
<td><code>changes</code></td>
<td>
<code>server_end&lt;<a class='link' href='#CookiesIterator'>CookiesIterator</a>&gt;</code>
</td>
</tr>
</table>
## CookiesIterator {#CookiesIterator}
*Defined in [fuchsia.web/cookie.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/cookie.fidl;l=37)*
<p>Used to iterator over a set of cookies, or a stream of changes to cookies.</p>
### GetNext {#CookiesIterator.GetNext}
<p>Fetches the next batch of cookies, or of changes to cookies.
RFC6265 does not specify an upper-bound on the number of cookies which
may be stored.</p>
#### Request {#CookiesIterator.GetNext_Request}
&lt;EMPTY&gt;
#### Response {#CookiesIterator.GetNext_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>changed_cookies</code></td>
<td>
<code>vector&lt;<a class='link' href='#Cookie'>Cookie</a>&gt;</code>
</td>
</tr>
</table>
## Debug {#Debug}
*Defined in [fuchsia.web/debug.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/debug.fidl;l=8)*
<p>The debug service which allows to enable the DevTools service on Contexts.</p>
### EnableDevTools {#Debug.EnableDevTools}
<p>Enables the DevTools service on every subsequent <a class='link' href='#Context'>Context</a> creation and delivers
subsequent DevTools events to the supplied <code>listener</code>. The callback indicates when the
WebEngine is in a debuggable state. Events will be sent to every <code>listener</code> registered with
this method.</p>
#### Request {#Debug.EnableDevTools_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>listener</code></td>
<td>
<code><a class='link' href='#DevToolsListener'>DevToolsListener</a></code>
</td>
</tr>
</table>
#### Response {#Debug.EnableDevTools_Response}
&lt;EMPTY&gt;
## DevToolsListener {#DevToolsListener}
*Defined in [fuchsia.web/debug.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/debug.fidl;l=19)*
<p>Interface used to observe DevTools service availability events.</p>
### OnContextDevToolsAvailable {#DevToolsListener.OnContextDevToolsAvailable}
<p>Called when the DevTools service is available on a new <a class='link' href='#Context'>Context</a>.</p>
<ul>
<li><code>listener</code>: Channel over which DevTools events for the new <a class='link' href='#Context'>Context</a> will
be delivered. This channel will disconnect when the <a class='link' href='#Context'>Context</a> is destroyed.</li>
</ul>
#### Request {#DevToolsListener.OnContextDevToolsAvailable_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>listener</code></td>
<td>
<code>server_end&lt;<a class='link' href='#DevToolsPerContextListener'>DevToolsPerContextListener</a>&gt;</code>
</td>
</tr>
</table>
## DevToolsPerContextListener {#DevToolsPerContextListener}
*Defined in [fuchsia.web/debug.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/debug.fidl;l=30)*
<p>Interface supplied by the debugging component to observe the DevTools service opening event.</p>
### OnHttpPortOpen {#DevToolsPerContextListener.OnHttpPortOpen}
<p>Called when the DevTools service starts accepting TCP connections on <code>port</code>. <code>port</code> will
remain open until the <a class='link' href='#Context'>Context</a> is destroyed.</p>
<ul>
<li><code>port</code>: The port used by the service.</li>
</ul>
#### Request {#DevToolsPerContextListener.OnHttpPortOpen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>port</code></td>
<td>
<code>uint16</code>
</td>
</tr>
</table>
## Frame {#Frame}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=155)*
### AddBeforeLoadJavaScript {#Frame.AddBeforeLoadJavaScript}
<p>Executes a UTF-8 encoded <code>script</code> for every subsequent page load where the <a class='link' href='#Frame'>Frame</a>'s URL
has an origin reflected in <code>origins</code>. The script is executed early, prior to the execution
of the document's scripts.</p>
<p>Scripts are identified by a client-managed identifier <code>id</code>. Any script previously injected
using the same <code>id</code> will be replaced.</p>
<p>The order in which multiple bindings are executed is the same as the order in which the
bindings were added. If a script is added which clobbers an existing script of the same
<code>id</code>, the previous script's precedence in the injection order will be preserved.</p>
<p>At least one <code>origins</code> entry must be specified. If a wildcard <code>&quot;*&quot;</code> is specified in
<code>origins</code>, then the script will be evaluated unconditionally.</p>
<p>If an error occurred, the <a class='link' href='#FrameError'>FrameError</a> will be set to one of these values:</p>
<ul>
<li><code>BUFFER_NOT_UTF8</code>: <code>script</code> is not UTF-8 encoded.</li>
<li><code>INVALID_ORIGIN</code>: <code>origins</code> is an empty vector.</li>
</ul>
#### Request {#Frame.AddBeforeLoadJavaScript_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>id</code></td>
<td>
<code>uint64</code>
</td>
</tr>
<tr>
<td><code>origins</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
</tr>
<tr>
<td><code>script</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
</tr>
</table>
#### Response {#Frame.AddBeforeLoadJavaScript_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Frame_AddBeforeLoadJavaScript_Result'>Frame_AddBeforeLoadJavaScript_Result</a></code>
</td>
</tr>
</table>
### Close {#Frame.Close}
<p>Request graceful or immediate teardown of the Frame content and notification of completion
via Frame epitaph.</p>
<p>Graceful teardown allows unload and cleanup tasks in the implementation and web content
(e.g., <code>unload</code> event handlers) to run for up to the specified period of time. Immediate
teardown only runs the minimum cleanup tasks in the implementation and does not allow web
content to run event handlers.</p>
<ul>
<li>
<p>If <code>timeout</code> is zero, an immediate teardown is initiated. The channel will close with
<code>ZX_OK</code>. This is equivalent to the caller closing the Frame channel.</p>
</li>
<li>
<p>If <code>timeout</code> is non-zero, a graceful teardown is initiated. The channel will close with
<code>ZX_OK</code> if the Frame closes within the specified <code>timeout</code> and with <code>ZX_ERR_TIMED_OUT</code>
otherwise.</p>
</li>
<li>
<p>If <code>timeout</code> is not specified, a reasonable implementation-specific timeout is applied.</p>
</li>
</ul>
<p>Subsequent calls to <code>Close()</code> will override any previously specified <code>Close()</code> timeout.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
#### Request {#Frame.Close_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>payload</code></td>
<td>
<code><a class='link' href='#FrameCloseRequest'>FrameCloseRequest</a></code>
</td>
</tr>
</table>
### ConfigureInputTypes {#Frame.ConfigureInputTypes}
<p>Enables or disables the processing of the specified <code>types</code> of user inputs.
<code>allow</code> specifies whether to enable or disable the specified <code>types</code>.
All input types are enabled by default.</p>
#### Request {#Frame.ConfigureInputTypes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>types</code></td>
<td>
<code><a class='link' href='#InputTypes'>InputTypes</a></code>
</td>
</tr>
<tr>
<td><code>allow</code></td>
<td>
<code><a class='link' href='#AllowInputState'>AllowInputState</a></code>
</td>
</tr>
</table>
### CreateView {#Frame.CreateView}
<p>Creates a new view using the specified <code>view_token</code>. Caller should pass the other end of
the token to <a class='link' href='../fuchsia.ui.gfx/'>fuchsia.ui.gfx</a>/<a class='link' href='../fuchsia.ui.gfx/#ViewHolderArgs'>ViewHolderArgs</a> to attach the new view to a view tree.</p>
<p>See the description of <a class='link' href='#CreateContextParams.service_directory'>CreateContextParams.service_directory</a> for additional services
that must be present when using this method.</p>
#### Request {#Frame.CreateView_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>view_token</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewToken'>ViewToken</a></code>
</td>
</tr>
</table>
### CreateView2 {#Frame.CreateView2}
<p>Creates a new Flatland view using the specified <code>view_creation_token</code> defined under <code>args</code>.
Caller should pass the other end of the token to
<a class='link' href='../fuchsia.ui.composition/'>fuchsia.ui.composition</a>/<a class='link' href='../fuchsia.ui.composition/#Flatland.CreateViewport'>Flatland.CreateViewport</a> to attach the new Flatland view to its
graph.</p>
#### Request {#Frame.CreateView2_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>args</code></td>
<td>
<code><a class='link' href='#CreateView2Args'>CreateView2Args</a></code>
</td>
</tr>
</table>
### CreateViewWithViewRef {#Frame.CreateViewWithViewRef}
<p>Creates a new view using the specified <code>view_token</code>. Caller should pass the other end of
the token to <a class='link' href='../fuchsia.ui.gfx/'>fuchsia.ui.gfx</a>/<a class='link' href='../fuchsia.ui.gfx/#ViewHolderArgs'>ViewHolderArgs</a> to attach the new view to a view tree.
<code>view_ref</code> can be cloned before passing it to this method, which will allow clients to
track the view.</p>
<p><code>view_ref_control</code> must not have the <code>ZX_RIGHT_DUPLICATE</code> set, or view creation will fail
and <code>view_token</code> will be closed.</p>
<p>See the description of <a class='link' href='#CreateContextParams.service_directory'>CreateContextParams.service_directory</a> for additional services
that must be present when using this method.</p>
#### Request {#Frame.CreateViewWithViewRef_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>view_token</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewToken'>ViewToken</a></code>
</td>
</tr>
<tr>
<td><code>view_ref_control</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewRefControl'>ViewRefControl</a></code>
</td>
</tr>
<tr>
<td><code>view_ref</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewRef'>ViewRef</a></code>
</td>
</tr>
</table>
### DisableHeadlessRendering {#Frame.DisableHeadlessRendering}
<p>Stops headless rendering of the Frame.</p>
<p>May only be used on a Context created with the <code>HEADLESS</code> feature flag.</p>
#### Request {#Frame.DisableHeadlessRendering_Request}
&lt;EMPTY&gt;
### EnableHeadlessRendering {#Frame.EnableHeadlessRendering}
<p>Enables headless rendering of the Frame.</p>
<p>This is used when content depends on layout and/or animation events firing normally.
May only be used on a Context created with the <code>HEADLESS</code> feature flag.</p>
#### Request {#Frame.EnableHeadlessRendering_Request}
&lt;EMPTY&gt;
### ExecuteJavaScript {#Frame.ExecuteJavaScript}
<p>Executes a UTF-8 encoded <code>script</code> in the <a class='link' href='#Frame'>Frame</a> if the <a class='link' href='#Frame'>Frame</a>'s URL has an origin
which matches entries in <code>origins</code>.</p>
<p>At least one <code>origins</code> entry must be specified. If a wildcard <code>&quot;*&quot;</code> is specified in
<code>origins</code>, then the script will be evaluated unconditionally.</p>
<p>Returns the result of executing <code>script</code>, as a JSON-encoded string.</p>
<p>Note that scripts share the same execution context as the document,
meaning that document may modify variables, classes, or objects set by
the script in arbitrary or unpredictable ways.</p>
<p>If an error occurred, the FrameError will be set to one of these values:</p>
<ul>
<li><code>BUFFER_NOT_UTF8</code>: <code>script</code> is not UTF-8 encoded.</li>
<li><code>INVALID_ORIGIN</code>: The <a class='link' href='#Frame'>Frame</a>'s current URL does not match any of the values in
<code>origins</code> or <code>origins</code> is an empty vector.</li>
</ul>
#### Request {#Frame.ExecuteJavaScript_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>origins</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
</tr>
<tr>
<td><code>script</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
</tr>
</table>
#### Response {#Frame.ExecuteJavaScript_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Frame_ExecuteJavaScript_Result'>Frame_ExecuteJavaScript_Result</a></code>
</td>
</tr>
</table>
### ExecuteJavaScriptNoResult {#Frame.ExecuteJavaScriptNoResult}
<p>Variant of <a class='link' href='#Frame.ExecuteJavaScript'>Frame.ExecuteJavaScript</a> which executes the supplied script without returning
a result.</p>
#### Request {#Frame.ExecuteJavaScriptNoResult_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>origins</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
</tr>
<tr>
<td><code>script</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
</tr>
</table>
#### Response {#Frame.ExecuteJavaScriptNoResult_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Frame_ExecuteJavaScriptNoResult_Result'>Frame_ExecuteJavaScriptNoResult_Result</a></code>
</td>
</tr>
</table>
### ForceContentDimensions {#Frame.ForceContentDimensions}
<p>Overrides the dimensions reported to web content. The devicePixelRatio reported to
web content will be adjusted in response to changes in the pixel size of the View,
rather than changing the size reported to the content. Call with null <code>web_dips</code> to
remove any prior forced content dimensions.</p>
#### Request {#Frame.ForceContentDimensions_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>web_dips</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.gfx/'>fuchsia.ui.gfx</a>/<a class='link' href='../fuchsia.ui.gfx/#vec2'>vec2</a>?</code>
</td>
</tr>
</table>
### GetMediaPlayer {#Frame.GetMediaPlayer}
<p>Returns a <a class='link' href='../fuchsia.media.sessions2/'>fuchsia.media.sessions2</a>/<a class='link' href='../fuchsia.media.sessions2/#Player'>Player</a> interface through which media (i.e.
video/audio) playback in the frame may be observed, and/or controlled. Only one
<a class='link' href='../fuchsia.media.sessions2/'>fuchsia.media.sessions2</a>/<a class='link' href='../fuchsia.media.sessions2/#Player'>Player</a> may be active at a time, for each <a class='link' href='#Frame'>Frame</a>.</p>
#### Request {#Frame.GetMediaPlayer_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>player</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.media.sessions2/'>fuchsia.media.sessions2</a>/<a class='link' href='../fuchsia.media.sessions2/#Player'>Player</a>&gt;</code>
</td>
</tr>
</table>
### GetNavigationController {#Frame.GetNavigationController}
<p>Returns an interface through which the <a class='link' href='#Frame'>Frame</a> may be navigated to a desired URL,
reloaded, etc.</p>
<ul>
<li><code>controller</code>: An asynchronous interface request for the <a class='link' href='#Frame'>Frame</a>'s
<a class='link' href='#NavigationController'>NavigationController</a>.</li>
</ul>
#### Request {#Frame.GetNavigationController_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>controller</code></td>
<td>
<code>server_end&lt;<a class='link' href='#NavigationController'>NavigationController</a>&gt;</code>
</td>
</tr>
</table>
### GetPrivateMemorySize {#Frame.GetPrivateMemorySize}
<p>Returns the amount of private (non-shared) physical memory used by the Frame's main
document. The returned size might not reflect the memory usage of embedded iframes.</p>
#### Request {#Frame.GetPrivateMemorySize_Request}
&lt;EMPTY&gt;
#### Response {#Frame.GetPrivateMemorySize_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>size_bytes</code></td>
<td>
<code>uint64</code>
</td>
</tr>
</table>
### PostMessage {#Frame.PostMessage}
<p>Posts a message to the frame's onMessage handler.</p>
<p><code>target_origin</code> restricts message delivery to the specified origin. If <code>target_origin</code> is
<code>&quot;*&quot;</code>, then the message will be sent to the document regardless of its origin.
See the
<a href="https://html.spec.whatwg.org/multipage/web-messaging.html#posting-messages">HTML spec</a>
section 9.4.3 for more details on how the target origin policy is applied.</p>
<p>If an error occurred, the <a class='link' href='#FrameError'>FrameError</a> will be set to one of these values:</p>
<ul>
<li><code>INTERNAL_ERROR</code>: The WebEngine failed to create a message pipe.</li>
<li><code>BUFFER_NOT_UTF8</code>: The script in <code>message</code>'s <code>data</code> property is not UTF-8 encoded.</li>
<li><code>INVALID_ORIGIN</code>: <code>origins</code> is an empty vector.</li>
<li><code>NO_DATA_IN_MESSAGE</code>: The <code>data</code> property is missing in <code>message</code>.</li>
</ul>
#### Request {#Frame.PostMessage_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>target_origin</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>message</code></td>
<td>
<code><a class='link' href='#WebMessage'>WebMessage</a></code>
</td>
</tr>
</table>
#### Response {#Frame.PostMessage_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Frame_PostMessage_Result'>Frame_PostMessage_Result</a></code>
</td>
</tr>
</table>
### RemoveBeforeLoadJavaScript {#Frame.RemoveBeforeLoadJavaScript}
<p>Removes a previously added JavaScript snippet identified by <code>id</code>. This is a no-op if there
is no JavaScript snippet identified by <code>id</code>.</p>
#### Request {#Frame.RemoveBeforeLoadJavaScript_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>id</code></td>
<td>
<code>uint64</code>
</td>
</tr>
</table>
### ResetContentAreaSettings {#Frame.ResetContentAreaSettings}
<p>Reset the Frame's <a class='link' href='#ContentAreaSettings'>ContentAreaSettings</a> to default values.</p>
#### Request {#Frame.ResetContentAreaSettings_Request}
&lt;EMPTY&gt;
### SetBlockMediaLoading {#Frame.SetBlockMediaLoading}
<p>Sets whether to block all HTMLMediaElements in the frame from fetching and loading media
resources.</p>
<p>May be used, for example, to prevent loading media in frames that are not visible.</p>
<p>While media loading is blocked, elements with <code>autoplay</code> set to <code>true</code> will not start
playback. The promises returned by calls to <code>play()</code> will remain unresolved until loading is
unblocked by a call to this method.</p>
<p>When media loading is unblocked, elements will begin fetching, resource, loading, and
playing as appropriate.</p>
<p>Any elements that have begun fetching or loading media resources for the current source
before media loading was blocked will continue to fetch, load, and start playback as
appropriate. This includes calls to <code>play()</code> even after media loading is blocked.</p>
#### Request {#Frame.SetBlockMediaLoading_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>blocked</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### SetConsoleLogSink {#Frame.SetConsoleLogSink}
<p>Specifies where to emit <code>console</code> log output to. By default log output will be routed to a
<a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogSink'>LogSink</a> obtained via the <a class='link' href='../fuchsia.web/'>fuchsia.web</a>/<a class='link' href='../fuchsia.web/#Context'>Context</a>'s service directory.</p>
<ul>
<li><code>sink</code>: The <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogSink'>LogSink</a> to use to emit logs. Passing a <code>null</code> handle
resets logging to use the default <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogSink'>LogSink</a>.</li>
</ul>
#### Request {#Frame.SetConsoleLogSink_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>sink</code></td>
<td>
<code><a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogSink'>LogSink</a>?</code>
</td>
</tr>
</table>
### SetContentAreaSettings {#Frame.SetContentAreaSettings}
<p>Sets various settings for how web content should be run in the Frame. May be called at any
time, including after the URL has loaded. Each call changes only the specified fields,
overwriting any prior value.</p>
<p>This method will fail with <code>ZX_ERR_NOT_SUPPORTED</code> if any value in <a class='link' href='#ContentAreaSettings'>ContentAreaSettings</a>
is not supported by the Frame.</p>
#### Request {#Frame.SetContentAreaSettings_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>settings</code></td>
<td>
<code><a class='link' href='#ContentAreaSettings'>ContentAreaSettings</a></code>
</td>
</tr>
</table>
### SetJavaScriptLogLevel {#Frame.SetJavaScriptLogLevel}
<p>If set to a value other than <a class='link' href='#ConsoleLogLevel.NONE'>ConsoleLogLevel.NONE</a>, allows web content to log messages
to the <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogSink'>LogSink</a> configured for this <a class='link' href='#Frame'>Frame</a>, via the
<code>console</code> object (e.g. using <code>debug()</code>, <code>log()</code>, <code>info()</code>, <code>warn()</code> and
<code>error()</code>).
The default value is <a class='link' href='#ConsoleLogLevel.NONE'>ConsoleLogLevel.NONE</a>.</p>
<p>As the system log may be persisted, it is recommended that <a class='link' href='#ConsoleLogLevel.NONE'>ConsoleLogLevel.NONE</a> be used
in Incognito and other private browsing modes.</p>
<p>Log lines are written to the <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogsSink'>LogsSink</a> configured
for this <a class='link' href='../fuchsia.web/'>fuchsia.web</a>/<a class='link' href='../fuchsia.web/#Frame'>Frame</a>, with severities mapped as follows:</p>
<ul>
<li><code>debug()</code>, <code>log()</code> and <code>info()</code> are logged at <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogLevelFilter.INFO'>LogLevelFilter.INFO</a>
severity.</li>
<li><code>warn()</code> is logged at <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogLevelFilter.WARN'>LogLevelFilter.WARN</a> severity.</li>
<li><code>error()</code> is logged at <a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogLevelFilter.ERROR'>LogLevelFilter.ERROR</a> severity.</li>
</ul>
#### Request {#Frame.SetJavaScriptLogLevel_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>level</code></td>
<td>
<code><a class='link' href='#ConsoleLogLevel'>ConsoleLogLevel</a></code>
</td>
</tr>
</table>
### SetMediaSettings {#Frame.SetMediaSettings}
<p>Sets <a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#FrameMediaSettings'>FrameMediaSettings</a> for the frame. The specified parameters are
applied to audio streams that started after this message is processed. Should be called
before the Frame is navigated to content in order to ensure that the settings applied to
all media streams. Due to request pipelining, this means doing so before calling
<a class='link' href='#Frame.GetNavigationController()'>Frame.GetNavigationController()</a> and <a class='link' href='#NavigationController.LoadUrl()'>NavigationController.LoadUrl()</a>.</p>
#### Request {#Frame.SetMediaSettings_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>settings</code></td>
<td>
<code><a class='link' href='#FrameMediaSettings'>FrameMediaSettings</a></code>
</td>
</tr>
</table>
### SetNavigationEventListener {#Frame.SetNavigationEventListener}
<p>Sets the listener for handling page navigation events.</p>
<ul>
<li><code>listener</code>: The observer to use. Unregisters any existing listener if null.</li>
</ul>
#### Request {#Frame.SetNavigationEventListener_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>listener</code></td>
<td>
<code><a class='link' href='#NavigationEventListener'>NavigationEventListener</a>?</code>
</td>
</tr>
</table>
### SetNavigationEventListener2 {#Frame.SetNavigationEventListener2}
<p>Sets the listener for handling page navigation events. The listener will receive the
current navigation state immediately. After that, it's notified whenever the state changes.</p>
<ul>
<li><code>listener</code>: The observer to use. Unregisters any existing listener if null.</li>
<li><code>flags</code>: Flags for optional features that should be enabled for the listener.</li>
</ul>
#### Request {#Frame.SetNavigationEventListener2_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>listener</code></td>
<td>
<code><a class='link' href='#NavigationEventListener'>NavigationEventListener</a>?</code>
</td>
</tr>
<tr>
<td><code>flags</code></td>
<td>
<code><a class='link' href='#NavigationEventListenerFlags'>NavigationEventListenerFlags</a></code>
</td>
</tr>
</table>
### SetNavigationPolicyProvider {#Frame.SetNavigationPolicyProvider}
<p>Sets the navigation policy provider for the <a class='link' href='#Frame'>Frame</a>. When set, the <a class='link' href='#Frame'>Frame</a> sends
<a class='link' href='#NavigationPolicyProvider.EvaluateRequestedNavigation'>NavigationPolicyProvider.EvaluateRequestedNavigation</a> when processing navigation
requests. <code>params</code> defines when the message is sent. After sending the
<code>EvaluateRequestedNavigation</code> message, the <a class='link' href='#Frame'>Frame</a> blocks the corresponding navigation
until it receives a response.</p>
<p>Should be called before <code>GetNavigationController</code> to ensure that it is applied to all
navigations including the first <a class='link' href='#NavigationController.LoadURL'>NavigationController.LoadURL</a> request.</p>
#### Request {#Frame.SetNavigationPolicyProvider_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#NavigationPolicyProviderParams'>NavigationPolicyProviderParams</a></code>
</td>
</tr>
<tr>
<td><code>provider</code></td>
<td>
<code><a class='link' href='#NavigationPolicyProvider'>NavigationPolicyProvider</a></code>
</td>
</tr>
</table>
### SetPermissionState {#Frame.SetPermissionState}
<p>Sets the permission state for the specified <code>permission</code> and <code>web_origin</code>. By default, all
permissions are denied.</p>
#### Request {#Frame.SetPermissionState_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>permission</code></td>
<td>
<code><a class='link' href='#PermissionDescriptor'>PermissionDescriptor</a></code>
</td>
</tr>
<tr>
<td><code>web_origin</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>state</code></td>
<td>
<code><a class='link' href='#PermissionState'>PermissionState</a></code>
</td>
</tr>
</table>
### SetPopupFrameCreationListener {#Frame.SetPopupFrameCreationListener}
<p>Sets the listener for handling popup frame opened by web content. If no listener is
present, then any new popup frame will be blocked.</p>
<ul>
<li><code>listener</code>: The listener to use. Unregisters any existing listener if null.</li>
</ul>
#### Request {#Frame.SetPopupFrameCreationListener_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>listener</code></td>
<td>
<code><a class='link' href='#PopupFrameCreationListener'>PopupFrameCreationListener</a>?</code>
</td>
</tr>
</table>
### SetUrlRequestRewriteRules {#Frame.SetUrlRequestRewriteRules}
<p>Supplies a set of <a class='link' href='#UrlRequestRewriteRule'>UrlRequestRewriteRule</a> to apply on every subsequent URL request.</p>
<ul>
<li><code>rules</code> are cumulative and applied in order.</li>
<li><code>rules</code> are only applied on the first URL request in a redirect chain.</li>
<li><code>rules</code> will be validated before being applied. If <code>rules</code> are invalid, the <a class='link' href='#Frame'>Frame</a>
will be closed with <code>ERR_INVALID_ARGS</code>.</li>
<li><a class='link' href='#Frame.SetUrlRequestRewriteRules'>Frame.SetUrlRequestRewriteRules</a> must not be called again until its acknowledgement
callback has been processed. If this happens, the <a class='link' href='#Frame'>Frame</a> will be closed with
<code>ERR_BAD_STATE</code>.</li>
</ul>
#### Request {#Frame.SetUrlRequestRewriteRules_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>rules</code></td>
<td>
<code>vector&lt;<a class='link' href='#UrlRequestRewriteRule'>UrlRequestRewriteRule</a>&gt;[4096]</code>
</td>
</tr>
</table>
#### Response {#Frame.SetUrlRequestRewriteRules_Response}
&lt;EMPTY&gt;
## FrameHost {#FrameHost}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=301)*
<p>Used by <a class='link' href='#Context'>Context</a> clients to delegate <a class='link' href='#Frame'>Frame</a> hosting capabilities to selected peers.</p>
### CreateFrameWithParams {#FrameHost.CreateFrameWithParams}
<p>Behaves identically to <a class='link' href='#Context.CreateFrameWithParams'>Context.CreateFrameWithParams</a>.</p>
#### Request {#FrameHost.CreateFrameWithParams_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#CreateFrameParams'>CreateFrameParams</a></code>
</td>
</tr>
<tr>
<td><code>frame</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Frame'>Frame</a>&gt;</code>
</td>
</tr>
</table>
## MessagePort {#MessagePort}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=536)*
<p>Represents one end of an HTML5 MessageChannel. Can be used to send and exchange Messages with
the peered MessagePort in the Frame's script context. The port is destroyed when either end of
the MessagePort channel is torn down.</p>
### PostMessage {#MessagePort.PostMessage}
<p>Sends a <a class='link' href='#WebMessage'>WebMessage</a> to the peer. These are processed in order, one at a
time. It is not necessary for the caller to wait for the completion callback before calling
<a class='link' href='#MessagePort.PostMessage'>MessagePort.PostMessage</a> again.</p>
<p>If an error occurred, the <a class='link' href='#FrameError'>FrameError</a> will be set to one of these value:</p>
<ul>
<li><code>BUFFER_NOT_UTF8</code>: The script in <code>message</code>'s <code>data</code> property is not UTF-8 encoded.</li>
<li><code>NO_DATA_IN_MESSAGE</code>: The <code>data</code> property is missing in <code>message</code>.</li>
</ul>
#### Request {#MessagePort.PostMessage_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>message</code></td>
<td>
<code><a class='link' href='#WebMessage'>WebMessage</a></code>
</td>
</tr>
</table>
#### Response {#MessagePort.PostMessage_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#MessagePort_PostMessage_Result'>MessagePort_PostMessage_Result</a></code>
</td>
</tr>
</table>
### ReceiveMessage {#MessagePort.ReceiveMessage}
<p>Asynchronously reads the next message from the channel. The client should invoke the
callback when it is ready to process another message. Unreceived messages are buffered
on the sender's side and bounded by its available resources.</p>
#### Request {#MessagePort.ReceiveMessage_Request}
&lt;EMPTY&gt;
#### Response {#MessagePort.ReceiveMessage_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>message</code></td>
<td>
<code><a class='link' href='#WebMessage'>WebMessage</a></code>
</td>
</tr>
</table>
## NavigationController {#NavigationController}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=47)*
<p>Provides methods for controlling and querying the navigation state of a <a class='link' href='#Frame'>Frame</a>.</p>
### GoBack {#NavigationController.GoBack}
<p>Tells the <a class='link' href='#Frame'>Frame</a> to navigate to the previous page in its history, if any.</p>
#### Request {#NavigationController.GoBack_Request}
&lt;EMPTY&gt;
### GoForward {#NavigationController.GoForward}
<p>Tells the <a class='link' href='#Frame'>Frame</a> to navigate to the next page in its history, if any.</p>
#### Request {#NavigationController.GoForward_Request}
&lt;EMPTY&gt;
### LoadUrl {#NavigationController.LoadUrl}
<p>Tells the <a class='link' href='#Frame'>Frame</a> to navigate to a <code>url</code>.</p>
<ul>
<li><code>url</code>: The address to navigate to.</li>
<li><code>params</code>: Additional parameters that affect how the resource will be loaded (e.g.
cookies, HTTP headers, etc.)</li>
</ul>
<p>If an error occurred, the <a class='link' href='#NavigationControllerError'>NavigationControllerError</a> will be set to one of these values:</p>
<ul>
<li><code>INVALID_URL</code>: The <code>url</code> parameter is invalid.</li>
<li><code>INVALID_HEADER</code>: At least one of the headers in <a class='link' href='#LoadUrlParams.headers'>LoadUrlParams.headers</a> is invalid.</li>
</ul>
#### Request {#NavigationController.LoadUrl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#LoadUrlParams'>LoadUrlParams</a></code>
</td>
</tr>
</table>
#### Response {#NavigationController.LoadUrl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#NavigationController_LoadUrl_Result'>NavigationController_LoadUrl_Result</a></code>
</td>
</tr>
</table>
### Reload {#NavigationController.Reload}
<p>Tells the <a class='link' href='#Frame'>Frame</a> to reload the current page.</p>
#### Request {#NavigationController.Reload_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>type</code></td>
<td>
<code><a class='link' href='#ReloadType'>ReloadType</a></code>
</td>
</tr>
</table>
### Stop {#NavigationController.Stop}
<p>Tells the <a class='link' href='#Frame'>Frame</a> to stop the current navigation if a navigation is ongoing.</p>
#### Request {#NavigationController.Stop_Request}
&lt;EMPTY&gt;
## NavigationEventListener {#NavigationEventListener}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=11)*
<p>Interface supplied by the embedder for receiving notifications about navigation events in a
<a class='link' href='#Frame'>Frame</a>.</p>
### OnNavigationStateChanged {#NavigationEventListener.OnNavigationStateChanged}
<p>Called immediately after <a class='link' href='#Frame.SetNavigationEventListener'>Frame.SetNavigationEventListener</a> and every time user-visible
navigation state has changed. In the first call, <code>change</code> contains the current navigation
state (empty before the first navigation request). In every following call, <code>change</code> will
have values set for all fields that have changed at any time since the previous
notification. This means that some fields may have the same value as was previously
reported, for example, if they changed to some other value and back again. If a field is
unset, then its value has not changed at any time since the previous notification.</p>
<p>Implementer must call the acknowledgement callback to receive new navigation events.</p>
#### Request {#NavigationEventListener.OnNavigationStateChanged_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>change</code></td>
<td>
<code><a class='link' href='#NavigationState'>NavigationState</a></code>
</td>
</tr>
</table>
#### Response {#NavigationEventListener.OnNavigationStateChanged_Response}
&lt;EMPTY&gt;
## NavigationPolicyProvider {#NavigationPolicyProvider}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=26)*
### EvaluateRequestedNavigation {#NavigationPolicyProvider.EvaluateRequestedNavigation}
<p>Called when the <a class='link' href='#Frame'>Frame</a> is processing a navigation request in one of the phase(s)
specified in <a class='link' href='#NavigationPolicyProviderParams'>NavigationPolicyProviderParams</a>. Navigation is paused until the result is
received. The returned <a class='link' href='#NavigationDecision'>NavigationDecision</a> defines how the navigation should proceed.</p>
#### Request {#NavigationPolicyProvider.EvaluateRequestedNavigation_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>requested_navigation</code></td>
<td>
<code><a class='link' href='#RequestedNavigation'>RequestedNavigation</a></code>
</td>
</tr>
</table>
#### Response {#NavigationPolicyProvider.EvaluateRequestedNavigation_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>decision</code></td>
<td>
<code><a class='link' href='#NavigationDecision'>NavigationDecision</a></code>
</td>
</tr>
</table>
## PopupFrameCreationListener {#PopupFrameCreationListener}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=566)*
### OnPopupFrameCreated {#PopupFrameCreationListener.OnPopupFrameCreated}
<p>Called when a <a class='link' href='#Frame'>Frame</a> has created a new popup <code>frame</code>. Information about the popup frame,
and how it was created, is provided via <code>info</code>. Additional popup frames are delivered after
the acknowledgement callback is invoked.</p>
#### Request {#PopupFrameCreationListener.OnPopupFrameCreated_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>frame</code></td>
<td>
<code><a class='link' href='#Frame'>Frame</a></code>
</td>
</tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#PopupFrameCreationInfo'>PopupFrameCreationInfo</a></code>
</td>
</tr>
</table>
#### Response {#PopupFrameCreationListener.OnPopupFrameCreated_Response}
&lt;EMPTY&gt;
## **STRUCTS**
### Context_GetRemoteDebuggingPort_Response {#Context_GetRemoteDebuggingPort_Response data-text="Context_GetRemoteDebuggingPort_Response"}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=259)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Context_GetRemoteDebuggingPort_Response.port">
<td><code>port</code></td>
<td>
<code>uint16</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Frame_AddBeforeLoadJavaScript_Response {#Frame_AddBeforeLoadJavaScript_Response data-text="Frame_AddBeforeLoadJavaScript_Response"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=271)*
&lt;EMPTY&gt;
### Frame_ExecuteJavaScriptNoResult_Response {#Frame_ExecuteJavaScriptNoResult_Response data-text="Frame_ExecuteJavaScriptNoResult_Response"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=248)*
&lt;EMPTY&gt;
### Frame_ExecuteJavaScript_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Frame_ExecuteJavaScript_Response data-text="Frame_ExecuteJavaScript_Response"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=239)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Frame_ExecuteJavaScript_Response.result">
<td><code>result</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Frame_PostMessage_Response {#Frame_PostMessage_Response data-text="Frame_PostMessage_Response"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=295)*
&lt;EMPTY&gt;
### MessagePort_PostMessage_Response {#MessagePort_PostMessage_Response data-text="MessagePort_PostMessage_Response"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=546)*
&lt;EMPTY&gt;
### NavigationController_LoadUrl_Response {#NavigationController_LoadUrl_Response data-text="NavigationController_LoadUrl_Response"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=60)*
&lt;EMPTY&gt;
### NoArgumentsAction {#NoArgumentsAction data-text="NoArgumentsAction"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=215)*
<p>Empty struct used in NavigationDecision for actions that don't hav any arguments.</p>
&lt;EMPTY&gt;
## **ENUMS**
### AllowInputState [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#AllowInputState data-text="AllowInputState"}
Type: <code>int32</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=62)*
<p>Controls whether <a class='link' href='#Frame.ConfigureInputTypes()'>Frame.ConfigureInputTypes()</a> should allow or deny processing of the
specified <a class='link' href='#InputTypes'>InputTypes</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="AllowInputState.ALLOW">
<td><h3 id="AllowInputState.ALLOW" class="add-link hide-from-toc">ALLOW</h3></td>
<td><code>1</code></td>
<td></td>
</tr>
<tr id="AllowInputState.DENY">
<td><h3 id="AllowInputState.DENY" class="add-link hide-from-toc">DENY</h3></td>
<td><code>2</code></td>
<td></td>
</tr>
</table>
### AutoplayPolicy [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#AutoplayPolicy data-text="AutoplayPolicy"}
Type: <code>int32</code>
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=310)*
<p>Specifies the policy for automatic (non user-initiated) playback of video and audio content.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="AutoplayPolicy.ALLOW">
<td><h3 id="AutoplayPolicy.ALLOW" class="add-link hide-from-toc">ALLOW</h3></td>
<td><code>1</code></td>
<td><p>All media is permitted to autoplay.</p>
</td>
</tr>
<tr id="AutoplayPolicy.REQUIRE_USER_ACTIVATION">
<td><h3 id="AutoplayPolicy.REQUIRE_USER_ACTIVATION" class="add-link hide-from-toc">REQUIRE_USER_ACTIVATION</h3></td>
<td><code>2</code></td>
<td><p>Allow autoplay when the document has received a user activation. This can be the result of
user action or <a class='link' href='#LoadUrlParams.was_user_activated'>LoadUrlParams.was_user_activated</a> being set.</p>
</td>
</tr>
</table>
### ConsoleLogLevel [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ConsoleLogLevel data-text="ConsoleLogLevel"}
Type: <code>int32</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=16)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ConsoleLogLevel.NONE">
<td><h3 id="ConsoleLogLevel.NONE" class="add-link hide-from-toc">NONE</h3></td>
<td><code>100</code></td>
<td><p>No logging.</p>
</td>
</tr>
<tr id="ConsoleLogLevel.DEBUG">
<td><h3 id="ConsoleLogLevel.DEBUG" class="add-link hide-from-toc">DEBUG</h3></td>
<td><code>-1</code></td>
<td><p>Outputs messages from <code>console.debug()</code> and above levels.</p>
</td>
</tr>
<tr id="ConsoleLogLevel.INFO">
<td><h3 id="ConsoleLogLevel.INFO" class="add-link hide-from-toc">INFO</h3></td>
<td><code>0</code></td>
<td><p>Outputs messages from <code>console.log()</code>, <code>console.info()</code> and above levels.</p>
</td>
</tr>
<tr id="ConsoleLogLevel.WARN">
<td><h3 id="ConsoleLogLevel.WARN" class="add-link hide-from-toc">WARN</h3></td>
<td><code>1</code></td>
<td><p>Outputs messages from <code>console.warn()</code> and <code>console.error()</code>.</p>
</td>
</tr>
<tr id="ConsoleLogLevel.ERROR">
<td><h3 id="ConsoleLogLevel.ERROR" class="add-link hide-from-toc">ERROR</h3></td>
<td><code>2</code></td>
<td><p>Outputs messages from <code>console.error()</code>.</p>
</td>
</tr>
</table>
### ContextError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ContextError data-text="ContextError"}
Type: <code>int32</code>
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=9)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ContextError.REMOTE_DEBUGGING_PORT_NOT_OPENED">
<td><h3 id="ContextError.REMOTE_DEBUGGING_PORT_NOT_OPENED" class="add-link hide-from-toc">REMOTE_DEBUGGING_PORT_NOT_OPENED</h3></td>
<td><code>1</code></td>
<td><p>The remote debugging service was not opened.</p>
</td>
</tr>
</table>
### FrameError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#FrameError data-text="FrameError"}
Type: <code>int32</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=68)*
<p>Represents the return status of a <a class='link' href='#Frame'>Frame</a> method.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="FrameError.INTERNAL_ERROR">
<td><h3 id="FrameError.INTERNAL_ERROR" class="add-link hide-from-toc">INTERNAL_ERROR</h3></td>
<td><code>1</code></td>
<td><p>An internal error occurred.</p>
</td>
</tr>
<tr id="FrameError.BUFFER_NOT_UTF8">
<td><h3 id="FrameError.BUFFER_NOT_UTF8" class="add-link hide-from-toc">BUFFER_NOT_UTF8</h3></td>
<td><code>2</code></td>
<td><p>The provided buffer is not UTF-8 encoded.</p>
</td>
</tr>
<tr id="FrameError.INVALID_ORIGIN">
<td><h3 id="FrameError.INVALID_ORIGIN" class="add-link hide-from-toc">INVALID_ORIGIN</h3></td>
<td><code>3</code></td>
<td><p>The Frame's URL does not match any of the origins provided by the caller.</p>
</td>
</tr>
<tr id="FrameError.NO_DATA_IN_MESSAGE">
<td><h3 id="FrameError.NO_DATA_IN_MESSAGE" class="add-link hide-from-toc">NO_DATA_IN_MESSAGE</h3></td>
<td><code>4</code></td>
<td><p>The required <code>data</code> property is missing from a <a class='link' href='#WebMessage'>WebMessage</a>.</p>
</td>
</tr>
</table>
### LoadUrlReason [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#LoadUrlReason data-text="LoadUrlReason"}
Type: <code>uint32</code>
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=140)*
<p>Characterizes the origin of a <a class='link' href='#NavigationController.LoadUrl'>NavigationController.LoadUrl</a> request.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="LoadUrlReason.LINK">
<td><h3 id="LoadUrlReason.LINK" class="add-link hide-from-toc">LINK</h3></td>
<td><code>0</code></td>
<td><p>Navigation was initiated by the user following a link.</p>
</td>
</tr>
<tr id="LoadUrlReason.TYPED">
<td><h3 id="LoadUrlReason.TYPED" class="add-link hide-from-toc">TYPED</h3></td>
<td><code>1</code></td>
<td><p>Navigation was initiated by a user-provided URL.</p>
</td>
</tr>
</table>
### NavigationControllerError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#NavigationControllerError data-text="NavigationControllerError"}
Type: <code>int32</code>
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=38)*
<p>Represents the return status of a <a class='link' href='#NavigationController'>NavigationController</a> method.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="NavigationControllerError.INVALID_URL">
<td><h3 id="NavigationControllerError.INVALID_URL" class="add-link hide-from-toc">INVALID_URL</h3></td>
<td><code>1</code></td>
<td><p>The provided URL is invalid.</p>
</td>
</tr>
<tr id="NavigationControllerError.INVALID_HEADER">
<td><h3 id="NavigationControllerError.INVALID_HEADER" class="add-link hide-from-toc">INVALID_HEADER</h3></td>
<td><code>2</code></td>
<td><p>At least one of the provided headers was invalid.</p>
</td>
</tr>
</table>
### PageType [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PageType data-text="PageType"}
Type: <code>uint32</code>
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=149)*
<p>Characterizes the page type in a <a class='link' href='#NavigationState'>NavigationState</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PageType.NORMAL">
<td><h3 id="PageType.NORMAL" class="add-link hide-from-toc">NORMAL</h3></td>
<td><code>0</code></td>
<td><p>Regular web page.</p>
</td>
</tr>
<tr id="PageType.ERROR">
<td><h3 id="PageType.ERROR" class="add-link hide-from-toc">ERROR</h3></td>
<td><code>1</code></td>
<td><p>Error page.</p>
</td>
</tr>
</table>
### PermissionState [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PermissionState data-text="PermissionState"}
Type: <code>uint8</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=103)*
<p>A state for a web permission.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PermissionState.DENIED">
<td><h3 id="PermissionState.DENIED" class="add-link hide-from-toc">DENIED</h3></td>
<td><code>1</code></td>
<td><p>Permission is denied.</p>
</td>
</tr>
<tr id="PermissionState.GRANTED">
<td><h3 id="PermissionState.GRANTED" class="add-link hide-from-toc">GRANTED</h3></td>
<td><code>2</code></td>
<td><p>Permission is granted.</p>
</td>
</tr>
</table>
### PermissionType [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PermissionType data-text="PermissionType"}
Type: <code>uint16</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=83)*
<p>Identifies a type of permission that may be granted to a web origin.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PermissionType.MICROPHONE">
<td><h3 id="PermissionType.MICROPHONE" class="add-link hide-from-toc">MICROPHONE</h3></td>
<td><code>1</code></td>
<td><p>Permission to access microphone(s).</p>
</td>
</tr>
<tr id="PermissionType.CAMERA">
<td><h3 id="PermissionType.CAMERA" class="add-link hide-from-toc">CAMERA</h3></td>
<td><code>2</code></td>
<td><p>Permission to access camera(s).</p>
</td>
</tr>
<tr id="PermissionType.PROTECTED_MEDIA_IDENTIFIER">
<td><h3 id="PermissionType.PROTECTED_MEDIA_IDENTIFIER" class="add-link hide-from-toc">PROTECTED_MEDIA_IDENTIFIER</h3></td>
<td><code>3</code></td>
<td><p>Permission to use device identifier(s) for EME.</p>
</td>
</tr>
<tr id="PermissionType.PERSISTENT_STORAGE">
<td><h3 id="PermissionType.PERSISTENT_STORAGE" class="add-link hide-from-toc">PERSISTENT_STORAGE</h3></td>
<td><code>4</code></td>
<td><p>Permission to use persistent storage.</p>
</td>
</tr>
</table>
### ReloadType [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ReloadType data-text="ReloadType"}
Type: <code>uint32</code>
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=131)*
<p>Characterizes the type of reload.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ReloadType.PARTIAL_CACHE">
<td><h3 id="ReloadType.PARTIAL_CACHE" class="add-link hide-from-toc">PARTIAL_CACHE</h3></td>
<td><code>0</code></td>
<td><p>Reloads the current entry, bypassing the cache for the main resource.</p>
</td>
</tr>
<tr id="ReloadType.NO_CACHE">
<td><h3 id="ReloadType.NO_CACHE" class="add-link hide-from-toc">NO_CACHE</h3></td>
<td><code>1</code></td>
<td><p>Reloads the current entry, bypassing the cache entirely.</p>
</td>
</tr>
</table>
### UrlRequestAction [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#UrlRequestAction data-text="UrlRequestAction"}
Type: <code>int32</code>
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=25)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="UrlRequestAction.ALLOW">
<td><h3 id="UrlRequestAction.ALLOW" class="add-link hide-from-toc">ALLOW</h3></td>
<td><code>1</code></td>
<td><p>Allow the request to be processed.</p>
</td>
</tr>
<tr id="UrlRequestAction.DENY">
<td><h3 id="UrlRequestAction.DENY" class="add-link hide-from-toc">DENY</h3></td>
<td><code>2</code></td>
<td><p>Block the request.</p>
</td>
</tr>
</table>
## **TABLES**
### ContentAreaSettings {#ContentAreaSettings data-text="ContentAreaSettings"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=113)*
<p>Settings for the web content in the Frame. Popup Frames created by the Frame will have their
settings initialized to the Frame's current settings.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ContentAreaSettings.hide_scrollbars">
<td><h3 id="ContentAreaSettings.hide_scrollbars" class="add-link hide-from-toc">1</h3></td>
<td><code>hide_scrollbars</code></td>
<td>
<code>bool</code>
</td>
<td><p>Specifies whether scrollbars are hidden for the Frame. If omitted, the default is false.</p>
</td>
</tr>
<tr id="ContentAreaSettings.autoplay_policy">
<td><h3 id="ContentAreaSettings.autoplay_policy" class="add-link hide-from-toc">2</h3></td>
<td><code>autoplay_policy</code></td>
<td>
<code><a class='link' href='#AutoplayPolicy'>AutoplayPolicy</a></code>
</td>
<td><p>Specifies the autoplay policy for the Frame. If omitted, the default policy is
<code>REQUIRE_USER_ACTIVATION</code>.</p>
</td>
</tr>
<tr id="ContentAreaSettings.theme">
<td><h3 id="ContentAreaSettings.theme" class="add-link hide-from-toc">3</h3></td>
<td><code>theme</code></td>
<td>
<code><a class='link' href='../fuchsia.settings/'>fuchsia.settings</a>/<a class='link' href='../fuchsia.settings/#ThemeType'>ThemeType</a></code>
</td>
<td><p>Specifies the color theme reported to web content via the <code>prefers-color-scheme</code> media
query.
Valid inputs are <code>LIGHT</code>, <code>DARK</code>, and <code>DEFAULT</code>. If omitted, the default is LIGHT theme.
Specifying <code>DEFAULT</code> means using the system settings, and requires that the <a class='link' href='#Context'>Context</a> have
the <a class='link' href='#fuchsia.settings.Display'>fuchsia.settings.Display</a> service. If the service is not available, the <a class='link' href='#Frame'>Frame</a>
will disconnect with <code>ZX_ERR_INVALID_ARGS</code>.</p>
</td>
</tr>
<tr id="ContentAreaSettings.page_scale">
<td><h3 id="ContentAreaSettings.page_scale" class="add-link hide-from-toc">4</h3></td>
<td><code>page_scale</code></td>
<td>
<code>float32</code>
</td>
<td><p>Sets scale factor (zoom level) that should be applied to web content rendered in this
frame. Values above 1.0 make all web content (including text and images) larger, while
values below 1.0 will make it smaller. In other words, values above 1.0 are used to zoom in
and values below 1.0 zoom out. The overall ratio between physical pixel and CSS pixel is a
product of the scale set with this method and the scale provided by Scenic (see
<a class='link' href='#fuchsia.ui.gfx.Metrics'>fuchsia.ui.gfx.Metrics</a>). That product is visible to the web content as
<code>window.devicePixelRatio</code>. If omitted, the default is 1.0.</p>
<p>This setting does not have any effect on the size of the view on the screen and the
resolution at which the view is rendered. Native (non-web) UI elements, such as default
scroll bars and default mouse cursor, are not scaled. User may zoom the page further when
pinch-zoom is enabled (see <a class='link' href='#InputTypes.GESTURE_PINCH'>InputTypes.GESTURE_PINCH</a>).</p>
</td>
</tr>
</table>
### ContentDirectoryProvider [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ContentDirectoryProvider data-text="ContentDirectoryProvider"}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=50)*
<p>Defines a provider which hosts resources from a <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a>. Content can <code>GET</code>
resource files via the provider, but not enumerate directories. Resources can be accessed by
their URLs: <code>fuchsia-dir://&lt;provider-name&gt;/&lt;path/to/resource&gt;</code></p>
<p>By default the MIME types of files are determined automatically by &quot;sniffing&quot; the contents of
the files. No content encoding will be declared, which browsers will interpret as meaning
<code>&quot;text/plain&quot;</code>.</p>
<p>Content type and encoding metadata may optionally be specified explicitly by metadata files,
which reside alongside the file. Metadata is expressed in JSON files, named after the files
they describe with a <code>&quot;._metadata&quot;</code> suffix.</p>
<p>For example, the file <code>&quot;index.html&quot;</code> would have the a metadata file called
<code>&quot;index.html._metadata&quot;</code>, with the following contents:</p>
<pre><code>{
&quot;charset&quot;: &quot;utf-8&quot;,
&quot;mime&quot;: &quot;text/html&quot;
}
</code></pre>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ContentDirectoryProvider.name">
<td><h3 id="ContentDirectoryProvider.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code>string[255]</code>
</td>
<td><p>Name of the provider. Must be non-empty and composed solely of alphanumerics, dots, and
dashes.</p>
</td>
</tr>
<tr id="ContentDirectoryProvider.directory">
<td><h3 id="ContentDirectoryProvider.directory" class="add-link hide-from-toc">2</h3></td>
<td><code>directory</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a></code>
</td>
<td><p>Directory containing the files served by this provider.</p>
</td>
</tr>
</table>
### Cookie [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Cookie data-text="Cookie"}
*Defined in [fuchsia.web/cookie.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/cookie.fidl;l=59)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Cookie.id">
<td><h3 id="Cookie.id" class="add-link hide-from-toc">1</h3></td>
<td><code>id</code></td>
<td>
<code><a class='link' href='#CookieId'>CookieId</a></code>
</td>
<td><p>A table with fields to identify a cookie.</p>
</td>
</tr>
<tr id="Cookie.value">
<td><h3 id="Cookie.value" class="add-link hide-from-toc">2</h3></td>
<td><code>value</code></td>
<td>
<code>string</code>
</td>
<td><p>The cookie value.
RFC6265 does not specify an upper limit on cookie size, but recommends
that at least 4096 bytes are supported.</p>
</td>
</tr>
</table>
### CookieId {#CookieId data-text="CookieId"}
*Defined in [fuchsia.web/cookie.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/cookie.fidl;l=46)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CookieId.name">
<td><h3 id="CookieId.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='#CookieName'>CookieName</a></code>
</td>
<td><p>An RFC2616 &quot;token&quot; chosen by the site to identify the cookie.</p>
</td>
</tr>
<tr id="CookieId.domain">
<td><h3 id="CookieId.domain" class="add-link hide-from-toc">2</h3></td>
<td><code>domain</code></td>
<td>
<code>string[255]</code>
</td>
<td><p>The RFC1034 &quot;subdomain&quot; to which this cookie is scoped.
e.g. &quot;example.com&quot; allows access from all *.example.com sub-domains.</p>
</td>
</tr>
<tr id="CookieId.path">
<td><h3 id="CookieId.path" class="add-link hide-from-toc">3</h3></td>
<td><code>path</code></td>
<td>
<code>string[65536]</code>
</td>
<td><p>The URL &quot;path&quot; prefix to which this cookie is scoped.
e.g. &quot;/&quot; allows access from all paths.</p>
</td>
</tr>
</table>
### CreateContextParams [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#CreateContextParams data-text="CreateContextParams"}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=124)*
<p>Parameters specifying the configuration for a new <a class='link' href='#Context'>Context</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CreateContextParams.service_directory">
<td><h3 id="CreateContextParams.service_directory" class="add-link hide-from-toc">1</h3></td>
<td><code>service_directory</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a></code>
</td>
<td><p>Service directory to be used by the context. The following services must be present in the
directory:</p>
<ul>
<li><a class='link' href='../fuchsia.buildinfo/'>fuchsia.buildinfo</a>/<a class='link' href='../fuchsia.buildinfo/#Provider'>Provider</a></li>
<li><a class='link' href='../fuchsia.device/'>fuchsia.device</a>/<a class='link' href='../fuchsia.device/#NameProvider'>NameProvider</a></li>
<li><a class='link' href='../fuchsia.fonts/'>fuchsia.fonts</a>/<a class='link' href='../fuchsia.fonts/#Provider'>Provider</a></li>
<li><a class='link' href='../fuchsia.intl/'>fuchsia.intl</a>/<a class='link' href='../fuchsia.intl/#PropertyProvider'>PropertyProvider</a></li>
<li><a class='link' href='../fuchsia.kernel/'>fuchsia.kernel</a>/<a class='link' href='../fuchsia.kernel/#VmexResource'>VmexResource</a> (unless <a class='link' href='#DISABLE_DYNAMIC_CODE_GENERATION'>DISABLE_DYNAMIC_CODE_GENERATION</a> is set)</li>
<li><a class='link' href='../fuchsia.logger/'>fuchsia.logger</a>/<a class='link' href='../fuchsia.logger/#LogSink'>LogSink</a></li>
<li><a class='link' href='../fuchsia.memorypressure/'>fuchsia.memorypressure</a>/<a class='link' href='../fuchsia.memorypressure/#Provider'>Provider</a></li>
<li><a class='link' href='../fuchsia.process/'>fuchsia.process</a>/<a class='link' href='../fuchsia.process/#Launcher'>Launcher</a></li>
<li><a class='link' href='../fuchsia.sysmem/'>fuchsia.sysmem</a>/<a class='link' href='../fuchsia.sysmem/#Allocator'>Allocator</a></li>
</ul>
<p>The following services must be present in order to render web content in a Scenic view
using <a class='link' href='#Frame.CreateView'>Frame.CreateView</a>, <a class='link' href='#Frame.CreateViewWithViewRef'>Frame.CreateViewWithViewRef</a> or <a class='link' href='#Frame.CreateView2'>Frame.CreateView2</a>]:</p>
<ul>
<li><a class='link' href='../fuchsia.accessibility.semantics/'>fuchsia.accessibility.semantics</a>/<a class='link' href='../fuchsia.accessibility.semantics/#SemanticsManager'>SemanticsManager</a></li>
<li><a class='link' href='../fuchsia.ui.composition/'>fuchsia.ui.composition</a>/<a class='link' href='../fuchsia.ui.composition/#Allocator'>Allocator</a></li>
<li><a class='link' href='../fuchsia.ui.composition/'>fuchsia.ui.composition</a>/<a class='link' href='../fuchsia.ui.composition/#Flatland'>Flatland</a></li>
<li><a class='link' href='../fuchsia.ui.scenic/'>fuchsia.ui.scenic</a>/<a class='link' href='../fuchsia.ui.scenic/#Scenic'>Scenic</a></li>
</ul>
<p>The following services must be present in order to collect diagnostic tracing data.</p>
<ul>
<li><a class='link' href='#fuchsia.tracing.perfetto.ProducerConnector'>fuchsia.tracing.perfetto.ProducerConnector</a>: for browser trace data.</li>
<li><a class='link' href='#fuchsia.tracing.provider.Registry'>fuchsia.tracing.provider.Registry</a>: for Vulkan trace data.</li>
</ul>
</td>
</tr>
<tr id="CreateContextParams.data_directory">
<td><h3 id="CreateContextParams.data_directory" class="add-link hide-from-toc">2</h3></td>
<td><code>data_directory</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a></code>
</td>
<td><p>Handle to the directory that will contain the <a class='link' href='#Context'>Context</a>'s persistent data. If it is left
unset, then the created <a class='link' href='#Context'>Context</a> will be stateless, with all of its data discarded upon
<a class='link' href='#Context'>Context</a> destruction.</p>
<p>If set, <code>data_directory</code> must not be shared with any other <a class='link' href='#Context'>Context</a>.</p>
</td>
</tr>
<tr id="CreateContextParams.user_agent_product">
<td><h3 id="CreateContextParams.user_agent_product" class="add-link hide-from-toc">3</h3></td>
<td><code>user_agent_product</code></td>
<td>
<code>string[128]</code>
</td>
<td><p>Optional string describing the embedding product to append to the User-Agent string.
See the specification for the
<a href="https://tools.ietf.org/html/rfc7231#section-5.5.3">HTTP User-Agent header</a>.
Requires that <code>user_agent_version</code> is also specified.</p>
</td>
</tr>
<tr id="CreateContextParams.user_agent_version">
<td><h3 id="CreateContextParams.user_agent_version" class="add-link hide-from-toc">4</h3></td>
<td><code>user_agent_version</code></td>
<td>
<code>string[128]</code>
</td>
<td><p>Optional version for the embedding product to append to the User-Agent string.</p>
<p>Requires that <code>user_agent_product</code> is also specified.</p>
</td>
</tr>
<tr id="CreateContextParams.remote_debugging_port">
<td><h3 id="CreateContextParams.remote_debugging_port" class="add-link hide-from-toc">5</h3></td>
<td><code>remote_debugging_port</code></td>
<td>
<code>uint16</code>
</td>
<td><p>Enables Frames to be created with remote debugging enabled using the DevTools protocol. If
<code>port</code> is 0, then an ephemeral port will be used, which can be queried via the
<a class='link' href='#Context.GetRemoteDebuggingPort'>Context.GetRemoteDebuggingPort</a> API.</p>
</td>
</tr>
<tr id="CreateContextParams.content_directories">
<td><h3 id="CreateContextParams.content_directories" class="add-link hide-from-toc">6</h3></td>
<td><code>content_directories</code></td>
<td>
<code>vector&lt;<a class='link' href='#ContentDirectoryProvider'>ContentDirectoryProvider</a>&gt;[100]</code>
</td>
<td><p>List of providers whose contents will be served by <code>fuchsia-dir://</code> URLs.</p>
</td>
</tr>
<tr id="CreateContextParams.features">
<td><h3 id="CreateContextParams.features" class="add-link hide-from-toc">7</h3></td>
<td><code>features</code></td>
<td>
<code><a class='link' href='#ContextFeatureFlags'>ContextFeatureFlags</a></code>
</td>
<td><p>Optional features that should be enabled for this context. Some features may also require
additional services in <code>service_directory</code>.</p>
</td>
</tr>
<tr id="CreateContextParams.playready_key_system">
<td><h3 id="CreateContextParams.playready_key_system" class="add-link hide-from-toc">8</h3></td>
<td><code>playready_key_system</code></td>
<td>
<code>string[128]</code>
</td>
<td><p>Enables PlayReady CDM for the Context using the specified string as a key system
string. The string should be a reverse domain name, as required by
<a href="https://www.w3.org/TR/encrypted-media/#key-system">EME API</a>.</p>
<ul>
<li>Requires <a class='link' href='../fuchsia.media.drm/'>fuchsia.media.drm</a>/<a class='link' href='../fuchsia.media.drm/#PlayReady'>PlayReady</a> service.</li>
<li>Requires that a <code>cdm_data_directory</code> be specified in <a class='link' href='#CreateContextParams'>CreateContextParams</a>.</li>
</ul>
</td>
</tr>
<tr id="CreateContextParams.unsafely_treat_insecure_origins_as_secure">
<td><h3 id="CreateContextParams.unsafely_treat_insecure_origins_as_secure" class="add-link hide-from-toc">9</h3></td>
<td><code>unsafely_treat_insecure_origins_as_secure</code></td>
<td>
<code>vector&lt;string&gt;[100]</code>
</td>
<td><p>Treat given insecure origins as secure origins. For the definition of secure contexts, see
<a href="https://w3c.github.io/webappsec-secure-contexts/">Secure Contexts</a> and
<a href="https://www.w3.org/TR/powerful-features/#is-origin-trustworthy">origin trustworthiness</a>.</p>
<p>Example value: <code>{&quot;http://a.com&quot;, &quot;http://b.com&quot;}</code>.</p>
</td>
</tr>
<tr id="CreateContextParams.cors_exempt_headers">
<td><h3 id="CreateContextParams.cors_exempt_headers" class="add-link hide-from-toc">10</h3></td>
<td><code>cors_exempt_headers</code></td>
<td>
<code>vector&lt;vector&lt;uint8&gt;&gt;</code>
</td>
<td><p>Specifies a set of header names for which <a href="https://www.w3.org/TR/cors/">Cross-Origin Resource Sharing
(CORS)</a> checks should not be enforced.</p>
</td>
</tr>
<tr id="CreateContextParams.cdm_data_directory">
<td><h3 id="CreateContextParams.cdm_data_directory" class="add-link hide-from-toc">11</h3></td>
<td><code>cdm_data_directory</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a></code>
</td>
<td><p>Specifies the storage to use to persistent content licensing related data (e.g.
provisioning data, persistent session data). By default these data will be placed under the
<code>data_directory</code>, if specified.</p>
<p>If neither <code>data_directory</code> nor <code>cdm_data_directory</code> are specified, then content licensing
features requiring persistent storage (e.g. persistent licensing sessions) will not be
available to the <a class='link' href='#Context'>Context</a>.</p>
<p>Note that not all content licensing systems support persistent sessions, regardless of
whether persistent storage is provided.</p>
</td>
</tr>
<tr id="CreateContextParams.cdm_data_quota_bytes">
<td><h3 id="CreateContextParams.cdm_data_quota_bytes" class="add-link hide-from-toc">12</h3></td>
<td><code>cdm_data_quota_bytes</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Specifies a target maximum size for <code>cdm_data_directory</code> contents, in bytes. If the amount
of persisted CDM data exceeds this threshold, then the <a class='link' href='#Context'>Context</a> will attempt to purge
some data to meet the specified quota.</p>
</td>
</tr>
<tr id="CreateContextParams.data_quota_bytes">
<td><h3 id="CreateContextParams.data_quota_bytes" class="add-link hide-from-toc">13</h3></td>
<td><code>data_quota_bytes</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Specifies a target maximum size for <code>data_directory</code> contents, in bytes.
The <a class='link' href='#Context'>Context</a> will attempt to limit browsing state (e.g. cookies, LocalStorage) to
not exceed the specified size.</p>
</td>
</tr>
</table>
### CreateFrameParams [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#CreateFrameParams data-text="CreateFrameParams"}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=265)*
<p>Parameters specifying the configuration for a new <a class='link' href='#Frame'>Frame</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CreateFrameParams.enable_remote_debugging">
<td><h3 id="CreateFrameParams.enable_remote_debugging" class="add-link hide-from-toc">1</h3></td>
<td><code>enable_remote_debugging</code></td>
<td>
<code>bool</code>
</td>
<td><p>Set to true to enable remote debugging. The <a class='link' href='#Frame'>Frame</a> will be closed with
<code>ERR_INVALID_ARGS</code> if <code>remote_debugging_port</code> was not set in
<a class='link' href='#CreateContextParams'>CreateContextParams</a>.</p>
</td>
</tr>
<tr id="CreateFrameParams.debug_name">
<td><h3 id="CreateFrameParams.debug_name" class="add-link hide-from-toc">2</h3></td>
<td><code>debug_name</code></td>
<td>
<code>string</code>
</td>
<td><p>Set to give the Frame a name to help distinguish it in debug contexts , such as system log
output. For example, the name may be added to messages from web content when they are logged
to the system logger. The name does not affect user- or web-visible behavior.
Popup Frames created by the Frame will have a name derived from the parent Frame's name.</p>
</td>
</tr>
<tr id="CreateFrameParams.">
<td><h3 id="CreateFrameParams." class="add-link hide-from-toc">3</h3></td>
<td><code>RESERVED</code></td>
<td>
<code></code>
</td>
<td><div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
<tr id="CreateFrameParams.explicit_sites_filter_error_page">
<td><h3 id="CreateFrameParams.explicit_sites_filter_error_page" class="add-link hide-from-toc">4</h3></td>
<td><code>explicit_sites_filter_error_page</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Data'>Data</a></code>
</td>
<td><p>Enables automatic blocking of navigations to explicit sites, and specifies the error page
content, in HTML, to be loaded in the Frame when a navigation is canceled by the filter.
Applies to navigations in all frames within the Frame.
When navigation of the main document is canceled, the Frame's <a class='link' href='#NavigationState.PageType'>NavigationState.PageType</a>
is <code>ERROR</code>.
If set to an empty buffer, a default error message will be displayed.
If set and such filtering is not supported, the <a class='link' href='#Frame'>Frame</a> will disconnect with
<code>ZX_ERR_NOT_SUPPORTED</code>.</p>
</td>
</tr>
</table>
### CreateView2Args [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#CreateView2Args data-text="CreateView2Args"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=584)*
<p>Args for Frame.CreateView2(), see above.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CreateView2Args.view_creation_token">
<td><h3 id="CreateView2Args.view_creation_token" class="add-link hide-from-toc">1</h3></td>
<td><code>view_creation_token</code></td>
<td>
<code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewCreationToken'>ViewCreationToken</a></code>
</td>
<td><p>Non-optional. This token is provided to attach the client's Flatland view to the parent's
viewport.</p>
</td>
</tr>
</table>
### Favicon [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Favicon data-text="Favicon"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=229)*
<p>Used to represent a favicon for a page. An empty table (all fields are unset) is used to indicate
that the page doesn't have a favicon.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Favicon.data">
<td><h3 id="Favicon.data" class="add-link hide-from-toc">1</h3></td>
<td><code>data</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
<td><p>The image content encoded as an RGBA bitmap with premultiplied alpha channel. The data is
densely packed, so the stride is always <code>4 * width</code> and the total size is
<code>4 * width * height</code>.</p>
</td>
</tr>
<tr id="Favicon.width">
<td><h3 id="Favicon.width" class="add-link hide-from-toc">2</h3></td>
<td><code>width</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The width of the image.</p>
</td>
</tr>
<tr id="Favicon.height">
<td><h3 id="Favicon.height" class="add-link hide-from-toc">3</h3></td>
<td><code>height</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The height of the image.</p>
</td>
</tr>
</table>
### FrameCloseRequest {#FrameCloseRequest data-text="FrameCloseRequest"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=508)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="FrameCloseRequest.timeout">
<td><h3 id="FrameCloseRequest.timeout" class="add-link hide-from-toc">1</h3></td>
<td><code>timeout</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>Optional.</p>
</td>
</tr>
</table>
### FrameMediaSettings {#FrameMediaSettings data-text="FrameMediaSettings"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=144)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="FrameMediaSettings.renderer_usage">
<td><h3 id="FrameMediaSettings.renderer_usage" class="add-link hide-from-toc">1</h3></td>
<td><code>renderer_usage</code></td>
<td>
<code><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#AudioRenderUsage'>AudioRenderUsage</a></code>
</td>
<td><p>The <a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#AudioRenderUsage'>AudioRenderUsage</a> to set for every <a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#AudioRenderer'>AudioRenderer</a>
instance created by the <a class='link' href='#Frame'>Frame</a>. If not set, the usage is <code>COMMUNICATION</code> for WebRTC
streams and <code>MEDIA</code> for all other streams.</p>
</td>
</tr>
<tr id="FrameMediaSettings.audio_consumer_session_id">
<td><h3 id="FrameMediaSettings.audio_consumer_session_id" class="add-link hide-from-toc">2</h3></td>
<td><code>audio_consumer_session_id</code></td>
<td>
<code>uint64</code>
</td>
<td><p>When set, enables usage of <a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#AudioConsumer'>AudioConsumer</a> for audio playback. In that
case the specified value is passed to <a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#SessionAudioConsumerFactory'>SessionAudioConsumerFactory</a>.</p>
</td>
</tr>
</table>
### LoadUrlParams [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#LoadUrlParams data-text="LoadUrlParams"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=87)*
<p>Additional parameters for modifying the behavior of <a class='link' href='#NavigationController.LoadUrl'>NavigationController.LoadUrl</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="LoadUrlParams.type">
<td><h3 id="LoadUrlParams.type" class="add-link hide-from-toc">1</h3></td>
<td><code>type</code></td>
<td>
<code><a class='link' href='#LoadUrlReason'>LoadUrlReason</a></code>
</td>
<td><p>Provides a hint to the browser UI about how <a class='link' href='#NavigationController.LoadUrl'>NavigationController.LoadUrl</a> was triggered.</p>
</td>
</tr>
<tr id="LoadUrlParams.referrer_url">
<td><h3 id="LoadUrlParams.referrer_url" class="add-link hide-from-toc">2</h3></td>
<td><code>referrer_url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td><p>The URL that linked to the resource being requested.</p>
</td>
</tr>
<tr id="LoadUrlParams.was_user_activated">
<td><h3 id="LoadUrlParams.was_user_activated" class="add-link hide-from-toc">3</h3></td>
<td><code>was_user_activated</code></td>
<td>
<code>bool</code>
</td>
<td><p>Should be set to true to propagate user activation to the frame. User activation implies
that the user is interacting with the web frame. It enables some web features that are not
available otherwise. For example, autoplay will work only when this flag is set to true.</p>
</td>
</tr>
<tr id="LoadUrlParams.headers">
<td><h3 id="LoadUrlParams.headers" class="add-link hide-from-toc">4</h3></td>
<td><code>headers</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.net.http/'>fuchsia.net.http</a>/<a class='link' href='../fuchsia.net.http/#Header'>Header</a>&gt;</code>
</td>
<td><p>Custom HTTP headers. RFC7540 does not specify a limit on the number nor
size of headers.</p>
</td>
</tr>
</table>
### NavigationPolicyProviderParams {#NavigationPolicyProviderParams data-text="NavigationPolicyProviderParams"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=178)*
<p>Used to specify which navigation events should be delegated to <a class='link' href='#NavigationPolicyProvider'>NavigationPolicyProvider</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="NavigationPolicyProviderParams.main_frame_phases">
<td><h3 id="NavigationPolicyProviderParams.main_frame_phases" class="add-link hide-from-toc">1</h3></td>
<td><code>main_frame_phases</code></td>
<td>
<code><a class='link' href='#NavigationPhase'>NavigationPhase</a></code>
</td>
<td><p>Specifies the set of navigation phases in the main frame that should be evaluated.</p>
</td>
</tr>
<tr id="NavigationPolicyProviderParams.subframe_phases">
<td><h3 id="NavigationPolicyProviderParams.subframe_phases" class="add-link hide-from-toc">2</h3></td>
<td><code>subframe_phases</code></td>
<td>
<code><a class='link' href='#NavigationPhase'>NavigationPhase</a></code>
</td>
<td><p>Specifies the set of navigation phases in subframes that should be evaluated.</p>
</td>
</tr>
</table>
### NavigationState [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#NavigationState data-text="NavigationState"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=105)*
<p>Contains information about the <a class='link' href='#Frame'>Frame</a>'s navigation state.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="NavigationState.url">
<td><h3 id="NavigationState.url" class="add-link hide-from-toc">1</h3></td>
<td><code>url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td><p>The page's URL.</p>
</td>
</tr>
<tr id="NavigationState.title">
<td><h3 id="NavigationState.title" class="add-link hide-from-toc">2</h3></td>
<td><code>title</code></td>
<td>
<code>string</code>
</td>
<td><p>The user-visible page title. While W3C style recommendation is that HTML
TITLE tags not exceed 64 characters in length, there is no actual limit.</p>
</td>
</tr>
<tr id="NavigationState.page_type">
<td><h3 id="NavigationState.page_type" class="add-link hide-from-toc">3</h3></td>
<td><code>page_type</code></td>
<td>
<code><a class='link' href='#PageType'>PageType</a></code>
</td>
<td><p>Indicates whether this was a navigation to an error page.</p>
</td>
</tr>
<tr id="NavigationState.can_go_forward">
<td><h3 id="NavigationState.can_go_forward" class="add-link hide-from-toc">4</h3></td>
<td><code>can_go_forward</code></td>
<td>
<code>bool</code>
</td>
<td><p>Indicates if there is a following navigation.</p>
</td>
</tr>
<tr id="NavigationState.can_go_back">
<td><h3 id="NavigationState.can_go_back" class="add-link hide-from-toc">5</h3></td>
<td><code>can_go_back</code></td>
<td>
<code>bool</code>
</td>
<td><p>Indicates if there is a previous navigation.</p>
</td>
</tr>
<tr id="NavigationState.is_main_document_loaded">
<td><h3 id="NavigationState.is_main_document_loaded" class="add-link hide-from-toc">6</h3></td>
<td><code>is_main_document_loaded</code></td>
<td>
<code>bool</code>
</td>
<td><p>Indicates that the main document's statically declared resources have been loaded.</p>
</td>
</tr>
<tr id="NavigationState.favicon">
<td><h3 id="NavigationState.favicon" class="add-link hide-from-toc">7</h3></td>
<td><code>favicon</code></td>
<td>
<code><a class='link' href='#Favicon'>Favicon</a></code>
</td>
<td><p>Current favicon for the page. The field is set only when the <code>FAVICON</code> flag is set for the
<code>NavigationEventListener</code> and the favicon has changed.</p>
</td>
</tr>
</table>
### PermissionDescriptor {#PermissionDescriptor data-text="PermissionDescriptor"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=98)*
<p>Describes a web permission. In the future, it may be extended with type-specific fields.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PermissionDescriptor.type">
<td><h3 id="PermissionDescriptor.type" class="add-link hide-from-toc">1</h3></td>
<td><code>type</code></td>
<td>
<code><a class='link' href='#PermissionType'>PermissionType</a></code>
</td>
<td></td>
</tr>
</table>
### PopupFrameCreationInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#PopupFrameCreationInfo data-text="PopupFrameCreationInfo"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=557)*
<p>Specifies additional information about a newly created popup frame.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PopupFrameCreationInfo.initial_url">
<td><h3 id="PopupFrameCreationInfo.initial_url" class="add-link hide-from-toc">1</h3></td>
<td><code>initial_url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td><p>The URL to which the popup frame was initially navigated.</p>
</td>
</tr>
<tr id="PopupFrameCreationInfo.initiated_by_user">
<td><h3 id="PopupFrameCreationInfo.initiated_by_user" class="add-link hide-from-toc">2</h3></td>
<td><code>initiated_by_user</code></td>
<td>
<code>bool</code>
</td>
<td><p>Set if the popup frame was created in response to UI interaction from the user (e.g. a
link was clicked).</p>
</td>
</tr>
</table>
### RequestedNavigation {#RequestedNavigation data-text="RequestedNavigation"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=186)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="RequestedNavigation.id">
<td><h3 id="RequestedNavigation.id" class="add-link hide-from-toc">1</h3></td>
<td><code>id</code></td>
<td>
<code><a class='link' href='#NavigationId'>NavigationId</a></code>
</td>
<td><p>Unique ID of the navigation.</p>
</td>
</tr>
<tr id="RequestedNavigation.phase">
<td><h3 id="RequestedNavigation.phase" class="add-link hide-from-toc">2</h3></td>
<td><code>phase</code></td>
<td>
<code><a class='link' href='#NavigationPhase'>NavigationPhase</a></code>
</td>
<td><p>Current navigation phase. Exactly one bit will be set.</p>
</td>
</tr>
<tr id="RequestedNavigation.is_main_frame">
<td><h3 id="RequestedNavigation.is_main_frame" class="add-link hide-from-toc">3</h3></td>
<td><code>is_main_frame</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the navigation is taking place in the main frame versus in a subframe.</p>
</td>
</tr>
<tr id="RequestedNavigation.is_same_document">
<td><h3 id="RequestedNavigation.is_same_document" class="add-link hide-from-toc">4</h3></td>
<td><code>is_same_document</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the navigation happened without changing the document.</p>
</td>
</tr>
<tr id="RequestedNavigation.is_http_post">
<td><h3 id="RequestedNavigation.is_http_post" class="add-link hide-from-toc">5</h3></td>
<td><code>is_http_post</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the navigation is a POST request.</p>
</td>
</tr>
<tr id="RequestedNavigation.url">
<td><h3 id="RequestedNavigation.url" class="add-link hide-from-toc">6</h3></td>
<td><code>url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td><p>The current target URL of the navigation. This may change for the same navigation after
encountering a server redirect.</p>
</td>
</tr>
<tr id="RequestedNavigation.has_gesture">
<td><h3 id="RequestedNavigation.has_gesture" class="add-link hide-from-toc">7</h3></td>
<td><code>has_gesture</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the navigation was initiated by a user gesture.</p>
</td>
</tr>
<tr id="RequestedNavigation.was_server_redirect">
<td><h3 id="RequestedNavigation.was_server_redirect" class="add-link hide-from-toc">8</h3></td>
<td><code>was_server_redirect</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the navigation has encountered a server redirect or not.</p>
</td>
</tr>
</table>
### UrlRequestRewriteAddHeaders {#UrlRequestRewriteAddHeaders data-text="UrlRequestRewriteAddHeaders"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=55)*
<p>Adds <code>headers</code> to the URL request. If a header is already present in the original URL request,
it will be overwritten.</p>
<ul>
<li><code>headers</code> must be set.</li>
<li>Each <a class='link' href='../fuchsia.net.http/'>fuchsia.net.http</a>/<a class='link' href='../fuchsia.net.http/#Header'>Header</a> in <code>headers</code> must have a valid HTTP header name and value,
per <a href="https://tools.ietf.org/html/rfc7230#section-3.2">RFC 7230 section 3.2</a>.</li>
</ul>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewriteAddHeaders.headers">
<td><h3 id="UrlRequestRewriteAddHeaders.headers" class="add-link hide-from-toc">1</h3></td>
<td><code>headers</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.net.http/'>fuchsia.net.http</a>/<a class='link' href='../fuchsia.net.http/#Header'>Header</a>&gt;[4096]</code>
</td>
<td></td>
</tr>
</table>
### UrlRequestRewriteAppendToQuery {#UrlRequestRewriteAppendToQuery data-text="UrlRequestRewriteAppendToQuery"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=92)*
<p>Appends <code>query</code> to the URL's query. If the URL request already has a query, <code>query</code> will be
appended to it, preceded by <code>&amp;</code>. Otherwise, the URL's query will be set to <code>query</code>.</p>
<ul>
<li><code>query</code> must be set.</li>
<li><code>query</code> must be a valid <a href="https://url.spec.whatwg.org/#url-query-string">URL-query string</a>.</li>
</ul>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewriteAppendToQuery.query">
<td><h3 id="UrlRequestRewriteAppendToQuery.query" class="add-link hide-from-toc">1</h3></td>
<td><code>query</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td></td>
</tr>
</table>
### UrlRequestRewriteRemoveHeader {#UrlRequestRewriteRemoveHeader data-text="UrlRequestRewriteRemoveHeader"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=64)*
<p>If <code>query_pattern</code> is in the URL's query, removes <code>header_name</code> from the list of headers. If
<code>query_pattern</code> is not set, removes <code>header_name</code> from the list of headers unconditionally.</p>
<ul>
<li><code>header_name</code> must be set.</li>
<li><code>header_name</code> must be a valid HTTP header name, per
<a href="https://tools.ietf.org/html/rfc7230#section-3.2">RFC 7230 section 3.2</a>.</li>
</ul>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewriteRemoveHeader.query_pattern">
<td><h3 id="UrlRequestRewriteRemoveHeader.query_pattern" class="add-link hide-from-toc">1</h3></td>
<td><code>query_pattern</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td></td>
</tr>
<tr id="UrlRequestRewriteRemoveHeader.header_name">
<td><h3 id="UrlRequestRewriteRemoveHeader.header_name" class="add-link hide-from-toc">2</h3></td>
<td><code>header_name</code></td>
<td>
<code>vector&lt;uint8&gt;[4096]</code>
</td>
<td></td>
</tr>
</table>
### UrlRequestRewriteReplaceUrl {#UrlRequestRewriteReplaceUrl data-text="UrlRequestRewriteReplaceUrl"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=83)*
<p>If the URL in the URL request ends with <code>url_ends_with</code>, rewrites the URL to <code>new_url</code>.</p>
<ul>
<li><code>url_ends_with</code> and <code>new_url</code> must be set.</li>
<li><code>url_ends_with</code> must be a valid
<a href="https://url.spec.whatwg.org/#path-relative-url-string">path-relative-URL string</a>.</li>
<li><code>new_url</code> must be a <a href="https://url.spec.whatwg.org/#valid-url-string">valid URL string</a>.</li>
</ul>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewriteReplaceUrl.url_ends_with">
<td><h3 id="UrlRequestRewriteReplaceUrl.url_ends_with" class="add-link hide-from-toc">1</h3></td>
<td><code>url_ends_with</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td></td>
</tr>
<tr id="UrlRequestRewriteReplaceUrl.new_url">
<td><h3 id="UrlRequestRewriteReplaceUrl.new_url" class="add-link hide-from-toc">2</h3></td>
<td><code>new_url</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td></td>
</tr>
</table>
### UrlRequestRewriteRule {#UrlRequestRewriteRule data-text="UrlRequestRewriteRule"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=8)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewriteRule.hosts_filter">
<td><h3 id="UrlRequestRewriteRule.hosts_filter" class="add-link hide-from-toc">1</h3></td>
<td><code>hosts_filter</code></td>
<td>
<code>vector&lt;string&gt;[4096]</code>
</td>
<td><p>Set of hosts to apply the rules to. If not set, the rule will apply to every request,
independent of host.</p>
</td>
</tr>
<tr id="UrlRequestRewriteRule.schemes_filter">
<td><h3 id="UrlRequestRewriteRule.schemes_filter" class="add-link hide-from-toc">2</h3></td>
<td><code>schemes_filter</code></td>
<td>
<code>vector&lt;string&gt;[4096]</code>
</td>
<td><p>Set of schemes to apply the rules to. If not set, the rule will apply to every request,
independent of scheme.</p>
</td>
</tr>
<tr id="UrlRequestRewriteRule.rewrites">
<td><h3 id="UrlRequestRewriteRule.rewrites" class="add-link hide-from-toc">3</h3></td>
<td><code>rewrites</code></td>
<td>
<code>vector&lt;<a class='link' href='#UrlRequestRewrite'>UrlRequestRewrite</a>&gt;[4096]</code>
</td>
<td><p>URL request rewrites to apply.</p>
</td>
</tr>
<tr id="UrlRequestRewriteRule.action">
<td><h3 id="UrlRequestRewriteRule.action" class="add-link hide-from-toc">4</h3></td>
<td><code>action</code></td>
<td>
<code><a class='link' href='#UrlRequestAction'>UrlRequestAction</a></code>
</td>
<td><p>Specifies the action to take for requests matching the filter criteria.
Requests are allowed by default.</p>
</td>
</tr>
</table>
### UrlRequestRewriteSubstituteQueryPattern {#UrlRequestRewriteSubstituteQueryPattern data-text="UrlRequestRewriteSubstituteQueryPattern"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=73)*
<p>If <code>pattern</code> is found in the URL's query, replaces it with <code>substitution</code>.</p>
<ul>
<li><code>pattern</code> and <code>substitution</code> must be set.</li>
<li><code>substitution</code> must be a valid
<a href="https://url.spec.whatwg.org/#url-query-string">URL-query string</a>.</li>
</ul>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewriteSubstituteQueryPattern.pattern">
<td><h3 id="UrlRequestRewriteSubstituteQueryPattern.pattern" class="add-link hide-from-toc">1</h3></td>
<td><code>pattern</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td></td>
</tr>
<tr id="UrlRequestRewriteSubstituteQueryPattern.substitution">
<td><h3 id="UrlRequestRewriteSubstituteQueryPattern.substitution" class="add-link hide-from-toc">2</h3></td>
<td><code>substitution</code></td>
<td>
<code><a class='link' href='#Url'>Url</a></code>
</td>
<td></td>
</tr>
</table>
### WebMessage [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#WebMessage data-text="WebMessage"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=514)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="WebMessage.data">
<td><h3 id="WebMessage.data" class="add-link hide-from-toc">1</h3></td>
<td><code>data</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
<td><p>The message payload, encoded as an UTF-8 string. This is a required property.</p>
</td>
</tr>
<tr id="WebMessage.incoming_transfer">
<td><h3 id="WebMessage.incoming_transfer" class="add-link hide-from-toc">2</h3></td>
<td><code>incoming_transfer</code></td>
<td>
<code>vector&lt;<a class='link' href='#IncomingTransferable'>IncomingTransferable</a>&gt;</code>
</td>
<td><p>Optional list of objects transferred into the <a class='link' href='#MessagePort'>MessagePort</a> from the FIDL client.</p>
</td>
</tr>
<tr id="WebMessage.outgoing_transfer">
<td><h3 id="WebMessage.outgoing_transfer" class="add-link hide-from-toc">3</h3></td>
<td><code>outgoing_transfer</code></td>
<td>
<code>vector&lt;<a class='link' href='#OutgoingTransferable'>OutgoingTransferable</a>&gt;</code>
</td>
<td><p>Optional list of objects transferred out of the <a class='link' href='#MessagePort'>MessagePort</a> to the FIDL client.</p>
</td>
</tr>
</table>
## **UNIONS**
### Context_GetRemoteDebuggingPort_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Context_GetRemoteDebuggingPort_Result data-text="Context_GetRemoteDebuggingPort_Result"}
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=259)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Context_GetRemoteDebuggingPort_Result.response">
<td><h3 id="Context_GetRemoteDebuggingPort_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Context_GetRemoteDebuggingPort_Response'>Context_GetRemoteDebuggingPort_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Context_GetRemoteDebuggingPort_Result.err">
<td><h3 id="Context_GetRemoteDebuggingPort_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#ContextError'>ContextError</a></code>
</td>
<td></td>
</tr>
</table>
### Frame_AddBeforeLoadJavaScript_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Frame_AddBeforeLoadJavaScript_Result data-text="Frame_AddBeforeLoadJavaScript_Result"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=271)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Frame_AddBeforeLoadJavaScript_Result.response">
<td><h3 id="Frame_AddBeforeLoadJavaScript_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Frame_AddBeforeLoadJavaScript_Response'>Frame_AddBeforeLoadJavaScript_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Frame_AddBeforeLoadJavaScript_Result.err">
<td><h3 id="Frame_AddBeforeLoadJavaScript_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#FrameError'>FrameError</a></code>
</td>
<td></td>
</tr>
</table>
### Frame_ExecuteJavaScriptNoResult_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Frame_ExecuteJavaScriptNoResult_Result data-text="Frame_ExecuteJavaScriptNoResult_Result"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=248)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Frame_ExecuteJavaScriptNoResult_Result.response">
<td><h3 id="Frame_ExecuteJavaScriptNoResult_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Frame_ExecuteJavaScriptNoResult_Response'>Frame_ExecuteJavaScriptNoResult_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Frame_ExecuteJavaScriptNoResult_Result.err">
<td><h3 id="Frame_ExecuteJavaScriptNoResult_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#FrameError'>FrameError</a></code>
</td>
<td></td>
</tr>
</table>
### Frame_ExecuteJavaScript_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Frame_ExecuteJavaScript_Result data-text="Frame_ExecuteJavaScript_Result"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=239)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Frame_ExecuteJavaScript_Result.response">
<td><h3 id="Frame_ExecuteJavaScript_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Frame_ExecuteJavaScript_Response'>Frame_ExecuteJavaScript_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Frame_ExecuteJavaScript_Result.err">
<td><h3 id="Frame_ExecuteJavaScript_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#FrameError'>FrameError</a></code>
</td>
<td></td>
</tr>
</table>
### Frame_PostMessage_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Frame_PostMessage_Result data-text="Frame_PostMessage_Result"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=295)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Frame_PostMessage_Result.response">
<td><h3 id="Frame_PostMessage_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Frame_PostMessage_Response'>Frame_PostMessage_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Frame_PostMessage_Result.err">
<td><h3 id="Frame_PostMessage_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#FrameError'>FrameError</a></code>
</td>
<td></td>
</tr>
</table>
### IncomingTransferable [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#IncomingTransferable data-text="IncomingTransferable"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=529)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="IncomingTransferable.message_port">
<td><h3 id="IncomingTransferable.message_port" class="add-link hide-from-toc">1</h3></td>
<td><code>message_port</code></td>
<td>
<code><a class='link' href='#MessagePort'>MessagePort</a></code>
</td>
<td></td>
</tr>
</table>
### MessagePort_PostMessage_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#MessagePort_PostMessage_Result data-text="MessagePort_PostMessage_Result"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=546)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="MessagePort_PostMessage_Result.response">
<td><h3 id="MessagePort_PostMessage_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#MessagePort_PostMessage_Response'>MessagePort_PostMessage_Response</a></code>
</td>
<td></td>
</tr>
<tr id="MessagePort_PostMessage_Result.err">
<td><h3 id="MessagePort_PostMessage_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#FrameError'>FrameError</a></code>
</td>
<td></td>
</tr>
</table>
### NavigationController_LoadUrl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#NavigationController_LoadUrl_Result data-text="NavigationController_LoadUrl_Result"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=60)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="NavigationController_LoadUrl_Result.response">
<td><h3 id="NavigationController_LoadUrl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#NavigationController_LoadUrl_Response'>NavigationController_LoadUrl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="NavigationController_LoadUrl_Result.err">
<td><h3 id="NavigationController_LoadUrl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#NavigationControllerError'>NavigationControllerError</a></code>
</td>
<td></td>
</tr>
</table>
### NavigationDecision [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#NavigationDecision data-text="NavigationDecision"}
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=219)*
<p>Navigation action that should be taken in response to a navigation request. Returned from
<a class='link' href='#NavigationPolicyProvider.EvaluateRequestedNavigation'>NavigationPolicyProvider.EvaluateRequestedNavigation</a>.</p>
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="NavigationDecision.proceed">
<td><h3 id="NavigationDecision.proceed" class="add-link hide-from-toc">1</h3></td>
<td><code>proceed</code></td>
<td>
<code><a class='link' href='#NoArgumentsAction'>NoArgumentsAction</a></code>
</td>
<td><p>Navigation should proceed normally.</p>
</td>
</tr>
<tr id="NavigationDecision.abort">
<td><h3 id="NavigationDecision.abort" class="add-link hide-from-toc">2</h3></td>
<td><code>abort</code></td>
<td>
<code><a class='link' href='#NoArgumentsAction'>NoArgumentsAction</a></code>
</td>
<td><p>Navigation should be aborted. The frame should stay on the current page.</p>
</td>
</tr>
</table>
### OutgoingTransferable [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#OutgoingTransferable data-text="OutgoingTransferable"}
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=525)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="OutgoingTransferable.message_port">
<td><h3 id="OutgoingTransferable.message_port" class="add-link hide-from-toc">1</h3></td>
<td><code>message_port</code></td>
<td>
<code>server_end&lt;<a class='link' href='#MessagePort'>MessagePort</a>&gt;</code>
</td>
<td></td>
</tr>
</table>
### UrlRequestRewrite [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#UrlRequestRewrite data-text="UrlRequestRewrite"}
*Defined in [fuchsia.web/url_request_rewrite_rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/url_request_rewrite_rules.fidl;l=33)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="UrlRequestRewrite.add_headers">
<td><h3 id="UrlRequestRewrite.add_headers" class="add-link hide-from-toc">1</h3></td>
<td><code>add_headers</code></td>
<td>
<code><a class='link' href='#UrlRequestRewriteAddHeaders'>UrlRequestRewriteAddHeaders</a></code>
</td>
<td><p>Adds a set of headers to a URL request.</p>
</td>
</tr>
<tr id="UrlRequestRewrite.remove_header">
<td><h3 id="UrlRequestRewrite.remove_header" class="add-link hide-from-toc">2</h3></td>
<td><code>remove_header</code></td>
<td>
<code><a class='link' href='#UrlRequestRewriteRemoveHeader'>UrlRequestRewriteRemoveHeader</a></code>
</td>
<td><p>Removes a header based on the presence of a pattern in the URL's query.</p>
</td>
</tr>
<tr id="UrlRequestRewrite.substitute_query_pattern">
<td><h3 id="UrlRequestRewrite.substitute_query_pattern" class="add-link hide-from-toc">3</h3></td>
<td><code>substitute_query_pattern</code></td>
<td>
<code><a class='link' href='#UrlRequestRewriteSubstituteQueryPattern'>UrlRequestRewriteSubstituteQueryPattern</a></code>
</td>
<td><p>Substitutes a pattern in the URL's query.</p>
</td>
</tr>
<tr id="UrlRequestRewrite.replace_url">
<td><h3 id="UrlRequestRewrite.replace_url" class="add-link hide-from-toc">4</h3></td>
<td><code>replace_url</code></td>
<td>
<code><a class='link' href='#UrlRequestRewriteReplaceUrl'>UrlRequestRewriteReplaceUrl</a></code>
</td>
<td><p>Replaces a URL if the original URL ends with a pattern.</p>
</td>
</tr>
<tr id="UrlRequestRewrite.append_to_query">
<td><h3 id="UrlRequestRewrite.append_to_query" class="add-link hide-from-toc">5</h3></td>
<td><code>append_to_query</code></td>
<td>
<code><a class='link' href='#UrlRequestRewriteAppendToQuery'>UrlRequestRewriteAppendToQuery</a></code>
</td>
<td><p>Appends to the URL's query.</p>
</td>
</tr>
</table>
## **BITS**
### ContextFeatureFlags [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ContextFeatureFlags}
Type: <code>uint64</code>
*Defined in [fuchsia.web/context.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/context.fidl;l=62)*
<p>Feature flags that allow augmenting Context behavior. Some features require additional services
in the service directory provided during context initialization. See
<a class='link' href='#CreateContextParams.service_directory'>CreateContextParams.service_directory</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ContextFeatureFlags.NETWORK">
<td><h3 id="ContextFeatureFlags.NETWORK" class="add-link hide-from-toc">NETWORK</h3></td>
<td>1</td>
<td><p>Enables network access. Requires the following services:</p>
<ul>
<li><a class='link' href='../fuchsia.net.interfaces/'>fuchsia.net.interfaces</a>/<a class='link' href='../fuchsia.net.interfaces/#State'>State</a></li>
<li><a class='link' href='../fuchsia.net.name/'>fuchsia.net.name</a>/<a class='link' href='../fuchsia.net.name/#Lookup'>Lookup</a></li>
<li><a class='link' href='../fuchsia.posix.socket/'>fuchsia.posix.socket</a>/<a class='link' href='../fuchsia.posix.socket/#Provider'>Provider</a>
And a <code>root-ssl-certificates</code> directory containing <code>cert.pem</code>.</li>
</ul>
</td>
</tr>
<tr id="ContextFeatureFlags.AUDIO">
<td><h3 id="ContextFeatureFlags.AUDIO" class="add-link hide-from-toc">AUDIO</h3></td>
<td>2</td>
<td><p>Enables audio input and output. Requires the following services:</p>
<ul>
<li><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#Audio'>Audio</a></li>
<li><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#AudioDeviceEnumerator'>AudioDeviceEnumerator</a></li>
<li><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#SessionAudioConsumerFactory'>SessionAudioConsumerFactory</a></li>
</ul>
</td>
</tr>
<tr id="ContextFeatureFlags.VULKAN">
<td><h3 id="ContextFeatureFlags.VULKAN" class="add-link hide-from-toc">VULKAN</h3></td>
<td>4</td>
<td><p>Enables GPU-accelerated rendering of the web content. Requires the following services:</p>
<ul>
<li><a class='link' href='../fuchsia.vulkan.loader/'>fuchsia.vulkan.loader</a>/<a class='link' href='../fuchsia.vulkan.loader/#Loader'>Loader</a></li>
</ul>
</td>
</tr>
<tr id="ContextFeatureFlags.HARDWARE_VIDEO_DECODER">
<td><h3 id="ContextFeatureFlags.HARDWARE_VIDEO_DECODER" class="add-link hide-from-toc">HARDWARE_VIDEO_DECODER</h3></td>
<td>8</td>
<td><p>Enables hardware video decoding. <code>VULKAN</code> must be enabled as well. Requires the following
service:</p>
<ul>
<li><a class='link' href='../fuchsia.mediacodec/'>fuchsia.mediacodec</a>/<a class='link' href='../fuchsia.mediacodec/#CodecFactory'>CodecFactory</a></li>
</ul>
</td>
</tr>
<tr id="ContextFeatureFlags.HARDWARE_VIDEO_DECODER_ONLY">
<td><h3 id="ContextFeatureFlags.HARDWARE_VIDEO_DECODER_ONLY" class="add-link hide-from-toc">HARDWARE_VIDEO_DECODER_ONLY</h3></td>
<td>16</td>
<td><p>Disables video codecs that cannot be decoded in hardware.
Software decoders will only be used as fallbacks for hardware decoders, such as when
insufficient resources are available.
Requires the <code>HARDWARE_VIDEO_DECODER</code> flag.</p>
</td>
</tr>
<tr id="ContextFeatureFlags.WIDEVINE_CDM">
<td><h3 id="ContextFeatureFlags.WIDEVINE_CDM" class="add-link hide-from-toc">WIDEVINE_CDM</h3></td>
<td>32</td>
<td><p>Enables Widevine CDM modules for EME API. <code>VULKAN</code> feature must be enabled as well.
Requires <a class='link' href='../fuchsia.media.drm/'>fuchsia.media.drm</a>/<a class='link' href='../fuchsia.media.drm/#Widevine'>Widevine</a> service. Requires that a <code>cdm_data_directory</code> be
specified in <a class='link' href='#CreateContextParams'>CreateContextParams</a>.</p>
</td>
</tr>
<tr id="ContextFeatureFlags.HEADLESS">
<td><h3 id="ContextFeatureFlags.HEADLESS" class="add-link hide-from-toc">HEADLESS</h3></td>
<td>64</td>
<td><p>Allows embedders to render web content without graphical output or Scenic.
Not compatible with the <code>VULKAN</code> flag.</p>
</td>
</tr>
<tr id="ContextFeatureFlags.LEGACYMETRICS">
<td><h3 id="ContextFeatureFlags.LEGACYMETRICS" class="add-link hide-from-toc">LEGACYMETRICS</h3></td>
<td>128</td>
<td><p>Report telemetry data to the <a class='link' href='../fuchsia.legacymetrics/'>fuchsia.legacymetrics</a>/<a class='link' href='../fuchsia.legacymetrics/#MetricsRecorder'>MetricsRecorder</a>.</p>
</td>
</tr>
<tr id="ContextFeatureFlags.KEYBOARD">
<td><h3 id="ContextFeatureFlags.KEYBOARD" class="add-link hide-from-toc">KEYBOARD</h3></td>
<td>256</td>
<td><p>Enables input events for keyboard keypresses.
Requires <a class='link' href='../fuchsia.ui.input3/'>fuchsia.ui.input3</a>/<a class='link' href='../fuchsia.ui.input3/#Keyboard'>Keyboard</a>, from which the events are obtained.</p>
</td>
</tr>
<tr id="ContextFeatureFlags.VIRTUAL_KEYBOARD">
<td><h3 id="ContextFeatureFlags.VIRTUAL_KEYBOARD" class="add-link hide-from-toc">VIRTUAL_KEYBOARD</h3></td>
<td>512</td>
<td><p>Enables the use of onscreen virtual keyboards. The implementation will manage the state of
the keyboard in response to input/focus events in web content.
Requires the <a class='link' href='../fuchsia.input.virtualkeyboard/'>fuchsia.input.virtualkeyboard</a>/<a class='link' href='../fuchsia.input.virtualkeyboard/#ControllerCreator'>ControllerCreator</a> service and the
<code>KEYBOARD</code> ContextFeatureFlag.</p>
</td>
</tr>
<tr id="ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION">
<td><h3 id="ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION" class="add-link hide-from-toc">DISABLE_DYNAMIC_CODE_GENERATION</h3></td>
<td>1024</td>
<td><p>Disables dynamic generation of machine-code from scripts (e.g. JavaScript) and other
technologies (e.g. WebAssembly). This should typically result in scripts being executed
by an interpreter, with associated loss in performance. Other technologies relying on
dynamic code generation may be provided in a limited form where feasible, or unavailable
if interpreting would render them unusable (as is likely the case for WebAssembly).
<a class='link' href='../fuchsia.kernel/'>fuchsia.kernel</a>/<a class='link' href='../fuchsia.kernel/#VmexResource'>VmexResource</a> is not required if this option is set.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
### InputTypes [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#InputTypes}
Type: <code>uint64</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=34)*
<p>Identifies the types of input events which may be handled by a View.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="InputTypes.KEY">
<td><h3 id="InputTypes.KEY" class="add-link hide-from-toc">KEY</h3></td>
<td>1</td>
<td><p>Keyboard events.</p>
</td>
</tr>
<tr id="InputTypes.MOUSE_CLICK">
<td><h3 id="InputTypes.MOUSE_CLICK" class="add-link hide-from-toc">MOUSE_CLICK</h3></td>
<td>2</td>
<td><p>Mouse button events, for any button.</p>
</td>
</tr>
<tr id="InputTypes.MOUSE_WHEEL">
<td><h3 id="InputTypes.MOUSE_WHEEL" class="add-link hide-from-toc">MOUSE_WHEEL</h3></td>
<td>4</td>
<td><p>Mouse scroll wheel events.</p>
</td>
</tr>
<tr id="InputTypes.MOUSE_MOVE">
<td><h3 id="InputTypes.MOUSE_MOVE" class="add-link hide-from-toc">MOUSE_MOVE</h3></td>
<td>8</td>
<td><p>Mouse movement events.</p>
</td>
</tr>
<tr id="InputTypes.GESTURE_TAP">
<td><h3 id="InputTypes.GESTURE_TAP" class="add-link hide-from-toc">GESTURE_TAP</h3></td>
<td>16</td>
<td><p>Single tapping with one finger.</p>
</td>
</tr>
<tr id="InputTypes.GESTURE_PINCH">
<td><h3 id="InputTypes.GESTURE_PINCH" class="add-link hide-from-toc">GESTURE_PINCH</h3></td>
<td>32</td>
<td><p>Pinching (for zooming).</p>
</td>
</tr>
<tr id="InputTypes.GESTURE_DRAG">
<td><h3 id="InputTypes.GESTURE_DRAG" class="add-link hide-from-toc">GESTURE_DRAG</h3></td>
<td>64</td>
<td><p>Dragging a finger (for scrolling).</p>
</td>
</tr>
<tr id="InputTypes.ALL">
<td><h3 id="InputTypes.ALL" class="add-link hide-from-toc">ALL</h3></td>
<td>9223372036854775808</td>
<td><p>Matches all input types.</p>
</td>
</tr>
</table>
### NavigationEventListenerFlags [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#NavigationEventListenerFlags}
Type: <code>uint64</code>
*Defined in [fuchsia.web/frame.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/frame.fidl;l=578)*
<p>Flags clients can set when connecting a <a class='link' href='#NavigationEventListener'>NavigationEventListener</a> to indicates interest in
optional features.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="NavigationEventListenerFlags.FAVICON">
<td><h3 id="NavigationEventListenerFlags.FAVICON" class="add-link hide-from-toc">FAVICON</h3></td>
<td>1</td>
<td><p>Enables <code>favicon</code> field in <a class='link' href='#NavigationState'>NavigationState</a>.</p>
</td>
</tr>
</table>
### NavigationPhase [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#NavigationPhase}
Type: <code>uint32</code>
*Defined in [fuchsia.web/navigation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=162)*
<p>Identifies a navigation phase.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="NavigationPhase.START">
<td><h3 id="NavigationPhase.START" class="add-link hide-from-toc">START</h3></td>
<td>1</td>
<td><p>Navigation is being started.</p>
</td>
</tr>
<tr id="NavigationPhase.REDIRECT">
<td><h3 id="NavigationPhase.REDIRECT" class="add-link hide-from-toc">REDIRECT</h3></td>
<td>2</td>
<td><p>Navigation was redirected.</p>
</td>
</tr>
<tr id="NavigationPhase.PROCESS_RESPONSE">
<td><h3 id="NavigationPhase.PROCESS_RESPONSE" class="add-link hide-from-toc">PROCESS_RESPONSE</h3></td>
<td>4</td>
<td><p>Navigation response is being processed. At this point navigation hasn't been committed
yet, so it is not too late to cancel it.</p>
</td>
</tr>
<tr id="NavigationPhase.FAIL">
<td><h3 id="NavigationPhase.FAIL" class="add-link hide-from-toc">FAIL</h3></td>
<td>8</td>
<td><p>Navigation has failed.</p>
</td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_HEADERS_COUNT">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=23">MAX_HEADERS_COUNT</a></td>
<td>
<code>4096</code>
</td>
<td><code>int32</code></td>
<td></td>
</tr>
<tr id="MAX_HOST_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=15">MAX_HOST_LENGTH</a></td>
<td>
<code>255</code>
</td>
<td><code>int32</code></td>
<td></td>
</tr>
<tr id="MAX_RULE_COUNT">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=26">MAX_RULE_COUNT</a></td>
<td>
<code>4096</code>
</td>
<td><code>int32</code></td>
<td></td>
</tr>
<tr id="MAX_SCHEME_AND_HOST_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=19">MAX_SCHEME_AND_HOST_LENGTH</a></td>
<td>
<code>513</code>
</td>
<td><code>int32</code></td>
<td></td>
</tr>
<tr id="MAX_URL_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=7">MAX_URL_LENGTH</a></td>
<td>
<code>65536</code>
</td>
<td><code>int32</code></td>
<td></td>
</tr>
<tr id="MAX_URL_SCHEME_NAME_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=11">MAX_URL_SCHEME_NAME_LENGTH</a></td>
<td>
<code>255</code>
</td>
<td><code>int32</code></td>
<td></td>
</tr>
</table>
## **ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="CookieName">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/cookie.fidl;l=9">CookieName</a></td>
<td>
<code>string</code>[<code><a class='link' href='../fidl/'>fidl</a>/<a class='link' href='../fidl/#MAX'>MAX</a></code>]</td>
<td></td>
</tr>
<tr id="NavigationId">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/navigation.fidl;l=159">NavigationId</a></td>
<td>
<code>uint64</code></td>
<td><p>Unique identifier of a navigation. Can be used to correlate different phases for the
same navigation. Guaranteed to be unique for all navigations in the same <a class='link' href='#Context'>Context</a>.</p>
</td>
</tr>
<tr id="Url">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=8">Url</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_URL_LENGTH'>MAX_URL_LENGTH</a></code>]</td>
<td></td>
</tr>
<tr id="UrlHostName">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=16">UrlHostName</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_HOST_LENGTH'>MAX_HOST_LENGTH</a></code>]</td>
<td></td>
</tr>
<tr id="UrlSchemeAndHostName">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=20">UrlSchemeAndHostName</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_SCHEME_AND_HOST_LENGTH'>MAX_SCHEME_AND_HOST_LENGTH</a></code>]</td>
<td></td>
</tr>
<tr id="UrlSchemeName">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.web/constants.fidl;l=12">UrlSchemeName</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_URL_SCHEME_NAME_LENGTH'>MAX_URL_SCHEME_NAME_LENGTH</a></code>]</td>
<td></td>
</tr>
</table>