UNPKG

flysh

Version:

DOM Document Object Artifact Collector

65 lines 1.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DomElement = void 0; /** * 'DomElement' abstract class model * * Defines the basic 'DOM' element properties and functions overridden by the extended subclasses * */ class DomElement { /** * Constructor * * @param element 'String' that contains the 'DOM' element name or the HTML 'tag' name, i.e : '<div>' * @param signature 'String' that defines the 'DOM' element class property, i.e : '<div class="someClass">' */ constructor(element, signature) { /** * Class properties */ this._element = ''; this._signature = ''; this._element = element; this._signature = signature; } /** * Getter that returns the `_element` property */ get getElement() { return this._element; } /** * Getter that returns the `_signature` property */ get getSignature() { return this._signature; } /** * Concatenates the '_element' with the '_signature'. If no '_signature' found then the '_element is only returned * * @returns Returns a 'string' that contains the '_element' with or without a signature */ get getElementWithSignature() { if (this._signature === '') return this._element; else return this._element + '.' + this._signature; } /** * Gets the object properties (overridden) * * @retuns Returns a 'string' that contains all the class properties */ get getEntry() { return "Element : " + this._element + "\n" + "Signature : " + this._signature + "\n"; } /** * Validates the current 'DOM' type element (overridden) */ validate() { } } exports.DomElement = DomElement; //# sourceMappingURL=DomElement.js.map