JavaScript/Notes/DomEvents

From Noisebridge
Jump to: navigation, search

Dom Event Publisher[edit]

<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]

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

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

}</source>