Confirmed users
401
edits
No edit summary |
|||
Line 111: | Line 111: | ||
*/ | */ | ||
start: function() { | start: function() { | ||
if (this._started) { | |||
return; | |||
} | |||
this._started = true; | |||
window.addEventListener('someevent', this); | window.addEventListener('someevent', this); | ||
}, | }, | ||
Line 119: | Line 123: | ||
*/ | */ | ||
stop: function() { | stop: function() { | ||
if (!this._started) { | |||
return; | |||
} | |||
this._started = false; | |||
window.removeEventListener('someevent', this); | window.removeEventListener('someevent', this); | ||
}, | }, |