pub enum SandboxAllow {
Show 13 variants
DownloadsWithoutUserActivation,
Forms,
Modals,
OrientationLock,
PointerLock,
Popups,
PopupsToEscapeSandbox,
Presentation,
SameOrigin,
Scripts,
StorageAccessByUserActivation,
TopNavigation,
TopNavigationByUserActivation,
}
Expand description
Optionally used for the Sandbox
directive. Not using it but using the
sandbox directive disallows everything that you could allow with the
optional values.
Variants§
DownloadsWithoutUserActivation
Allows for downloads to occur without a gesture from the user.
Forms
Allows the embedded browsing context to submit forms. If this keyword is not used, this operation is not allowed.
Modals
Allows the embedded browsing context to open modal windows.
OrientationLock
Allows the embedded browsing context to disable the ability to lock the screen orientation.
PointerLock
Allows the embedded browsing context to use the Pointer Lock API.
Popups
Allows popups (like from window.open, target=“_blank”, showModalDialog). If this keyword is not used, that functionality will silently fail.
PopupsToEscapeSandbox
Allows a sandboxed document to open new windows without forcing the sandboxing flags upon them. This will allow, for example, a third-party advertisement to be safely sandboxed without forcing the same restrictions upon a landing page.
Presentation
Allows embedders to have control over whether an iframe can start a presentation session.
SameOrigin
Allows the content to be treated as being from its normal origin. If this keyword is not used, the embedded content is treated as being from a unique origin.
Scripts
Allows the embedded browsing context to run scripts (but not create pop-up windows). If this keyword is not used, this operation is not allowed.
StorageAccessByUserActivation
Lets the resource request access to the parent’s storage capabilities with the Storage Access API.
Allows the embedded browsing context to navigate (load) content to the top-level browsing context. If this keyword is not used, this operation is not allowed.
Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.
Trait Implementations§
Source§impl Clone for SandboxAllow
impl Clone for SandboxAllow
Source§fn clone(&self) -> SandboxAllow
fn clone(&self) -> SandboxAllow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more