pub trait Script: WithAttribute {
Show 14 methods
// Provided methods
fn src(self, src: impl Into<Cow<'static, str>>) -> Self::Output<Src> { ... }
fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type> { ... }
fn no_module(self) -> Self::Output<NoModule> { ... }
fn with_no_module(self, no_module: bool) -> Self::Output<NoModule> { ... }
fn async(self) -> Self::Output<Async> { ... }
fn with_async(self, async: bool) -> Self::Output<Async> { ... }
fn defer(self) -> Self::Output<Defer> { ... }
fn with_defer(self, defer: bool) -> Self::Output<Defer> { ... }
fn cross_origin(
self,
cross_origin: CrossOrigin,
) -> Self::Output<CrossOrigin> { ... }
fn integrity(
self,
integrity: impl Into<Cow<'static, str>>,
) -> Self::Output<Integrity> { ... }
fn referrer_policy(
self,
referrer_policy: ReferrerPolicy,
) -> Self::Output<ReferrerPolicy> { ... }
fn blocking(self) -> Self::Output<Blocking> { ... }
fn with_blocking(self, blocking: bool) -> Self::Output<Blocking> { ... }
fn fetch_priority(
self,
fetch_priority: FetchPriority,
) -> Self::Output<FetchPriority> { ... }
}
Expand description
A script
element allows to include dynamic script and data blocks in their documents.
Provided Methods§
Sourcefn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type>
fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type>
The type of the script.
Sourcefn no_module(self) -> Self::Output<NoModule>
fn no_module(self) -> Self::Output<NoModule>
Whether to prevent execution in user agents that support module scripts.
Sourcefn with_no_module(self, no_module: bool) -> Self::Output<NoModule>
fn with_no_module(self, no_module: bool) -> Self::Output<NoModule>
Whether to prevent execution in user agents that support module scripts.
Sourcefn async(self) -> Self::Output<Async>
fn async(self) -> Self::Output<Async>
Execute script when available, without blocking while fetching.
Sourcefn with_async(self, async: bool) -> Self::Output<Async>
fn with_async(self, async: bool) -> Self::Output<Async>
Execute script when available, without blocking while fetching.
Sourcefn with_defer(self, defer: bool) -> Self::Output<Defer>
fn with_defer(self, defer: bool) -> Self::Output<Defer>
Defer script execution.
Sourcefn cross_origin(self, cross_origin: CrossOrigin) -> Self::Output<CrossOrigin>
fn cross_origin(self, cross_origin: CrossOrigin) -> Self::Output<CrossOrigin>
Handling of crossorigin requests.
Sourcefn integrity(
self,
integrity: impl Into<Cow<'static, str>>,
) -> Self::Output<Integrity>
fn integrity( self, integrity: impl Into<Cow<'static, str>>, ) -> Self::Output<Integrity>
Integrity metadata used in Subresource Integrity checks.
Sourcefn referrer_policy(
self,
referrer_policy: ReferrerPolicy,
) -> Self::Output<ReferrerPolicy>
fn referrer_policy( self, referrer_policy: ReferrerPolicy, ) -> Self::Output<ReferrerPolicy>
How much referrer information to send.
fn blocking(self) -> Self::Output<Blocking>
fn with_blocking(self, blocking: bool) -> Self::Output<Blocking>
Sourcefn fetch_priority(
self,
fetch_priority: FetchPriority,
) -> Self::Output<FetchPriority>
fn fetch_priority( self, fetch_priority: FetchPriority, ) -> Self::Output<FetchPriority>
Sets the priority for fetches initiated by the element.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.