Skip to main content

reflect_weak_referenceable_dom_object_with_cx_and_wrap

Function reflect_weak_referenceable_dom_object_with_cx_and_wrap 

Source
pub fn reflect_weak_referenceable_dom_object_with_cx_and_wrap<D, AbstractType, GlobalType>(
    cx: &mut JSContext,
    obj: Rc<AbstractType>,
    global: &GlobalType,
    wrap: unsafe fn(&mut JSContext, &<D as DomTypes>::GlobalScope, Option<HandleObject<'_>>, Rc<AbstractType>) -> DomRoot<AbstractType>,
) -> DomRoot<AbstractType>
where D: DomTypes, AbstractType: DomObject, GlobalType: DerivedFrom<D::GlobalScope>, Rc<AbstractType>: From<Rc<AbstractType>>, DomRoot<AbstractType>: From<DomRoot<AbstractType>>,
Expand description

Create the reflector for a new DOM object and yield ownership to the reflector.