Module script::dom::virtualmethods

source ·


Trait to allow DOM nodes to opt-in to overriding (or adding to) common behaviours. Replicates the effect of C++ virtual methods.


Obtain a VirtualMethods instance for a given Node-derived object. Any method call on the trait object will invoke the corresponding method on the concrete type, propagating up the parent hierarchy unless otherwise interrupted.