twister-react/build-buffer/.module-cache/9fc14ade32e04296d9f74634da69458d5595110f.js
2015-04-29 11:19:10 +02:00

12 lines
302 B
JavaScript

module.exports = EventListenerMixin = function (eventtype) {
return {
componentDidMount: function() {
window.addEventListener(eventtype, this["on"+eventtype]);
},
componentWillUnmount: function() {
window.removeEventListener(eventtype, this["on"+eventtype]);
}
}
}