Skip to main content

Module weakref

Module weakref 

Source
Expand description

Weak-referenceable JS-managed DOM objects.

IDL interfaces marked as weakReferenceable in Bindings.conf automatically implement the WeakReferenceable trait in codegen. The instance object is responsible for setting None in its own own WeakBox when it is collected, through the DOM_WEAK_SLOT slot. When all associated WeakRef values are dropped, the WeakBox itself is dropped too.

Structs§

WeakBox
The inner box of weak references, public for the finalization in codegen.
WeakRef
A weak reference to a JS-managed DOM object.

Traits§

WeakReferenceable
Trait implemented by weak-referenceable interfaces.