Use extends and super for format/WMSCapabilities
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @module ol/format/WMSCapabilities
|
||||
*/
|
||||
import {inherits} from '../util.js';
|
||||
import {readHref} from '../format/XLink.js';
|
||||
import XML from '../format/XML.js';
|
||||
import {readDecimalString, readString, readNonNegativeInteger, readDecimal, readBooleanString, readNonNegativeIntegerString} from '../format/xsd.js';
|
||||
@@ -46,13 +45,11 @@ const CAPABILITY_PARSERS = makeStructureNS(
|
||||
* @classdesc
|
||||
* Format for reading WMS capabilities data
|
||||
*
|
||||
* @extends {module:ol/format/XML}
|
||||
* @api
|
||||
*/
|
||||
class WMSCapabilities {
|
||||
class WMSCapabilities extends XML {
|
||||
constructor() {
|
||||
|
||||
XML.call(this);
|
||||
super();
|
||||
|
||||
/**
|
||||
* @type {string|undefined}
|
||||
@@ -84,8 +81,6 @@ class WMSCapabilities {
|
||||
}
|
||||
}
|
||||
|
||||
inherits(WMSCapabilities, XML);
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
@@ -290,17 +285,6 @@ const KEYWORDLIST_PARSERS = makeStructureNS(
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Read a WMS capabilities document.
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|string} source The XML source.
|
||||
* @return {Object} An object representing the WMS capabilities.
|
||||
* @api
|
||||
*/
|
||||
WMSCapabilities.prototype.read;
|
||||
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
|
||||
@@ -11,8 +11,11 @@ import {isDocument, isNode, parse} from '../xml.js';
|
||||
*/
|
||||
class XML {
|
||||
/**
|
||||
* @param {Document|Node|string} source Source.
|
||||
* @return {Object} The parsed result.
|
||||
* Read the source document.
|
||||
*
|
||||
* @param {Document|Node|string} source The XML source.
|
||||
* @return {Object} An object representing the source.
|
||||
* @api
|
||||
*/
|
||||
read(source) {
|
||||
if (isDocument(source)) {
|
||||
|
||||
Reference in New Issue
Block a user