2016-04-07 19:03:49 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-06-13 20:11:17 +02:00
|
|
|
class EventTarget {
|
|
|
|
constructor() {
|
|
|
|
this.eventTarget = document.createDocumentFragment();
|
|
|
|
for (let method of [
|
|
|
|
'addEventListener',
|
|
|
|
'dispatchEvent',
|
|
|
|
'removeEventListener'
|
|
|
|
]) {
|
|
|
|
this[method] = this.eventTarget[method].bind(this.eventTarget);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-04-07 19:03:49 +02:00
|
|
|
module.exports = {
|
2016-05-11 21:29:57 +02:00
|
|
|
Success: 'success',
|
|
|
|
Error: 'error',
|
|
|
|
Info: 'info',
|
2016-04-07 19:03:49 +02:00
|
|
|
|
2016-06-13 20:11:17 +02:00
|
|
|
EventTarget: EventTarget,
|
2016-04-07 19:03:49 +02:00
|
|
|
};
|