#[repr(C, align(8))]pub struct EnvironmentChain {
pub _bindgen_opaque_blob: [u64; 16],
}
Expand description
JS::EnvironmentChain stores a list of objects to put on the environment chain.
Internally the engine will create a non-syntactic ‘with’ environment for each of these objects. Note that ‘with’ environments aren’t optimized well so you should use this class only if you really have to.
The SupportUnscopables enum class controls whether these non-syntactic ‘with’ environments support Symbol.unscopables similar to syntactic ‘with’ statements in JS.
Passing SupportUnscopables::No is better for performance because it lets us skip the Symbol.unscopables property lookup. Some Web APIs require supporting Symbol.unscopables though. In Firefox, SupportUnscopables::Yes is used for event handlers.
Fields§
§_bindgen_opaque_blob: [u64; 16]
Trait Implementations§
Source§impl Clone for EnvironmentChain
impl Clone for EnvironmentChain
Source§fn clone(&self) -> EnvironmentChain
fn clone(&self) -> EnvironmentChain
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EnvironmentChain
impl Debug for EnvironmentChain
Source§impl PartialEq for EnvironmentChain
impl PartialEq for EnvironmentChain
impl Copy for EnvironmentChain
impl StructuralPartialEq for EnvironmentChain
Auto Trait Implementations§
impl Freeze for EnvironmentChain
impl RefUnwindSafe for EnvironmentChain
impl Send for EnvironmentChain
impl Sync for EnvironmentChain
impl Unpin for EnvironmentChain
impl UnwindSafe for EnvironmentChain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more