// // function SSCHTMLElementa() { // // // new(): SSCHTMLElementa; // // }; // // SSCHTMLElementa.prototype= SSCHTMLElementa; // class SSCHTMLElementa { } // SSCHTMLElementa = function () { }; // // function SSCHTMLElementa() { }; // // SSCHTMLElementa.constructor = String; // // SSCHTMLElementa={}; // // SSCHTMLElementa.constructor = function () { } // // // SSCHTMLElementa.name = "SSCHTMLElement"; // // // get[Symbol.toStringTag]() { // // // return 'SSCHTMLElementa'; // // // } // // SSCHTMLElementa.prototype.displayName = "MyFunction"; // // SSCHTMLElementa.get = () => { console.log("This is a.");} // // // SSCHTMLElementa = new SSCHTMLElementa(); // // Object.setPrototypeOf(SSCHTMLElementa, HTMLElement); // // Object.setPrototypeOf(SSCHTMLElementa.prototype, HTMLElement.prototype); // // Object.setPrototypeOf(SSCHTMLElementa, HTMLElement); // // SSCHTMLElementa.prototype = HTMLElement.prototype; // // SSCHTMLElementa.prototype[Symbol.toStringTag] = "SSCHTMLElementa"; // // var obj = {}; // Object.defineProperty(SSCHTMLElementa.prototype, Symbol.toStringTag, { // value: "SSCHTMLElementa", // writable: false // }); // SSCHTMLElementa.prototype["static"] = "This is static property!"; // SSCHTMLElementa.prototype.find = function (keyWord, attrName, attrOperator) { // console.dir(Object.getPrototypeOf(this)); // return; // let query = keyWord; // if (attrName) { // let operator = ""; // if (/^[\~\|\^\$\*]$/.test(attrOperator) || attrOperator === true) { // operator = attrOperator === true ? "*" : attrOperator; // } // query = `[${attrName}${operator || ""}='${keyWord}']`; // } // // return query; // let target = {}; // let list = []; // if (typeof query === "string") { // if (parent && parent.hasOwnProperty("length")) { // for (let i = 0; i < parent.length; i++) { // let tempList = parent[i].querySelectorAll(query); // for (let j = 0; j < tempList.length; j++) { // list.push(tempList[j]) // } // } // } else if (parent instanceof HTMLElement) { // list = parent.querySelectorAll(query); // } else { // list = document.querySelectorAll(query); // } // } else if (query instanceof HTMLElement) { // list.push(query); // } else if (query && query.hasOwnProperty("length")) { // for (let i = 0; i < query.length; i++) { // list.push(query[i]); // } // } // target.length = list.length; // for (let i = 0; i < list.length; i++) { // target[i] = list[i]; // } // let element = new SSCHTMLElementa(); // console.log(target); // if (target.length === 1) { // element = target[0]; // // console.log(element); // // element.length = 1; // // element[0] = element; // } else { // // element.length = 0; // // element = target; // } // // element.__proto__ = SSCHTMLElementa; // // element.prototype = SSCHTMLElement; // // console.dir(element.length); // // element.__proto__ = SSCHTMLElementa; // // element.prototype.__proto__ = HTMLElement; // Object.setPrototypeOf(element, SSCHTMLElementa); // console.dir(element); // // console.dir(element.innerHTML); // // console.log(element instanceof SSCHTMLElementa); // // console.log(Object.getPrototypeOf(element)); // return element; // }; // SSCHTMLElementa.prototype.get = (keyWord, attrName, attrOperator) => { // console.dir(Object.getPrototypeOf(this)); // SSCHTMLElementa.prototype.find(keyWord, attrName, attrOperator); // let parent = null; // if (this instanceof Window) { // parent = this.document; // } else if (this instanceof SSCHTMLElementa) { // parent = this; // } // if (!parent) { // throw new TypeError('Illegal invocation'); // } // // // element.__proto__ = SSCHTMLElement; // // // console.dir(element); // // return element; // }; // Object.setPrototypeOf(SSCHTMLElementa, HTMLElement); // Object.setPrototypeOf(SSCHTMLElementa.prototype, HTMLElement.prototype); // // SSCHTMLElementa.__proto__ = HTMLElement; // // SSCHTMLElementa.prototype.__proto__ = HTMLElement.prototype; // // // element.__proto__ = SSCHTMLElementa.prototype; // // Object.setPrototypeOf(SSCHTMLElementa.prototype, Function.prototype); // console.dir(SSCHTMLElementa); // console.dir(EventTarget); // // console.dir(SSCHTMLElementb.get()); // class SSCHTMLElement extends HTMLElement { // constructor(query, parent) { // super(); // this.query = query; // this.length = 0; // this.target = this; // } // static genQuery = (keyWord, attrName, attrOperator = "") => { // let query = keyWord; // if (attrName) { // let operator = ""; // if (/^[\~\|\^\$\*]$/.test(attrOperator) || attrOperator === true) { // operator = attrOperator === true ? "*" : attrOperator; // } // query = `[${attrName}${operator || ""}='${keyWord}']`; // } // return query; // }; // static findElement = (query, parent) => { // let target = {}; // let list = []; // // console.log(Object.getPrototypeOf(parent)); // // if (typeof parent !== "object") { // // if (!(parent instanceof HTMLElement) || !(parent instanceof SSCHTMLElement)) { // // parent = window.document; // // } // // } // if (typeof query === "string") { // if (parent && parent.hasOwnProperty("length")) { // for (let i = 0; i < parent.length; i++) { // let tempList = parent[i].querySelectorAll(query); // for (let j = 0; j < tempList.length; j++) { // list.push(tempList[j]) // } // } // } else if (parent instanceof HTMLElement) { // list = parent.querySelectorAll(query); // } else { // list = document.querySelectorAll(query); // } // } else if (query instanceof HTMLElement) { // list.push(query); // } else if (query && query.hasOwnProperty("length")) { // for (let i = 0; i < query.length; i++) { // list.push(query[i]); // } // } // target.length = list.length; // for (let i = 0; i < list.length; i++) { // target[i] = list[i]; // } // let element = new SSCHTMLElementa(); // console.log(target); // if (target.length === 1) { // element = target[0]; // // console.log(element); // // element.length = 1; // // element[0] = element; // } else { // // element.length = 0; // // element = target; // } // // element.__proto__ = SSCHTMLElementa; // // element.prototype = SSCHTMLElement; // // console.dir(element.length); // // element.__proto__ = SSCHTMLElementa; // // element.prototype.__proto__ = HTMLElement; // Object.setPrototypeOf(element, SSCHTMLElementa); // console.dir(element); // // console.dir(element.innerHTML); // // console.log(element instanceof SSCHTMLElementa); // // console.log(Object.getPrototypeOf(element)); // return element; // }; // } // SSCHTMLElement.prototype.get = function (keyWord, attrName, attrOperator) { // console.log(this); // let parent = this instanceof Window ? this.document : this; // let query = SSCHTMLElement.genQuery(keyWord, attrName, attrOperator); // let element = SSCHTMLElement.findElement(query, parent); // if (element.length === 0 && !attrName) { // query = SSCHTMLElement.genQuery(keyWord, 'name'); // element = SSCHTMLElement.findElement(query, parent); // } // if (element.length === 0 && !attrName) { // query = SSCHTMLElement.genQuery(keyWord, 'id'); // element = SSCHTMLElement.findElement(query, parent); // } // // element.__proto__ = SSCHTMLElement; // // console.dir(element); // return element; // }; // // var XFooProto = Object.create(PopupInfo.prototype); // // console.log(XFooProto); // // // var XFoo = document.registerElement('popup-info', { prototype: PopupInfo }); // // // console.log(XFoo); // // customElements.define("popup-info", PopupInfo); // // const NewElement = { // // __proto__: HTMLElement // // // get [Symbol.toStringTag]() { // // // return 'NewElement'; // // // } // // // "Symbol(Symbol.toStringTag)" = "NewElementtt" // // // constructor(query, parent) { // // // // super(); // // // this.query = query; // // // this.length = 0; // // // if (typeof this.query === "string") { // // // let list = []; // // // if (parent && parent.hasOwnProperty("length")) { // // // for (let i = 0; i < parent.length; i++) { // // // let tempList = parent[i].querySelectorAll(this.query); // // // for (let j = 0; j < tempList.length; j++) { // // // list.push(tempList[j]) // // // } // // // } // // // } else if (parent instanceof HTMLElement) { // // // list = parent.querySelectorAll(this.query); // // // } else { // // // list = document.querySelectorAll(this.query); // // // } // // // this.length = list.length; // // // for (let i = 0; i < list.length; i++) { // // // this[i] = list[i]; // // // } // // // } else if (this.query instanceof HTMLElement) { // // // this[0] = this.query; // // // this.length = 1; // // // } else if (this.query && this.query.hasOwnProperty("length")) { // // // this.length = this.query.length; // // // for (let i = 0; i < this.query.length; i++) { // // // this[i] = this.query[i]; // // // } // // // } // // // if (typeof this.query !== "string") { // // // this.query = null; // // // } // // // if (this.length === 0) { // // // this.target = null; // // // } else if (this.length === 1) { // // // this.target = this[0]; // // // } else { // // // this.target = []; // // // for (let i = 0; i < this.length; i++) { // // // this.target[i] = this[i]; // // // } // // // } // // // } // // // aa = () => { // // // return "TEST"; // // // } // // // static genQuery = (keyWord, attrName, attrOperator = "") => { // // // let query = keyWord; // // // if (typeof query === "string" && attrName) { // // // let operator = ""; // // // if (/^[\~\|\^\$\*]$/.test(attrOperator) || attrOperator === true) { // // // operator = attrOperator === true ? "*" : attrOperator; // // // } // // // query = `[${attrName}${operator || ""}='${keyWord}']`; // // // } // // // return query; // // // } // // } // // class MyFun extends HTMLElement { // // // __proto__ = function MyFun() { }; // // // var f = function() { // // // return "thanks for calling!"; // // // } // // // f.__proto__ = MyFun.prototype; // // // f.constructor = MyFun; // // // return f; // // } // // function MyFun() { // // } // // // Object.setPrototypeOf(MyFun.prototype, HTMLElement.prototype); // // // MyFun.prototype = Function.__proto__; // // MyFun.__proto__ = MyFun.prototype; // // console.log(MyFun); // // console.dir(MyFun); // // MyFun.prototype = { // // __proto__: Element.prototype // // }; // // function Base() { } // // Base.bValue = 38; // // Object.defineProperty(Base, 'property1', { // // get() { // // return Base.bValue; // // }, // // set(newValue) { // // Base.bValue = newValue; // // }, // // enumerable: true, // // configurable: true, // // }); // // function Derived() { } // // // Set the `[[Prototype]]` of `Derived.prototype` // // // to `Base.prototype` // // Object.setPrototypeOf(Derived.prototype, HTMLElement.prototype); // // Derived.__proto__ = Element; // // Object.setPrototypeOf(MyFun.prototype, MyFun.prototype); // // function GetChildElements(keyWord, attrName, attrOperator = "") { // // console.log(this); // // let query = SSCElement.genQuery(keyWord, attrName, attrOperator); // // if (this instanceof NodeList) { // // let list = []; // // for (let i = 0; i < this.length; i++) { // // let tempList = this[i].querySelectorAll(query); // // for (let j = 0; j < tempList.length; j++) { // // list.push(tempList[j]) // // } // // } // // let newNodeList = {}; // // for (let j = 0; j < list.length; j++) { // // newNodeList[j] = list[j]; // // } // // newNodeList.length = list.length; // // newNodeList.__proto__ = NodeList.prototype; // // // console.log(newNodeList.length); // // return newNodeList; // // } else if (this instanceof HTMLElement) { // // return this.querySelectorAll(query); // // } else { // // return {}; // // } // // }; // // HTMLElement.prototype.get = GetChildElements; // // NodeList.prototype.get = GetChildElements; // // MyFun.prototype = HTMLElement.prototype; // class SE { } // SE = SSCHTMLElementa.prototype.get; // // SE(".tab-nav");