From a4a532d5b886d1e59a96cee7453f3b2ffb8f9285 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Wed, 8 Apr 2020 08:47:16 +1000 Subject: tests for EventTarget --- src/types/EventTarget.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/types') 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 } -- cgit v1.2.3