Struct silkenweb::elements::IframeBuilder [−][src]
pub struct IframeBuilder(_);
Implementations
impl IframeBuilder
[src]
impl IframeBuilder
[src]pub fn id(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
pub fn class(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
pub fn allow(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
Specifies a feature policy for the <iframe>
.
pub fn height(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
The height of the frame in CSS pixels. Default is 150.
pub fn name(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
A targetable name for the embedded browsing context. This can be used in the target
attribute of the <a>
, <form>
, or <base>
elements; the formtarget attribute of the
<input>
or <button>
elements; or the windowName parameter in the window.open() method.
pub fn referrerpolicy(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
Indicates which referrer to send when fetching the frame’s resource.
pub fn sandbox(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:
- allow-downloads-without-user-activation: Allows for downloads to occur without a gesture from the user.
- allow-forms: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.
- allow-modals: Lets the resource open modal windows.
- allow-orientation-lock: Lets the resource lock the screen orientation.
- allow-pointer-lock: Lets the resource use the Pointer Lock API.
- allow-popups: Allows popups (such as window.open(), target=“_blank”, or showModalDialog()). If this keyword is not used, the popup will silently fail to open.
- allow-popups-to-escape-sandbox: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.
- allow-presentation: Lets the resource start a presentation session.
- allow-same-origin: If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy.
- allow-scripts: Lets the resource run scripts (but not create popup windows).
- allow-storage-access-by-user-activation : Lets the resource request access to the parent’s storage capabilities with the Storage Access API.
- allow-top-navigation: Lets the resource navigate the top-level browsing context (the one named _top).
- allow-top-navigation-by-user-activation: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.
Notes about sandboxing:
When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all.
Sandboxing is useless if the attacker can display content outside a sandboxed iframe — such as if the viewer opens the frame in a new tab. Such content should be also served from a separate origin to limit potential damage.
pub fn src(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
The URL of the page to embed. Use a value of about:blank to embed an empty page that
conforms to the same-origin policy. Also note that programatically removing an
<iframe>
’s src attribute (e.g. via Element.removeAttribute()) causes about:blank to be
loaded in the frame in Firefox (from version 65), Chromium-based browsers, and
Safari/iOS.
pub fn srcdoc(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
Inline HTML to embed, overriding the src attribute. If a browser does not support the srcdoc attribute, it will fall back to the URL in the src attribute.
pub fn width(self, value: impl AttributeValue<String>) -> IframeBuilder
[src]
The width of the frame in CSS pixels. Default is 300.
impl IframeBuilder
[src]
impl IframeBuilder
[src]pub fn on_blur(
self,
f: impl FnMut(FocusEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(FocusEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_click(
self,
f: impl FnMut(MouseEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(MouseEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_change(
self,
f: impl FnMut(Event, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(Event, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_dblclick(
self,
f: impl FnMut(MouseEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(MouseEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_focusout(
self,
f: impl FnMut(FocusEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(FocusEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_input(
self,
f: impl FnMut(InputEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(InputEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_keydown(
self,
f: impl FnMut(KeyboardEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(KeyboardEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn on_keyup(
self,
f: impl FnMut(KeyboardEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
[src]
self,
f: impl FnMut(KeyboardEvent, HtmlIFrameElement) + 'static
) -> IframeBuilder
pub fn effect(self, f: impl Effect<HtmlIFrameElement>) -> IframeBuilder
[src]
impl IframeBuilder
[src]
impl IframeBuilder
[src]pub fn text(self, child: impl Text) -> IframeBuilder
[src]
pub fn child<Child>(self, c: Child) -> IframeBuilder where
Child: Into<Element>,
[src]
Child: Into<Element>,
Trait Implementations
impl Builder for IframeBuilder
[src]
impl Builder for IframeBuilder
[src]type Target = Iframe
pub fn build(self) -> <IframeBuilder as Builder>::Target
[src]
pub fn into_element(self) -> Element
[src]
impl DomElement for IframeBuilder
[src]
impl DomElement for IframeBuilder
[src]type Target = HtmlIFrameElement
pub fn dom_element(&self) -> <IframeBuilder as DomElement>::Target
[src]
impl From<IframeBuilder> for Element
[src]
impl From<IframeBuilder> for Element
[src]pub fn from(builder: IframeBuilder) -> Element
[src]
impl From<IframeBuilder> for ElementBuilder
[src]
impl From<IframeBuilder> for ElementBuilder
[src]pub fn from(builder: IframeBuilder) -> ElementBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for IframeBuilder
impl !RefUnwindSafe for IframeBuilder
impl !Send for IframeBuilder
impl !Send for IframeBuilder
impl !Sync for IframeBuilder
impl !Sync for IframeBuilder
impl Unpin for IframeBuilder
impl Unpin for IframeBuilder
impl !UnwindSafe for IframeBuilder
impl !UnwindSafe for IframeBuilder