Use extends and super for format/XMLFeature

This commit is contained in:
ahocevar
2018-07-17 18:03:21 +02:00
parent a02c1713a4
commit 414d1556a7

View File

@@ -1,7 +1,6 @@
/** /**
* @module ol/format/XMLFeature * @module ol/format/XMLFeature
*/ */
import {inherits} from '../util.js';
import {extend} from '../array.js'; import {extend} from '../array.js';
import FeatureFormat from '../format/Feature.js'; import FeatureFormat from '../format/Feature.js';
import FormatType from '../format/FormatType.js'; import FormatType from '../format/FormatType.js';
@@ -14,18 +13,16 @@ import {isDocument, isNode, parse} from '../xml.js';
* Base class for XML feature formats. * Base class for XML feature formats.
* *
* @abstract * @abstract
* @extends {module:ol/format/Feature}
*/ */
class XMLFeature { class XMLFeature extends FeatureFormat {
constructor() { constructor() {
super();
/** /**
* @type {XMLSerializer} * @type {XMLSerializer}
* @private * @private
*/ */
this.xmlSerializer_ = new XMLSerializer(); this.xmlSerializer_ = new XMLSerializer();
FeatureFormat.call(this);
} }
/** /**
@@ -261,7 +258,5 @@ class XMLFeature {
} }
} }
inherits(XMLFeature, FeatureFormat);
export default XMLFeature; export default XMLFeature;