script::dom::bindings::conversions

Function windowproxy_from_handlevalue

Source
pub(crate) unsafe fn windowproxy_from_handlevalue<D: DomTypes>(
    v: HandleValue<'_>,
    _cx: *mut JSContext,
) -> Result<DomRoot<D::WindowProxy>, ()>
Expand description

Get a DomRoot<T> for a WindowProxy accessible from a HandleValue. Caller is responsible for throwing a JS exception if needed in case of error.