script::dom::bindings::conversions

Function native_from_object_static

Source
pub(crate) unsafe fn native_from_object_static<T>(
    obj: *mut JSObject,
) -> Result<*const T, ()>
Expand description

Get a *const T for a DOM object accessible from a JSObject, where the DOM object is guaranteed not to be a wrapper.

§Safety

obj must point to a valid, non-null JSObject.