Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
feat: add commonjs support
Browse files Browse the repository at this point in the history
  • Loading branch information
btford committed Mar 31, 2014
1 parent d40a937 commit 0fe349e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,11 @@ Zone.patchViaCapturingAllTheEvents = function () {
Zone.eventNames = 'copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error'.split(' ');

Zone.init = function init () {
window.zone = new Zone();
if (typeof module !== 'undefined' && module && module.exports) {
module.exports = new Zone();
} else {
window.zone = new Zone();
}
Zone.patch();
};

Expand Down

0 comments on commit 0fe349e

Please sign in to comment.