!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/share/nodejs/jsdom/lib/jsdom/living/helpers/   drwxr-xr-x
Free 28.24 GB of 117.98 GB (23.93%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     html-constructor.js (2.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"use strict";

const { HTML_NS } = require("./namespaces");
const { createElement, getValidTagNames } = require("./create-element");

const { implForWrapper, wrapperForImpl } = require("../generated/utils");

// https://html.spec.whatwg.org/multipage/custom-elements.html#concept-already-constructed-marker
const ALREADY_CONSTRUCTED_MARKER = Symbol("already-constructed-marker");

// https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor
function HTMLConstructor(globalObject, constructorName, newTarget) {
  const registry = implForWrapper(globalObject.customElements);
  if (newTarget === HTMLConstructor) {
    throw new TypeError("Invalid constructor");
  }

  const definition = registry._customElementDefinitions.find(entry => entry.objectReference === newTarget);
  if (definition === undefined) {
    throw new TypeError("Invalid constructor, the constructor is not part of the custom element registry");
  }

  let isValue = null;

  if (definition.localName === definition.name) {
    if (constructorName !== "HTMLElement") {
      throw new TypeError("Invalid constructor, autonomous custom element should extend from HTMLElement");
    }
  } else {
    const validLocalNames = getValidTagNames(HTML_NS, constructorName);
    if (!validLocalNames.includes(definition.localName)) {
      throw new TypeError(`${definition.localName} is not valid local name for ${constructorName}`);
    }

    isValue = definition.name;
  }

  let { prototype } = newTarget;

  if (prototype === null || typeof prototype !== "object") {
    // The following line deviates from the specification. The HTMLElement prototype should be retrieved from the realm
    // associated with the "new.target". Because it is impossible to get such information in jsdom, we fallback to the
    // HTMLElement prototype associated with the current object.
    prototype = globalObject.HTMLElement.prototype;
  }

  if (definition.constructionStack.length === 0) {
    const documentImpl = implForWrapper(globalObject.document);

    const elementImpl = createElement(documentImpl, definition.localName, HTML_NS);

    const element = wrapperForImpl(elementImpl);
    Object.setPrototypeOf(element, prototype);

    elementImpl._ceState = "custom";
    elementImpl._ceDefinition = definition;
    elementImpl._isValue = isValue;

    return element;
  }

  const elementImpl = definition.constructionStack[definition.constructionStack.length - 1];
  const element = wrapperForImpl(elementImpl);

  if (elementImpl === ALREADY_CONSTRUCTED_MARKER) {
    throw new TypeError("This instance is already constructed");
  }

  Object.setPrototypeOf(element, prototype);

  definition.constructionStack[definition.constructionStack.length - 1] = ALREADY_CONSTRUCTED_MARKER;

  return element;
}

module.exports = {
  HTMLConstructor
};

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]--