diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/elements/Dom.js | 2 | ||||
-rw-r--r-- | src/types/EventTarget.js | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/elements/Dom.js b/src/elements/Dom.js index c9e6953..c67dd18 100644 --- a/src/elements/Dom.js +++ b/src/elements/Dom.js @@ -17,7 +17,7 @@ import attr from '../modules/core/attr.js' export default class Dom extends EventTarget { constructor (node, attrs) { - super(node) + super() this.node = node this.type = node.nodeName diff --git a/src/types/EventTarget.js b/src/types/EventTarget.js index b4a137a..6889605 100644 --- a/src/types/EventTarget.js +++ b/src/types/EventTarget.js @@ -3,15 +3,10 @@ import { register } from '../utils/adopter.js' import Base from './Base.js' export default class EventTarget extends Base { - constructor ({ events = {} } = {}) { - super() - this.events = events - } - addEventListener () {} - dispatch (event, data) { - return dispatch(this, event, data) + dispatch (event, data, options) { + return dispatch(this, event, data, options) } dispatchEvent (event) { @@ -30,8 +25,8 @@ export default class EventTarget extends Base { } // Fire given event - fire (event, data) { - this.dispatch(event, data) + fire (event, data, options) { + this.dispatch(event, data, options) return this } |