Use extends and super for events/EventTarget
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/events/EventTarget
|
* @module ol/events/EventTarget
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../util.js';
|
|
||||||
import Disposable from '../Disposable.js';
|
import Disposable from '../Disposable.js';
|
||||||
import {unlistenAll} from '../events.js';
|
import {unlistenAll} from '../events.js';
|
||||||
import {UNDEFINED} from '../functions.js';
|
import {UNDEFINED} from '../functions.js';
|
||||||
@@ -29,12 +28,11 @@ import Event from '../events/Event.js';
|
|||||||
* returns false.
|
* returns false.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/Disposable}
|
|
||||||
*/
|
*/
|
||||||
class EventTarget {
|
class EventTarget extends Disposable {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
Disposable.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -165,7 +163,5 @@ class EventTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(EventTarget, Disposable);
|
|
||||||
|
|
||||||
|
|
||||||
export default EventTarget;
|
export default EventTarget;
|
||||||
|
|||||||
Reference in New Issue
Block a user