Lint removal
This commit is contained in:
@@ -12,36 +12,36 @@ import {isDocument, isNode, parse} from '../xml.js';
|
||||
* @struct
|
||||
*/
|
||||
class XML {
|
||||
/**
|
||||
/**
|
||||
* @param {Document|Node|string} source Source.
|
||||
* @return {Object} The parsed result.
|
||||
*/
|
||||
read(source) {
|
||||
if (isDocument(source)) {
|
||||
return this.readFromDocument(/** @type {Document} */ (source));
|
||||
} else if (isNode(source)) {
|
||||
return this.readFromNode(/** @type {Node} */ (source));
|
||||
} else if (typeof source === 'string') {
|
||||
const doc = parse(source);
|
||||
return this.readFromDocument(doc);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
read(source) {
|
||||
if (isDocument(source)) {
|
||||
return this.readFromDocument(/** @type {Document} */ (source));
|
||||
} else if (isNode(source)) {
|
||||
return this.readFromNode(/** @type {Node} */ (source));
|
||||
} else if (typeof source === 'string') {
|
||||
const doc = parse(source);
|
||||
return this.readFromDocument(doc);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Document} doc Document.
|
||||
* @return {Object} Object
|
||||
*/
|
||||
readFromDocument(doc) {}
|
||||
readFromDocument(doc) {}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Node} node Node.
|
||||
* @return {Object} Object
|
||||
*/
|
||||
readFromNode(node) {}
|
||||
readFromNode(node) {}
|
||||
}
|
||||
|
||||
export default XML;
|
||||
|
||||
Reference in New Issue
Block a user