SynthRegistry Class
Manager object for synthetic event subscriptions to aggregate multiple synths on the same node without colliding with actual DOM subscription entries in the global map of DOM subscriptions. Also facilitates proper cleanup on page unload.
Constructor
SynthRegistry
-
el
-
yuid
-
key
Parameters:
-
el
HTMLElementthe DOM element
-
yuid
Stringthe yuid stamp for the element
-
key
Stringthe generated id token used to identify an event type + element in the global DOM subscription map.
Item Index
Methods
Methods
_unregisterSub
-
sub
Removes the subscription from the Notifier registry.
Parameters:
-
sub
Subscriptionthe subscription
detachAll
()
private
Used by the event system's unload cleanup process. When navigating away from the page, the event system iterates the global map of element subscriptions and detaches everything using detachAll(). Normally, the map is populated with custom events, so this object needs to at least support the detachAll method to duck type its way to cleanliness.
register
-
handle
Adds a subscription from the Notifier registry.
Parameters:
-
handle
EventHandlethe subscription