pub struct AppUi { /* private fields */ }Expand description
How the host should sandbox a UI resource (_meta.ui).
By default the page may load nothing from the network, embed no frames and gets no extra permissions: declare every origin it needs. Hosts enforce this with a Content Security Policy.
Implementations§
Source§impl AppUi
impl AppUi
Sourcepub fn connect_domains<I, S>(self, origins: I) -> Self
pub fn connect_domains<I, S>(self, origins: I) -> Self
Origins the page may connect to with fetch, XHR or WebSocket
(connect-src), e.g. https://api.example.com.
Sourcepub fn resource_domains<I, S>(self, origins: I) -> Self
pub fn resource_domains<I, S>(self, origins: I) -> Self
Origins of scripts, styles, images, fonts and media; wildcard
subdomains such as https://*.example.com are allowed.
Sourcepub fn frame_domains<I, S>(self, origins: I) -> Self
pub fn frame_domains<I, S>(self, origins: I) -> Self
Origins the page may embed in frames (frame-src).
Sourcepub fn base_uri_domains<I, S>(self, origins: I) -> Self
pub fn base_uri_domains<I, S>(self, origins: I) -> Self
Origins allowed in the document’s <base> element (base-uri).
Sourcepub fn permissions(
self,
permissions: impl IntoIterator<Item = Permission>,
) -> Self
pub fn permissions( self, permissions: impl IntoIterator<Item = Permission>, ) -> Self
Browser capabilities the page asks for.
Sourcepub fn domain(self, domain: impl Into<String>) -> Self
pub fn domain(self, domain: impl Into<String>) -> Self
A dedicated origin for the page; the format is host-specific (see the host’s documentation).
Sourcepub fn prefers_border(self, border: bool) -> Self
pub fn prefers_border(self, border: bool) -> Self
Whether the host should draw a border around the page.