| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

EventRegistry

Page history last edited by PBworks 17 years, 9 months ago


 

EventRegistry

(extends Object)


Object Summary

This is a helper object that EventHandler utilizes.

 

It is used to unload events that are loaded with EventHandler, when page is unloaded. This action is to prevent memory leak.

 

As its name implies, it acts as a registry of events, that have been attached with EventHandler.

 

When the page is changed or closed, the registered events in this registry are detached from the browser's memory.

 

This approach will also prevent several JavaScript problems that arise while the page unloads in Mozilla.


Constructor

This object is statically accessed.


Methods

 

EventRegistry.add(objEventModel)

 

parameters

objEventModel - An EventModel instance to add.

 

comments

Adds a new EventModel to the object.


EventRegistry.removeAll()

 

comments

Detaches all the attached events.


EventRegistry.finalize()

 

comments

Detaches all the attached events. Removes the internal event hashtable.

Basically it works same as removeAll. One difference is, when finalize is called EventRegistry marks itself for garbage collection; hence it cannot be used any longer.


EventRegistry.remove(varargin)

 

parameters

varargin - (variable number of input arguments) object references or String ID's of the DHTML elements that the events will be detached.

 

comments

Detaches all attached events (via EventHandler) from the passed in objects in varargin.


See Also

 


Usage Examples

 

None given. Edit this page and be the first one to add a usage example.

Comments (0)

You don't have permission to comment on this page.