UNPKG

@opra/common

Version:
35 lines (34 loc) 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DocumentElement = void 0; const ts_gems_1 = require("ts-gems"); const uid_1 = require("uid"); const document_node_js_1 = require("./document-node.js"); /** * * @constructor DocumentElement */ exports.DocumentElement = function (owner) { if (!this) throw new TypeError('"this" should be passed to call class constructor'); const _this = (0, ts_gems_1.asMutable)(this); _this.id = (0, uid_1.uid)(16); Object.defineProperty(_this, 'node', { value: new document_node_js_1.DocumentNode(this, owner?.node), enumerable: false, writable: true, }); if (owner) { Object.defineProperty(_this, 'owner', { value: owner, enumerable: false, writable: true, }); } }; /** * @class DocumentElement */ class DocumentElementClass { } exports.DocumentElement.prototype = DocumentElementClass.prototype;