pub trait GlobalScopeHelpers<D>where
D: DomTypes,{
// Required methods
fn from_current_realm(
realm: &mut CurrentRealm<'_>,
) -> Root<Dom<<D as DomTypes>::GlobalScope>>;
unsafe fn from_object(
obj: *mut JSObject,
) -> Root<Dom<<D as DomTypes>::GlobalScope>>;
fn from_reflector(
reflector: &impl DomObject,
) -> Root<Dom<<D as DomTypes>::GlobalScope>>;
fn origin(&self) -> MutableOrigin;
fn incumbent() -> Option<Root<Dom<<D as DomTypes>::GlobalScope>>>;
fn perform_a_microtask_checkpoint(&self, cx: &mut JSContext);
fn get_url(&self) -> ServoUrl;
fn is_secure_context(&self) -> bool;
}Expand description
Operations that must be invoked from the generated bindings.
Required Methods§
fn from_current_realm( realm: &mut CurrentRealm<'_>, ) -> Root<Dom<<D as DomTypes>::GlobalScope>>
Sourceunsafe fn from_object(
obj: *mut JSObject,
) -> Root<Dom<<D as DomTypes>::GlobalScope>>
unsafe fn from_object( obj: *mut JSObject, ) -> Root<Dom<<D as DomTypes>::GlobalScope>>
§Safety
obj must point to a valid, non-null JSObject.
fn from_reflector( reflector: &impl DomObject, ) -> Root<Dom<<D as DomTypes>::GlobalScope>>
fn origin(&self) -> MutableOrigin
fn incumbent() -> Option<Root<Dom<<D as DomTypes>::GlobalScope>>>
fn perform_a_microtask_checkpoint(&self, cx: &mut JSContext)
fn get_url(&self) -> ServoUrl
fn is_secure_context(&self) -> bool
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.