pub fn root_from_object_static<T>(
    obj: *mut JSObject
) -> Result<Root<Dom<T>>, ()>where
    T: DomObject + IDLInterface,
Expand description

Get a DomRoot<T> for the given DOM object, unwrapping any wrapper around it first, and checking if the object is of the correct type.

Returns Err(()) if obj is an opaque security wrapper or if the object is not a reflector for a DOM object of the given type (as defined by the proto_id and proto_depth).