JavaScript/Notes/DomEvents

From Noisebridge
Revision as of 14:56, 1 November 2013 by Garrett (talk | contribs) (→‎Dom Event Publisher)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Dom Event Publisher[edit | edit source]

<source lang="javascript"> var DomEventPublisher = {

 get(src, sEvent); // Static.
 addCallback(o, type, cb);
 removeCallback(o, type, cb, useCapture); 
 purgeEvents(obj, eventOrList);

} </source>

Cross-browser DomEvent Adapter[edit | edit source]

<source lang="javascript"> var DomEvent = {

 getTarget : getTarget,
 getRelatedTarget : getRelatedTarget,
 preventDefault : preventDefault,
 stopPropagation : stopPropagation,

}</source>