pub type DomRoot<T> = Root<Dom<T>>;
Expand description
A rooted reference to a DOM object.
Aliased Type§
struct DomRoot<T> {
value: Dom<T>,
root_list: *const RootCollection,
}
Fields§
§value: Dom<T>
The value to root.
root_list: *const RootCollection
List that ensures correct dynamic root ordering
Implementations§
Source§impl<T: Castable> DomRoot<T>
impl<T: Castable> DomRoot<T>
Trait Implementations§
Source§impl<T: DomObject + IDLInterface> FromJSValConvertible for DomRoot<T>
impl<T: DomObject + IDLInterface> FromJSValConvertible for DomRoot<T>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: HandleValue<'_>,
_config: Self::Config,
) -> Result<ConversionResult<DomRoot<T>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, _config: Self::Config, ) -> Result<ConversionResult<DomRoot<T>>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.Source§impl<T> MallocSizeOf for DomRoot<T>where
T: DomObject + MallocSizeOf,
impl<T> MallocSizeOf for DomRoot<T>where
T: DomObject + MallocSizeOf,
Source§fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.