function HTMLElement(tagName, keyAttrs, rawAttrs, parentNode) {
        if (rawAttrs === void 0) { rawAttrs = ''; }
        if (parentNode === void 0) { parentNode = null; }
        var _this = _super.call(this) || this;
        _this.tagName = tagName;
        _this.rawAttrs = rawAttrs;
        _this.parentNode = parentNode;
        _this.classNames = [];
        /**
         * Node Type declaration.
         */
        _this.nodeType = type_1.default.ELEMENT_NODE;
        _this.rawAttrs = rawAttrs || '';
        _this.parentNode = parentNode || null;
        _this.childNodes = [];
        if (keyAttrs.id) {
            _this.id = keyAttrs.id;
            if (!rawAttrs) {
                _this.rawAttrs = "id=\"" + keyAttrs.id + "\"";
            }
        }
        if (keyAttrs.class) {
            _this.classNames = keyAttrs.class.split(/\s+/);
            if (!rawAttrs) {
                var cls = "class=\"" + _this.classNames.join(' ') + "\"";
                if (_this.rawAttrs) {
                    _this.rawAttrs += " " + cls;
                }
                else {
                    _this.rawAttrs = cls;
                }
            }
        }
        return _this;
    }
/**
     * Creates an instance of HTMLElement.
     * @param keyAttrs	id and class attribute
     * @param [rawAttrs]	attributes in string
     *
     * @memberof HTMLElement
     */
Creates an instance of HTMLElement.
@param keyAttrs  id and class attribute
@param [rawAttrs]        attributes in string


Creates an instance of HTMLElement . @param keyAttrs id and class attribute @param [ rawAttrs ] attributes in string
function HTMLElement(tagName, keyAttrs, rawAttrs, parentNode) {
        if (rawAttrs === void 0) { rawAttrs = ''; }
        if (parentNode === void 0) { parentNode = null; }
        var _this = _super.call(this) || this;
        _this.tagName = tagName;
        _this.rawAttrs = rawAttrs;
        _this.parentNode = parentNode;
        _this.classNames = [];
        _this.nodeType = type_1.default.ELEMENT_NODE;
        _this.rawAttrs = rawAttrs || '';
        _this.parentNode = parentNode || null;
        _this.childNodes = [];
        if (keyAttrs.id) {
            _this.id = keyAttrs.id;
            if (!rawAttrs) {
                _this.rawAttrs = "id=\"" + keyAttrs.id + "\"";
            }
        }
        if (keyAttrs.class) {
            _this.classNames = keyAttrs.class.split(/\s+/);
            if (!rawAttrs) {
                var cls = "class=\"" + _this.classNames.join(' ') + "\"";
                if (_this.rawAttrs) {
                    _this.rawAttrs += " " + cls;
                }
                else {
                    _this.rawAttrs = cls;
                }
            }
        }
        return _this;
    }
function HTMLElement ( tagName , keyAttrs , rawAttrs , parentNode ) { if ( rawAttrs === void 0 ) { rawAttrs = '' ; } if ( parentNode === void 0 ) { parentNode = null ; } var _this = _super . call ( this ) || this ; _this . tagName = tagName ; _this . rawAttrs = rawAttrs ; _this . parentNode = parentNode ; _this . classNames = [ ] ; _this . nodeType = type_1 . default . ELEMENT_NODE ; _this . rawAttrs = rawAttrs || '' ; _this . parentNode = parentNode || null ; _this . childNodes = [ ] ; if ( keyAttrs . id ) { _this . id = keyAttrs . id ; if ( ! rawAttrs ) { _this . rawAttrs = "id=\"" + keyAttrs . id + "\"" ; } } if ( keyAttrs . class ) { _this . classNames = keyAttrs . class . split ( / \s+ / ) ; if ( ! rawAttrs ) { var cls = "class=\"" + _this . classNames . join ( ' ' ) + "\"" ; if ( _this . rawAttrs ) { _this . rawAttrs += " " + cls ; } else { _this . rawAttrs = cls ; } } } return _this ; }
Creates an instance of HTMLElement.
Creates an instance of HTMLElement .
/**
         * Node Type declaration.
         */