pub struct Frame<'a> { /* private fields */ }Expand description
Information about the Frame on the page.
Implementations§
Source§impl<'a> Frame<'a>
impl<'a> Frame<'a>
Sourcepub fn builder(
id: impl Into<FrameId<'a>>,
loader_id: LoaderId<'a>,
url: impl Into<Cow<'a, str>>,
domain_and_registry: impl Into<Cow<'a, str>>,
security_origin: impl Into<Cow<'a, str>>,
mime_type: impl Into<Cow<'a, str>>,
secure_context_type: impl Into<SecureContextType>,
cross_origin_isolated_context_type: impl Into<CrossOriginIsolatedContextType>,
gated_api_features: Vec<GatedAPIFeatures>,
) -> FrameBuilder<'a>
pub fn builder( id: impl Into<FrameId<'a>>, loader_id: LoaderId<'a>, url: impl Into<Cow<'a, str>>, domain_and_registry: impl Into<Cow<'a, str>>, security_origin: impl Into<Cow<'a, str>>, mime_type: impl Into<Cow<'a, str>>, secure_context_type: impl Into<SecureContextType>, cross_origin_isolated_context_type: impl Into<CrossOriginIsolatedContextType>, gated_api_features: Vec<GatedAPIFeatures>, ) -> FrameBuilder<'a>
Creates a builder for this type with the required parameters:
id: Frame unique identifier.loader_id: Identifier of the loader associated with this frame.url: Frame document’s URL without fragment.domain_and_registry: Frame document’s registered domain, taking the public suffixes list into account. Extracted from the Frame’s url. Example URLs: http://www.google.com/file.html -> “google.com” http://a.b.co.uk/file.html -> “b.co.uk”security_origin: Frame document’s security origin.mime_type: Frame document’s mimeType as determined by the browser.secure_context_type: Indicates whether the main document is a secure context and explains why that is the case.cross_origin_isolated_context_type: Indicates whether this is a cross origin isolated context.gated_api_features: Indicated which gated APIs / features are available.
Sourcepub fn url_fragment(&self) -> Option<&str>
pub fn url_fragment(&self) -> Option<&str>
Frame document’s URL fragment including the ‘#’.
Sourcepub fn domain_and_registry(&self) -> &str
pub fn domain_and_registry(&self) -> &str
Frame document’s registered domain, taking the public suffixes list into account. Extracted from the Frame’s url. Example URLs: http://www.google.com/file.html -> “google.com” http://a.b.co.uk/file.html -> “b.co.uk”
Sourcepub fn security_origin(&self) -> &str
pub fn security_origin(&self) -> &str
Frame document’s security origin.
Sourcepub fn security_origin_details(&self) -> Option<&SecurityOriginDetails>
pub fn security_origin_details(&self) -> Option<&SecurityOriginDetails>
Additional details about the frame document’s security origin.
Sourcepub fn unreachable_url(&self) -> Option<&str>
pub fn unreachable_url(&self) -> Option<&str>
If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
Sourcepub fn ad_frame_status(&self) -> Option<&AdFrameStatus>
pub fn ad_frame_status(&self) -> Option<&AdFrameStatus>
Indicates whether this frame was tagged as an ad and why.
Sourcepub fn secure_context_type(&self) -> &SecureContextType
pub fn secure_context_type(&self) -> &SecureContextType
Indicates whether the main document is a secure context and explains why that is the case.
Sourcepub fn cross_origin_isolated_context_type(
&self,
) -> &CrossOriginIsolatedContextType
pub fn cross_origin_isolated_context_type( &self, ) -> &CrossOriginIsolatedContextType
Indicates whether this is a cross origin isolated context.
Sourcepub fn gated_api_features(&self) -> &[GatedAPIFeatures]
pub fn gated_api_features(&self) -> &[GatedAPIFeatures]
Indicated which gated APIs / features are available.