Skip to content

globals/Document.prototype

Mocks of the delegated event helpers Obsidian adds to Document.prototype.

Function Description
off Removes a delegated event listener registered with on. As in Obsidian, every registration whose selector, listener and options are all identical to the ones given is removed.
on Adds a delegated event listener, as Obsidian does: it is called only for events whose target, or an ancestor of it up to this document, matches selector, with that matching element as delegateTarget. The registration is kept in _EVENTS.