@dooboostore/dom-parser 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.MD +47 -94
  2. package/dist/cjs/DomParser.js +33 -12
  3. package/dist/cjs/DomParser.js.map +2 -2
  4. package/dist/cjs/node/DocumentBase.js +4 -0
  5. package/dist/cjs/node/DocumentBase.js.map +2 -2
  6. package/dist/cjs/node/elements/Element.js.map +1 -1
  7. package/dist/cjs/node/elements/ElementBase.js +12 -2
  8. package/dist/cjs/node/elements/ElementBase.js.map +2 -2
  9. package/dist/cjs/node/elements/HTMLElement.js.map +1 -1
  10. package/dist/cjs/node/elements/HTMLElementBase.js +154 -2
  11. package/dist/cjs/node/elements/HTMLElementBase.js.map +2 -2
  12. package/dist/cjs/window/WindowBase.js +128 -7
  13. package/dist/cjs/window/WindowBase.js.map +2 -2
  14. package/dist/esm/DomParser.js +33 -12
  15. package/dist/esm/DomParser.js.map +2 -2
  16. package/dist/esm/node/DocumentBase.js +4 -0
  17. package/dist/esm/node/DocumentBase.js.map +2 -2
  18. package/dist/esm/node/elements/ElementBase.js +12 -2
  19. package/dist/esm/node/elements/ElementBase.js.map +2 -2
  20. package/dist/esm/node/elements/HTMLElementBase.js +154 -2
  21. package/dist/esm/node/elements/HTMLElementBase.js.map +2 -2
  22. package/dist/esm/window/WindowBase.js +128 -7
  23. package/dist/esm/window/WindowBase.js.map +2 -2
  24. package/dist/esm-bundle/dooboostore-dom-parser.esm.js +504 -195
  25. package/dist/esm-bundle/dooboostore-dom-parser.esm.js.map +3 -3
  26. package/dist/types/DomParser.d.ts +4 -0
  27. package/dist/types/DomParser.d.ts.map +1 -1
  28. package/dist/types/node/DocumentBase.d.ts +2 -0
  29. package/dist/types/node/DocumentBase.d.ts.map +1 -1
  30. package/dist/types/node/elements/Element.d.ts +1 -0
  31. package/dist/types/node/elements/Element.d.ts.map +1 -1
  32. package/dist/types/node/elements/ElementBase.d.ts +2 -2
  33. package/dist/types/node/elements/ElementBase.d.ts.map +1 -1
  34. package/dist/types/node/elements/HTMLElement.d.ts +32 -1
  35. package/dist/types/node/elements/HTMLElement.d.ts.map +1 -1
  36. package/dist/types/node/elements/HTMLElementBase.d.ts +11 -2
  37. package/dist/types/node/elements/HTMLElementBase.d.ts.map +1 -1
  38. package/dist/types/window/WindowBase.d.ts +12 -2
  39. package/dist/types/window/WindowBase.d.ts.map +1 -1
  40. package/dist/umd-bundle/dooboostore-dom-parser.umd.js +504 -195
  41. package/dist/umd-bundle/dooboostore-dom-parser.umd.js.map +3 -3
  42. package/package.json +3 -10
  43. package/src/DomParser.ts +457 -436
  44. package/src/node/DocumentBase.ts +7 -2
  45. package/src/node/elements/Element.ts +24 -23
  46. package/src/node/elements/ElementBase.ts +50 -41
  47. package/src/node/elements/HTMLElement.ts +36 -1
  48. package/src/node/elements/HTMLElementBase.ts +191 -5
  49. package/src/window/WindowBase.ts +1128 -919
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/node/elements/Element.ts"],
4
- "sourcesContent": ["import { Node } from '../Node';\nimport { ChildNode } from '../ChildNode';\nimport { ParentNode } from '../ParentNode';\nimport {HTMLCollectionOf} from '../collection/HTMLCollectionOf';\nimport {HTMLElement} from './HTMLElement';\nimport {SVGElement} from './SVGElement';\nimport {MathMLElement} from './MathMLElement';\nimport {HTMLElementTagNameMap, SVGElementTagNameMap, MathMLElementTagNameMap} from '../index';\n// Forward declarations for types that will be implemented later\nexport interface NamedNodeMap {\n readonly length: number;\n getNamedItem(qualifiedName: string): Attr | null;\n getNamedItemNS(namespace: string | null, localName: string): Attr | null;\n item(index: number): Attr | null;\n removeNamedItem(qualifiedName: string): Attr;\n removeNamedItemNS(namespace: string | null, localName: string): Attr;\n setNamedItem(attr: Attr): Attr | null;\n setNamedItemNS(attr: Attr): Attr | null;\n [index: number]: Attr;\n}\n\nexport interface Attr extends Node {\n readonly localName: string;\n readonly name: string;\n readonly namespaceURI: string | null;\n readonly ownerElement: Element | null;\n readonly prefix: string | null;\n readonly specified: boolean;\n value: string;\n}\n\nexport interface DOMRect {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface DOMRectList {\n readonly length: number;\n item(index: number): DOMRect | null;\n [index: number]: DOMRect;\n}\n\nexport interface ShadowRoot extends DocumentFragment {\n readonly delegatesFocus: boolean;\n readonly host: Element;\n readonly mode: ShadowRootMode;\n readonly slotAssignment: SlotAssignmentMode;\n}\n\nexport interface ShadowRootInit {\n delegatesFocus?: boolean;\n mode: ShadowRootMode;\n slotAssignment?: SlotAssignmentMode;\n}\n\nexport type ShadowRootMode = \"closed\" | \"open\";\nexport type SlotAssignmentMode = \"manual\" | \"named\";\n\nexport interface CheckVisibilityOptions {\n checkOpacity?: boolean;\n checkVisibilityCSS?: boolean;\n contentVisibilityAuto?: boolean;\n opacityProperty?: boolean;\n visibilityProperty?: boolean;\n}\n\nexport interface StylePropertyMapReadOnly {\n readonly size: number;\n entries(): IterableIterator<[string, CSSStyleValue[]]>;\n forEach(callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, thisArg?: any): void;\n get(property: string): CSSStyleValue | undefined;\n getAll(property: string): CSSStyleValue[];\n has(property: string): boolean;\n keys(): IterableIterator<string>;\n values(): IterableIterator<CSSStyleValue[]>;\n}\n\nexport interface CSSStyleValue {\n toString(): string;\n}\n\nexport interface GetHTMLOptions {\n serializableShadowRoots?: boolean;\n shadowRoots?: ShadowRoot[];\n}\n\nexport type InsertPosition = \"afterbegin\" | \"afterend\" | \"beforebegin\" | \"beforeend\";\n\nexport interface FullscreenOptions {\n navigationUI?: FullscreenNavigationUI;\n}\n\nexport type FullscreenNavigationUI = \"auto\" | \"hide\" | \"show\";\n\nexport interface PointerLockOptions {\n unadjustedMovement?: boolean;\n}\n\nexport interface ScrollToOptions {\n behavior?: ScrollBehavior;\n left?: number;\n top?: number;\n}\n\nexport interface ScrollIntoViewOptions extends ScrollToOptions {\n block?: ScrollLogicalPosition;\n inline?: ScrollLogicalPosition;\n}\n\nexport type ScrollBehavior = \"auto\" | \"instant\" | \"smooth\";\nexport type ScrollLogicalPosition = \"center\" | \"end\" | \"nearest\" | \"start\";\n\nexport interface ElementEventMap extends GlobalEventHandlersEventMap {\n \"fullscreenchange\": Event;\n \"fullscreenerror\": Event;\n}\n\nexport interface GlobalEventHandlersEventMap {\n \"abort\": UIEvent;\n \"animationcancel\": AnimationEvent;\n \"animationend\": AnimationEvent;\n \"animationiteration\": AnimationEvent;\n \"animationstart\": AnimationEvent;\n \"auxclick\": MouseEvent;\n \"beforeinput\": InputEvent;\n \"blur\": FocusEvent;\n \"canplay\": Event;\n \"canplaythrough\": Event;\n \"change\": Event;\n \"click\": MouseEvent;\n \"close\": Event;\n \"compositionend\": CompositionEvent;\n \"compositionstart\": CompositionEvent;\n \"compositionupdate\": CompositionEvent;\n \"contextmenu\": MouseEvent;\n \"copy\": ClipboardEvent;\n \"cuechange\": Event;\n \"cut\": ClipboardEvent;\n \"dblclick\": MouseEvent;\n \"drag\": DragEvent;\n \"dragend\": DragEvent;\n \"dragenter\": DragEvent;\n \"dragleave\": DragEvent;\n \"dragover\": DragEvent;\n \"dragstart\": DragEvent;\n \"drop\": DragEvent;\n \"durationchange\": Event;\n \"emptied\": Event;\n \"ended\": Event;\n \"error\": ErrorEvent;\n \"focus\": FocusEvent;\n \"focusin\": FocusEvent;\n \"focusout\": FocusEvent;\n \"formdata\": FormDataEvent;\n \"gotpointercapture\": PointerEvent;\n \"input\": Event;\n \"invalid\": Event;\n \"keydown\": KeyboardEvent;\n \"keypress\": KeyboardEvent;\n \"keyup\": KeyboardEvent;\n \"load\": Event;\n \"loadeddata\": Event;\n \"loadedmetadata\": Event;\n \"loadstart\": Event;\n \"lostpointercapture\": PointerEvent;\n \"mousedown\": MouseEvent;\n \"mouseenter\": MouseEvent;\n \"mouseleave\": MouseEvent;\n \"mousemove\": MouseEvent;\n \"mouseout\": MouseEvent;\n \"mouseover\": MouseEvent;\n \"mouseup\": MouseEvent;\n \"paste\": ClipboardEvent;\n \"pause\": Event;\n \"play\": Event;\n \"playing\": Event;\n \"pointercancel\": PointerEvent;\n \"pointerdown\": PointerEvent;\n \"pointerenter\": PointerEvent;\n \"pointerleave\": PointerEvent;\n \"pointermove\": PointerEvent;\n \"pointerout\": PointerEvent;\n \"pointerover\": PointerEvent;\n \"pointerup\": PointerEvent;\n \"progress\": ProgressEvent;\n \"ratechange\": Event;\n \"reset\": Event;\n \"resize\": UIEvent;\n \"scroll\": Event;\n \"securitypolicyviolation\": SecurityPolicyViolationEvent;\n \"seeked\": Event;\n \"seeking\": Event;\n \"select\": Event;\n \"selectionchange\": Event;\n \"selectstart\": Event;\n \"slotchange\": Event;\n \"stalled\": Event;\n \"submit\": SubmitEvent;\n \"suspend\": Event;\n \"timeupdate\": Event;\n \"toggle\": Event;\n \"touchcancel\": TouchEvent;\n \"touchend\": TouchEvent;\n \"touchmove\": TouchEvent;\n \"touchstart\": TouchEvent;\n \"transitioncancel\": TransitionEvent;\n \"transitionend\": TransitionEvent;\n \"transitionrun\": TransitionEvent;\n \"transitionstart\": TransitionEvent;\n \"volumechange\": Event;\n \"waiting\": Event;\n \"webkitanimationend\": Event;\n \"webkitanimationiteration\": Event;\n \"webkitanimationstart\": Event;\n \"webkittransitionend\": Event;\n \"wheel\": WheelEvent;\n}\n\n// Event interfaces (simplified declarations)\nexport interface Event {\n readonly type: string;\n readonly target: EventTarget | null;\n readonly currentTarget: EventTarget | null;\n readonly bubbles: boolean;\n readonly cancelable: boolean;\n readonly defaultPrevented: boolean;\n preventDefault(): void;\n stopPropagation(): void;\n stopImmediatePropagation(): void;\n}\n\nexport interface UIEvent extends Event {}\nexport interface MouseEvent extends UIEvent {}\nexport interface KeyboardEvent extends UIEvent {}\nexport interface FocusEvent extends UIEvent {}\nexport interface InputEvent extends UIEvent {}\nexport interface WheelEvent extends MouseEvent {}\nexport interface PointerEvent extends MouseEvent {}\nexport interface TouchEvent extends UIEvent {}\nexport interface DragEvent extends MouseEvent {}\nexport interface ClipboardEvent extends Event {}\nexport interface AnimationEvent extends Event {}\nexport interface TransitionEvent extends Event {}\nexport interface CompositionEvent extends UIEvent {}\nexport interface FormDataEvent extends Event {}\nexport interface ProgressEvent extends Event {}\nexport interface SecurityPolicyViolationEvent extends Event {}\nexport interface SubmitEvent extends Event {}\nexport interface ErrorEvent extends Event {}\n\nexport interface EventTarget {\n addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;\n dispatchEvent(event: Event): boolean;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void;\n}\n\nexport interface EventListenerOptions {\n capture?: boolean;\n}\n\nexport interface AddEventListenerOptions extends EventListenerOptions {\n once?: boolean;\n passive?: boolean;\n signal?: AbortSignal;\n}\n\nexport interface EventListener {\n (evt: Event): void;\n}\n\nexport interface EventListenerObject {\n handleEvent(object: Event): void;\n}\n\nexport type EventListenerOrEventListenerObject = EventListener | EventListenerObject;\n\nexport interface AbortSignal extends EventTarget {\n readonly aborted: boolean;\n readonly reason: any;\n}\n\n/**\n * **`Element`** is the most general base class from which all element objects (i.e. objects that represent elements) in a Document inherit.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element)\n */\nexport interface Element extends Node, ChildNode, ParentNode, EventTarget {\n /**\n * Returns the namespace-aware tag name of the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/tagName)\n */\n readonly tagName: string;\n\n /**\n * Returns the value of element's id content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/id)\n */\n id: string;\n\n /**\n * Returns the value of element's class content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/className)\n */\n className: string;\n\n /**\n * Returns the value of element's class content attribute as a DOMTokenList.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/classList)\n */\n readonly classList: DOMTokenList;\n\n /**\n * Returns a string representation of the markup of the element's content.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/innerHTML)\n */\n innerHTML: string;\n\n /**\n * Returns a string representation of the element and its descendants.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/outerHTML)\n */\n outerHTML: string;\n\n /**\n * Returns the local part of the qualified name of the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/localName)\n */\n readonly localName: string;\n\n /**\n * Returns the namespace URI of the element, or null if it is no namespace.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI)\n */\n readonly namespaceURI: string | null;\n\n /**\n * Returns the namespace prefix of the element, or null if no prefix is specified.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/prefix)\n */\n readonly prefix: string | null;\n\n /**\n * Returns the value of a specified attribute on the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttribute)\n */\n getAttribute(qualifiedName: string): string | null;\n\n /**\n * Sets the value of an attribute on the specified element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)\n */\n setAttribute(qualifiedName: string, value: string): void;\n\n /**\n * Removes an attribute from the specified element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)\n */\n removeAttribute(qualifiedName: string): void;\n\n /**\n * Returns a Boolean value indicating whether the specified element has the specified attribute or not.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasAttribute)\n */\n hasAttribute(qualifiedName: string): boolean;\n\n /**\n * Returns the closest ancestor element (including the element itself) that matches the specified CSS selector.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/closest)\n */\n closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;\n closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;\n closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;\n closest<E extends Element = Element>(selectors: string): E | null;\n\n /**\n * Returns true if the element would be selected by the specified CSS selector; otherwise, returns false.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)\n */\n matches(selectors: string): boolean;\n\n // Additional Element properties and methods\n\n /**\n * The **`Element.attributes`** property returns a live collection of all attribute nodes registered to the specified node.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/attributes)\n */\n readonly attributes: NamedNodeMap;\n\n /**\n * The **`clientHeight`** read-only property of the Element interface is zero for elements with no CSS or inline layout boxes; otherwise, it's the inner height of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientHeight)\n */\n readonly clientHeight: number;\n\n /**\n * The **`clientLeft`** read-only property of the Element interface returns the width of the left border of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientLeft)\n */\n readonly clientLeft: number;\n\n /**\n * The **`clientTop`** read-only property of the Element interface returns the width of the top border of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientTop)\n */\n readonly clientTop: number;\n\n /**\n * The **`clientWidth`** read-only property of the Element interface is zero for inline elements and elements with no CSS; otherwise, it's the inner width of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientWidth)\n */\n readonly clientWidth: number;\n\n /**\n * The **`currentCSSZoom`** read-only property of the Element interface provides the 'effective' CSS `zoom` of an element, taking into account the zoom applied to the element and all its parent elements.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom)\n */\n readonly currentCSSZoom: number;\n\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/fullscreenchange_event) */\n onfullscreenchange: ((this: Element, ev: Event) => any) | null;\n\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/fullscreenerror_event) */\n onfullscreenerror: ((this: Element, ev: Event) => any) | null;\n\n /**\n * The **`part`** property of the Element interface represents the part identifier(s) of the element (i.e., set using the `part` attribute), returned as a DOMTokenList.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/part)\n */\n readonly part: DOMTokenList;\n\n /**\n * The **`scrollHeight`** read-only property of the Element interface is a measurement of the height of an element's content, including content not visible on the screen due to overflow.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight)\n */\n readonly scrollHeight: number;\n\n /**\n * The **`scrollLeft`** property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its left edge.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft)\n */\n scrollLeft: number;\n\n /**\n * The **`scrollTop`** property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its top edge.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollTop)\n */\n scrollTop: number;\n\n /**\n * The **`scrollWidth`** read-only property of the Element interface is a measurement of the width of an element's content, including content not visible on the screen due to overflow.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth)\n */\n readonly scrollWidth: number;\n\n /**\n * The `Element.shadowRoot` read-only property represents the shadow root hosted by the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot)\n */\n readonly shadowRoot: ShadowRoot | null;\n\n /**\n * The **`slot`** property of the Element interface returns the name of the shadow DOM slot the element is inserted in.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/slot)\n */\n slot: string;\n\n // Methods\n\n /**\n * The **`Element.attachShadow()`** method attaches a shadow DOM tree to the specified element and returns a reference to its ShadowRoot.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/attachShadow)\n */\n attachShadow(init: ShadowRootInit): ShadowRoot;\n\n /**\n * The **`checkVisibility()`** method of the Element interface checks whether the element is visible.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)\n */\n checkVisibility(options?: CheckVisibilityOptions): boolean;\n\n /**\n * The **`computedStyleMap()`** method of the Element interface returns a StylePropertyMapReadOnly interface which provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/computedStyleMap)\n */\n computedStyleMap(): StylePropertyMapReadOnly;\n\n /**\n * The **`getAttributeNS()`** method of the Element interface returns the string value of the attribute with the specified namespace and name.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNS)\n */\n getAttributeNS(namespace: string | null, localName: string): string | null;\n\n /**\n * The **`getAttributeNames()`** method of the Element interface returns the attribute names of the element as an Array of strings.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNames)\n */\n getAttributeNames(): string[];\n\n /**\n * Returns the specified attribute of the specified element, as an Attr node.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNode)\n */\n getAttributeNode(qualifiedName: string): Attr | null;\n\n /**\n * The **`getAttributeNodeNS()`** method of the Element interface returns the namespaced Attr node of an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNodeNS)\n */\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;\n\n /**\n * The **`Element.getBoundingClientRect()`** method returns a DOMRect object providing information about the size of an element and its position relative to the viewport.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getBoundingClientRect)\n */\n getBoundingClientRect(): DOMRect;\n\n /**\n * The **`getClientRects()`** method of the Element interface returns a collection of DOMRect objects that indicate the bounding rectangles for each CSS border box in a client.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getClientRects)\n */\n getClientRects(): DOMRectList;\n\n /**\n * The Element method **`getElementsByClassName()`** returns a live HTMLCollectionOf which contains every descendant element which has the specified class name or names.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getElementsByClassName)\n */\n getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;\n\n /**\n * The **`Element.getElementsByTagName()`** method returns a live HTMLCollectionOf of elements with the given tag name.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagName)\n */\n getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;\n getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;\n getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;\n getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;\n\n /**\n * The **`Element.getElementsByTagNameNS()`** method returns a live HTMLCollectionOf of elements with the given tag name belonging to the given namespace.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)\n */\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", localName: string): HTMLCollectionOf<HTMLElement>;\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/2000/svg\", localName: string): HTMLCollectionOf<SVGElement>;\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1998/Math/MathML\", localName: string): HTMLCollectionOf<MathMLElement>;\n getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;\n\n /**\n * The **`getHTML()`** method of the Element interface is used to serialize an element's DOM to an HTML string.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getHTML)\n */\n getHTML(options?: GetHTMLOptions): string;\n\n /**\n * The **`hasAttributeNS()`** method of the Element interface returns a boolean value indicating whether the current element has the specified attribute with the specified namespace.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasAttributeNS)\n */\n hasAttributeNS(namespace: string | null, localName: string): boolean;\n\n /**\n * The **`hasAttributes()`** method of the Element interface returns a boolean value indicating whether the current element has any attributes or not.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasAttributes)\n */\n hasAttributes(): boolean;\n\n /**\n * The **`hasPointerCapture()`** method of the Element interface checks whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasPointerCapture)\n */\n hasPointerCapture(pointerId: number): boolean;\n\n /**\n * The **`insertAdjacentElement()`** method of the Element interface inserts a given element node at a given position relative to the element it is invoked upon.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement)\n */\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null;\n\n /**\n * The **`insertAdjacentHTML()`** method of the Element interface parses the specified text as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML)\n */\n insertAdjacentHTML(position: InsertPosition, string: string): void;\n\n /**\n * The **`insertAdjacentText()`** method of the Element interface, given a relative position and a string, inserts a new text node at the given position relative to the element it is called from.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText)\n */\n insertAdjacentText(where: InsertPosition, data: string): void;\n\n /**\n * The **`releasePointerCapture()`** method of the Element interface releases (stops) pointer capture that was previously set for a specific PointerEvent.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture)\n */\n releasePointerCapture(pointerId: number): void;\n\n /**\n * The **`removeAttributeNS()`** method of the Element interface removes the specified attribute from an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)\n */\n removeAttributeNS(namespace: string | null, localName: string): void;\n\n /**\n * The **`removeAttributeNode()`** method of the Element interface removes the specified Attr node from the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)\n */\n removeAttributeNode(attr: Attr): Attr;\n\n /**\n * The **`Element.requestFullscreen()`** method issues an asynchronous request to make the element be displayed in fullscreen mode.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)\n */\n requestFullscreen(options?: FullscreenOptions): Promise<void>;\n\n /**\n * The **`requestPointerLock()`** method of the Element interface lets you asynchronously ask for the pointer to be locked on the given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)\n */\n requestPointerLock(options?: PointerLockOptions): Promise<void>;\n\n /**\n * The **`scroll()`** method of the Element interface scrolls the element to a particular set of coordinates inside a given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scroll)\n */\n scroll(options?: ScrollToOptions): void;\n scroll(x: number, y: number): void;\n\n /**\n * The **`scrollBy()`** method of the Element interface scrolls an element by the given amount.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)\n */\n scrollBy(options?: ScrollToOptions): void;\n scrollBy(x: number, y: number): void;\n\n /**\n * The Element interface's **`scrollIntoView()`** method scrolls the element's ancestor containers such that the element on which `scrollIntoView()` is called is visible to the user.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)\n */\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;\n\n /**\n * The **`scrollTo()`** method of the Element interface scrolls to a particular set of coordinates inside a given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)\n */\n scrollTo(options?: ScrollToOptions): void;\n scrollTo(x: number, y: number): void;\n\n /**\n * `setAttributeNS` adds a new attribute or changes the value of an attribute with the given namespace and name.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)\n */\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;\n\n /**\n * The **`setAttributeNode()`** method of the Element interface adds a new Attr node to the specified element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)\n */\n setAttributeNode(attr: Attr): Attr | null;\n\n /**\n * The **`setAttributeNodeNS()`** method of the Element interface adds a new namespaced Attr node to an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)\n */\n setAttributeNodeNS(attr: Attr): Attr | null;\n\n /**\n * The **`setHTMLUnsafe()`** method of the Element interface is used to parse a string of HTML into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)\n */\n setHTMLUnsafe(html: string): void;\n\n /**\n * The **`setPointerCapture()`** method of the Element interface is used to designate a specific element as the capture target of future pointer events.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture)\n */\n setPointerCapture(pointerId: number): void;\n\n /**\n * The **`toggleAttribute()`** method of the Element interface toggles a Boolean attribute (removing it if it is present and adding it if it is not present) on the given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/toggleAttribute)\n */\n toggleAttribute(qualifiedName: string, force?: boolean): boolean;\n\n /**\n * @deprecated This is a legacy alias of `matches`.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)\n */\n webkitMatchesSelector(selectors: string): boolean;\n}\n\n// \uAE30\uBCF8 \uD0C0\uC785\uB4E4 \uC815\uC758\nexport interface DOMTokenList {\n readonly length: number;\n value: string;\n add(...tokens: string[]): void;\n remove(...tokens: string[]): void;\n contains(token: string): boolean;\n toggle(token: string, force?: boolean): boolean;\n replace(oldToken: string, newToken: string): boolean;\n item(index: number): string | null;\n [index: number]: string;\n}\n\n// Export Element as the main interface"],
4
+ "sourcesContent": ["import { Node } from '../Node';\nimport { ChildNode } from '../ChildNode';\nimport { ParentNode } from '../ParentNode';\nimport { HTMLCollectionOf } from '../collection/HTMLCollectionOf';\nimport { HTMLElement } from './HTMLElement';\nimport { SVGElement } from './SVGElement';\nimport { MathMLElement } from './MathMLElement';\nimport { HTMLElementTagNameMap, SVGElementTagNameMap, MathMLElementTagNameMap } from '../index';\n// Forward declarations for types that will be implemented later\nexport interface NamedNodeMap {\n readonly length: number;\n getNamedItem(qualifiedName: string): Attr | null;\n getNamedItemNS(namespace: string | null, localName: string): Attr | null;\n item(index: number): Attr | null;\n removeNamedItem(qualifiedName: string): Attr;\n removeNamedItemNS(namespace: string | null, localName: string): Attr;\n setNamedItem(attr: Attr): Attr | null;\n setNamedItemNS(attr: Attr): Attr | null;\n [index: number]: Attr;\n}\n\nexport interface Attr extends Node {\n readonly localName: string;\n readonly name: string;\n readonly namespaceURI: string | null;\n readonly ownerElement: Element | null;\n readonly prefix: string | null;\n readonly specified: boolean;\n value: string;\n}\n\nexport interface DOMRect {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n readonly x: number;\n readonly y: number;\n toJSON(): any;\n}\n\nexport interface DOMRectList {\n readonly length: number;\n item(index: number): DOMRect | null;\n [index: number]: DOMRect;\n}\n\nexport interface ShadowRoot extends DocumentFragment {\n readonly delegatesFocus: boolean;\n readonly host: Element;\n readonly mode: ShadowRootMode;\n readonly slotAssignment: SlotAssignmentMode;\n}\n\nexport interface ShadowRootInit {\n delegatesFocus?: boolean;\n mode: ShadowRootMode;\n slotAssignment?: SlotAssignmentMode;\n}\n\nexport type ShadowRootMode = \"closed\" | \"open\";\nexport type SlotAssignmentMode = \"manual\" | \"named\";\n\nexport interface CheckVisibilityOptions {\n checkOpacity?: boolean;\n checkVisibilityCSS?: boolean;\n contentVisibilityAuto?: boolean;\n opacityProperty?: boolean;\n visibilityProperty?: boolean;\n}\n\nexport interface StylePropertyMapReadOnly {\n readonly size: number;\n entries(): IterableIterator<[string, CSSStyleValue[]]>;\n forEach(callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, thisArg?: any): void;\n get(property: string): CSSStyleValue | undefined;\n getAll(property: string): CSSStyleValue[];\n has(property: string): boolean;\n keys(): IterableIterator<string>;\n values(): IterableIterator<CSSStyleValue[]>;\n}\n\nexport interface CSSStyleValue {\n toString(): string;\n}\n\nexport interface GetHTMLOptions {\n serializableShadowRoots?: boolean;\n shadowRoots?: ShadowRoot[];\n}\n\nexport type InsertPosition = \"afterbegin\" | \"afterend\" | \"beforebegin\" | \"beforeend\";\n\nexport interface FullscreenOptions {\n navigationUI?: FullscreenNavigationUI;\n}\n\nexport type FullscreenNavigationUI = \"auto\" | \"hide\" | \"show\";\n\nexport interface PointerLockOptions {\n unadjustedMovement?: boolean;\n}\n\nexport interface ScrollToOptions {\n behavior?: ScrollBehavior;\n left?: number;\n top?: number;\n}\n\nexport interface ScrollIntoViewOptions extends ScrollToOptions {\n block?: ScrollLogicalPosition;\n inline?: ScrollLogicalPosition;\n}\n\nexport type ScrollBehavior = \"auto\" | \"instant\" | \"smooth\";\nexport type ScrollLogicalPosition = \"center\" | \"end\" | \"nearest\" | \"start\";\n\nexport interface ElementEventMap extends GlobalEventHandlersEventMap {\n \"fullscreenchange\": Event;\n \"fullscreenerror\": Event;\n}\n\nexport interface GlobalEventHandlersEventMap {\n \"abort\": UIEvent;\n \"animationcancel\": AnimationEvent;\n \"animationend\": AnimationEvent;\n \"animationiteration\": AnimationEvent;\n \"animationstart\": AnimationEvent;\n \"auxclick\": MouseEvent;\n \"beforeinput\": InputEvent;\n \"blur\": FocusEvent;\n \"canplay\": Event;\n \"canplaythrough\": Event;\n \"change\": Event;\n \"click\": MouseEvent;\n \"close\": Event;\n \"compositionend\": CompositionEvent;\n \"compositionstart\": CompositionEvent;\n \"compositionupdate\": CompositionEvent;\n \"contextmenu\": MouseEvent;\n \"copy\": ClipboardEvent;\n \"cuechange\": Event;\n \"cut\": ClipboardEvent;\n \"dblclick\": MouseEvent;\n \"drag\": DragEvent;\n \"dragend\": DragEvent;\n \"dragenter\": DragEvent;\n \"dragleave\": DragEvent;\n \"dragover\": DragEvent;\n \"dragstart\": DragEvent;\n \"drop\": DragEvent;\n \"durationchange\": Event;\n \"emptied\": Event;\n \"ended\": Event;\n \"error\": ErrorEvent;\n \"focus\": FocusEvent;\n \"focusin\": FocusEvent;\n \"focusout\": FocusEvent;\n \"formdata\": FormDataEvent;\n \"gotpointercapture\": PointerEvent;\n \"input\": Event;\n \"invalid\": Event;\n \"keydown\": KeyboardEvent;\n \"keypress\": KeyboardEvent;\n \"keyup\": KeyboardEvent;\n \"load\": Event;\n \"loadeddata\": Event;\n \"loadedmetadata\": Event;\n \"loadstart\": Event;\n \"lostpointercapture\": PointerEvent;\n \"mousedown\": MouseEvent;\n \"mouseenter\": MouseEvent;\n \"mouseleave\": MouseEvent;\n \"mousemove\": MouseEvent;\n \"mouseout\": MouseEvent;\n \"mouseover\": MouseEvent;\n \"mouseup\": MouseEvent;\n \"paste\": ClipboardEvent;\n \"pause\": Event;\n \"play\": Event;\n \"playing\": Event;\n \"pointercancel\": PointerEvent;\n \"pointerdown\": PointerEvent;\n \"pointerenter\": PointerEvent;\n \"pointerleave\": PointerEvent;\n \"pointermove\": PointerEvent;\n \"pointerout\": PointerEvent;\n \"pointerover\": PointerEvent;\n \"pointerup\": PointerEvent;\n \"progress\": ProgressEvent;\n \"ratechange\": Event;\n \"reset\": Event;\n \"resize\": UIEvent;\n \"scroll\": Event;\n \"securitypolicyviolation\": SecurityPolicyViolationEvent;\n \"seeked\": Event;\n \"seeking\": Event;\n \"select\": Event;\n \"selectionchange\": Event;\n \"selectstart\": Event;\n \"slotchange\": Event;\n \"stalled\": Event;\n \"submit\": SubmitEvent;\n \"suspend\": Event;\n \"timeupdate\": Event;\n \"toggle\": Event;\n \"touchcancel\": TouchEvent;\n \"touchend\": TouchEvent;\n \"touchmove\": TouchEvent;\n \"touchstart\": TouchEvent;\n \"transitioncancel\": TransitionEvent;\n \"transitionend\": TransitionEvent;\n \"transitionrun\": TransitionEvent;\n \"transitionstart\": TransitionEvent;\n \"volumechange\": Event;\n \"waiting\": Event;\n \"webkitanimationend\": Event;\n \"webkitanimationiteration\": Event;\n \"webkitanimationstart\": Event;\n \"webkittransitionend\": Event;\n \"wheel\": WheelEvent;\n}\n\n// Event interfaces (simplified declarations)\nexport interface Event {\n readonly type: string;\n readonly target: EventTarget | null;\n readonly currentTarget: EventTarget | null;\n readonly bubbles: boolean;\n readonly cancelable: boolean;\n readonly defaultPrevented: boolean;\n preventDefault(): void;\n stopPropagation(): void;\n stopImmediatePropagation(): void;\n}\n\nexport interface UIEvent extends Event { }\nexport interface MouseEvent extends UIEvent { }\nexport interface KeyboardEvent extends UIEvent { }\nexport interface FocusEvent extends UIEvent { }\nexport interface InputEvent extends UIEvent { }\nexport interface WheelEvent extends MouseEvent { }\nexport interface PointerEvent extends MouseEvent { }\nexport interface TouchEvent extends UIEvent { }\nexport interface DragEvent extends MouseEvent { }\nexport interface ClipboardEvent extends Event { }\nexport interface AnimationEvent extends Event { }\nexport interface TransitionEvent extends Event { }\nexport interface CompositionEvent extends UIEvent { }\nexport interface FormDataEvent extends Event { }\nexport interface ProgressEvent extends Event { }\nexport interface SecurityPolicyViolationEvent extends Event { }\nexport interface SubmitEvent extends Event { }\nexport interface ErrorEvent extends Event { }\n\nexport interface EventTarget {\n addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;\n dispatchEvent(event: Event): boolean;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void;\n}\n\nexport interface EventListenerOptions {\n capture?: boolean;\n}\n\nexport interface AddEventListenerOptions extends EventListenerOptions {\n once?: boolean;\n passive?: boolean;\n signal?: AbortSignal;\n}\n\nexport interface EventListener {\n (evt: Event): void;\n}\n\nexport interface EventListenerObject {\n handleEvent(object: Event): void;\n}\n\nexport type EventListenerOrEventListenerObject = EventListener | EventListenerObject;\n\nexport interface AbortSignal extends EventTarget {\n readonly aborted: boolean;\n readonly reason: any;\n}\n\n/**\n * **`Element`** is the most general base class from which all element objects (i.e. objects that represent elements) in a Document inherit.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element)\n */\nexport interface Element extends Node, ChildNode, ParentNode, EventTarget {\n /**\n * Returns the namespace-aware tag name of the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/tagName)\n */\n readonly tagName: string;\n\n /**\n * Returns the value of element's id content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/id)\n */\n id: string;\n\n /**\n * Returns the value of element's class content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/className)\n */\n className: string;\n\n /**\n * Returns the value of element's class content attribute as a DOMTokenList.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/classList)\n */\n readonly classList: DOMTokenList;\n\n /**\n * Returns a string representation of the markup of the element's content.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/innerHTML)\n */\n innerHTML: string;\n\n /**\n * Returns a string representation of the element and its descendants.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/outerHTML)\n */\n outerHTML: string;\n\n /**\n * Returns the local part of the qualified name of the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/localName)\n */\n readonly localName: string;\n\n /**\n * Returns the namespace URI of the element, or null if it is no namespace.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/namespaceURI)\n */\n readonly namespaceURI: string | null;\n\n /**\n * Returns the namespace prefix of the element, or null if no prefix is specified.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/prefix)\n */\n readonly prefix: string | null;\n\n /**\n * Returns the value of a specified attribute on the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttribute)\n */\n getAttribute(qualifiedName: string): string | null;\n\n /**\n * Sets the value of an attribute on the specified element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)\n */\n setAttribute(qualifiedName: string, value: string): void;\n\n /**\n * Removes an attribute from the specified element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)\n */\n removeAttribute(qualifiedName: string): void;\n\n /**\n * Returns a Boolean value indicating whether the specified element has the specified attribute or not.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasAttribute)\n */\n hasAttribute(qualifiedName: string): boolean;\n\n /**\n * Returns the closest ancestor element (including the element itself) that matches the specified CSS selector.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/closest)\n */\n closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;\n closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;\n closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;\n closest<E extends Element = Element>(selectors: string): E | null;\n\n /**\n * Returns true if the element would be selected by the specified CSS selector; otherwise, returns false.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)\n */\n matches(selectors: string): boolean;\n\n // Additional Element properties and methods\n\n /**\n * The **`Element.attributes`** property returns a live collection of all attribute nodes registered to the specified node.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/attributes)\n */\n readonly attributes: NamedNodeMap;\n\n /**\n * The **`clientHeight`** read-only property of the Element interface is zero for elements with no CSS or inline layout boxes; otherwise, it's the inner height of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientHeight)\n */\n readonly clientHeight: number;\n\n /**\n * The **`clientLeft`** read-only property of the Element interface returns the width of the left border of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientLeft)\n */\n readonly clientLeft: number;\n\n /**\n * The **`clientTop`** read-only property of the Element interface returns the width of the top border of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientTop)\n */\n readonly clientTop: number;\n\n /**\n * The **`clientWidth`** read-only property of the Element interface is zero for inline elements and elements with no CSS; otherwise, it's the inner width of an element in pixels.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientWidth)\n */\n readonly clientWidth: number;\n\n /**\n * The **`currentCSSZoom`** read-only property of the Element interface provides the 'effective' CSS `zoom` of an element, taking into account the zoom applied to the element and all its parent elements.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom)\n */\n readonly currentCSSZoom: number;\n\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/fullscreenchange_event) */\n onfullscreenchange: ((this: Element, ev: Event) => any) | null;\n\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/fullscreenerror_event) */\n onfullscreenerror: ((this: Element, ev: Event) => any) | null;\n\n /**\n * The **`part`** property of the Element interface represents the part identifier(s) of the element (i.e., set using the `part` attribute), returned as a DOMTokenList.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/part)\n */\n readonly part: DOMTokenList;\n\n /**\n * The **`scrollHeight`** read-only property of the Element interface is a measurement of the height of an element's content, including content not visible on the screen due to overflow.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollHeight)\n */\n readonly scrollHeight: number;\n\n /**\n * The **`scrollLeft`** property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its left edge.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollLeft)\n */\n scrollLeft: number;\n\n /**\n * The **`scrollTop`** property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its top edge.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollTop)\n */\n scrollTop: number;\n\n /**\n * The **`scrollWidth`** read-only property of the Element interface is a measurement of the width of an element's content, including content not visible on the screen due to overflow.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollWidth)\n */\n readonly scrollWidth: number;\n\n /**\n * The `Element.shadowRoot` read-only property represents the shadow root hosted by the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot)\n */\n readonly shadowRoot: ShadowRoot | null;\n\n /**\n * The **`slot`** property of the Element interface returns the name of the shadow DOM slot the element is inserted in.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/slot)\n */\n slot: string;\n\n // Methods\n\n /**\n * The **`Element.attachShadow()`** method attaches a shadow DOM tree to the specified element and returns a reference to its ShadowRoot.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/attachShadow)\n */\n attachShadow(init: ShadowRootInit): ShadowRoot;\n\n /**\n * The **`checkVisibility()`** method of the Element interface checks whether the element is visible.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)\n */\n checkVisibility(options?: CheckVisibilityOptions): boolean;\n\n /**\n * The **`computedStyleMap()`** method of the Element interface returns a StylePropertyMapReadOnly interface which provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/computedStyleMap)\n */\n computedStyleMap(): StylePropertyMapReadOnly;\n\n /**\n * The **`getAttributeNS()`** method of the Element interface returns the string value of the attribute with the specified namespace and name.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNS)\n */\n getAttributeNS(namespace: string | null, localName: string): string | null;\n\n /**\n * The **`getAttributeNames()`** method of the Element interface returns the attribute names of the element as an Array of strings.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNames)\n */\n getAttributeNames(): string[];\n\n /**\n * Returns the specified attribute of the specified element, as an Attr node.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNode)\n */\n getAttributeNode(qualifiedName: string): Attr | null;\n\n /**\n * The **`getAttributeNodeNS()`** method of the Element interface returns the namespaced Attr node of an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNodeNS)\n */\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;\n\n /**\n * The **`Element.getBoundingClientRect()`** method returns a DOMRect object providing information about the size of an element and its position relative to the viewport.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getBoundingClientRect)\n */\n getBoundingClientRect(): DOMRect;\n\n /**\n * The **`getClientRects()`** method of the Element interface returns a collection of DOMRect objects that indicate the bounding rectangles for each CSS border box in a client.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getClientRects)\n */\n getClientRects(): DOMRectList;\n\n /**\n * The Element method **`getElementsByClassName()`** returns a live HTMLCollectionOf which contains every descendant element which has the specified class name or names.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getElementsByClassName)\n */\n getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;\n\n /**\n * The **`Element.getElementsByTagName()`** method returns a live HTMLCollectionOf of elements with the given tag name.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagName)\n */\n getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;\n getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;\n getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;\n getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;\n\n /**\n * The **`Element.getElementsByTagNameNS()`** method returns a live HTMLCollectionOf of elements with the given tag name belonging to the given namespace.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)\n */\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", localName: string): HTMLCollectionOf<HTMLElement>;\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/2000/svg\", localName: string): HTMLCollectionOf<SVGElement>;\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1998/Math/MathML\", localName: string): HTMLCollectionOf<MathMLElement>;\n getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;\n\n /**\n * The **`getHTML()`** method of the Element interface is used to serialize an element's DOM to an HTML string.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/getHTML)\n */\n getHTML(options?: GetHTMLOptions): string;\n\n /**\n * The **`hasAttributeNS()`** method of the Element interface returns a boolean value indicating whether the current element has the specified attribute with the specified namespace.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasAttributeNS)\n */\n hasAttributeNS(namespace: string | null, localName: string): boolean;\n\n /**\n * The **`hasAttributes()`** method of the Element interface returns a boolean value indicating whether the current element has any attributes or not.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasAttributes)\n */\n hasAttributes(): boolean;\n\n /**\n * The **`hasPointerCapture()`** method of the Element interface checks whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/hasPointerCapture)\n */\n hasPointerCapture(pointerId: number): boolean;\n\n /**\n * The **`insertAdjacentElement()`** method of the Element interface inserts a given element node at a given position relative to the element it is invoked upon.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement)\n */\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null;\n\n /**\n * The **`insertAdjacentHTML()`** method of the Element interface parses the specified text as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML)\n */\n insertAdjacentHTML(position: InsertPosition, string: string): void;\n\n /**\n * The **`insertAdjacentText()`** method of the Element interface, given a relative position and a string, inserts a new text node at the given position relative to the element it is called from.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText)\n */\n insertAdjacentText(where: InsertPosition, data: string): void;\n\n /**\n * The **`releasePointerCapture()`** method of the Element interface releases (stops) pointer capture that was previously set for a specific PointerEvent.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture)\n */\n releasePointerCapture(pointerId: number): void;\n\n /**\n * The **`removeAttributeNS()`** method of the Element interface removes the specified attribute from an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)\n */\n removeAttributeNS(namespace: string | null, localName: string): void;\n\n /**\n * The **`removeAttributeNode()`** method of the Element interface removes the specified Attr node from the element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)\n */\n removeAttributeNode(attr: Attr): Attr;\n\n /**\n * The **`Element.requestFullscreen()`** method issues an asynchronous request to make the element be displayed in fullscreen mode.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)\n */\n requestFullscreen(options?: FullscreenOptions): Promise<void>;\n\n /**\n * The **`requestPointerLock()`** method of the Element interface lets you asynchronously ask for the pointer to be locked on the given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)\n */\n requestPointerLock(options?: PointerLockOptions): Promise<void>;\n\n /**\n * The **`scroll()`** method of the Element interface scrolls the element to a particular set of coordinates inside a given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scroll)\n */\n scroll(options?: ScrollToOptions): void;\n scroll(x: number, y: number): void;\n\n /**\n * The **`scrollBy()`** method of the Element interface scrolls an element by the given amount.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)\n */\n scrollBy(options?: ScrollToOptions): void;\n scrollBy(x: number, y: number): void;\n\n /**\n * The Element interface's **`scrollIntoView()`** method scrolls the element's ancestor containers such that the element on which `scrollIntoView()` is called is visible to the user.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)\n */\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;\n\n /**\n * The **`scrollTo()`** method of the Element interface scrolls to a particular set of coordinates inside a given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)\n */\n scrollTo(options?: ScrollToOptions): void;\n scrollTo(x: number, y: number): void;\n\n /**\n * `setAttributeNS` adds a new attribute or changes the value of an attribute with the given namespace and name.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)\n */\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;\n\n /**\n * The **`setAttributeNode()`** method of the Element interface adds a new Attr node to the specified element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)\n */\n setAttributeNode(attr: Attr): Attr | null;\n\n /**\n * The **`setAttributeNodeNS()`** method of the Element interface adds a new namespaced Attr node to an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)\n */\n setAttributeNodeNS(attr: Attr): Attr | null;\n\n /**\n * The **`setHTMLUnsafe()`** method of the Element interface is used to parse a string of HTML into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)\n */\n setHTMLUnsafe(html: string): void;\n\n /**\n * The **`setPointerCapture()`** method of the Element interface is used to designate a specific element as the capture target of future pointer events.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture)\n */\n setPointerCapture(pointerId: number): void;\n\n /**\n * The **`toggleAttribute()`** method of the Element interface toggles a Boolean attribute (removing it if it is present and adding it if it is not present) on the given element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/toggleAttribute)\n */\n toggleAttribute(qualifiedName: string, force?: boolean): boolean;\n\n /**\n * @deprecated This is a legacy alias of `matches`.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)\n */\n webkitMatchesSelector(selectors: string): boolean;\n}\n\n// \uAE30\uBCF8 \uD0C0\uC785\uB4E4 \uC815\uC758\nexport interface DOMTokenList {\n readonly length: number;\n value: string;\n add(...tokens: string[]): void;\n remove(...tokens: string[]): void;\n contains(token: string): boolean;\n toggle(token: string, force?: boolean): boolean;\n replace(oldToken: string, newToken: string): boolean;\n item(index: number): string | null;\n [index: number]: string;\n}\n\n// Export Element as the main interface"],
5
5
  "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -110,7 +110,7 @@ class ElementBase extends import_ParentNodeBase.ParentNodeBase {
110
110
  */
111
111
  generateChildElementHTML(element) {
112
112
  const tagName = element.tagName.toLowerCase();
113
- const attrs = Array.from(element._attributes?.entries() || []).map(([name, value]) => value === "" ? ` ${name}` : ` ${name}="${value.replace(/"/g, "&quot;")}"`).join("");
113
+ const attrs = Array.from(element._attributes?.entries() || []).map(([name, value]) => value === "" ? ` ${name}` : ` ${name}="${String(value).replace(/"/g, "&quot;")}"`).join("");
114
114
  const selfClosingTags = ["img", "input", "br", "hr", "meta", "link", "area", "base", "col", "embed", "source", "track", "wbr"];
115
115
  const isSelfClosing = selfClosingTags.includes(tagName);
116
116
  if (isSelfClosing) {
@@ -542,7 +542,17 @@ class ElementBase extends import_ParentNodeBase.ParentNodeBase {
542
542
  return this.getAttributeNode(localName);
543
543
  }
544
544
  getBoundingClientRect() {
545
- throw new Error("Element.getBoundingClientRect() is not implemented yet");
545
+ return {
546
+ bottom: 0,
547
+ height: 0,
548
+ left: 0,
549
+ right: 0,
550
+ top: 0,
551
+ width: 0,
552
+ x: 0,
553
+ y: 0,
554
+ toJSON: () => ({})
555
+ };
546
556
  }
547
557
  getClientRects() {
548
558
  throw new Error("Element.getClientRects() is not implemented yet");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/node/elements/ElementBase.ts"],
4
- "sourcesContent": ["import { ParentNodeBase } from '../ParentNodeBase';\nimport { ChildNodeBase } from '../ChildNodeBase';\nimport { HTMLCollection } from \"../collection\";\nimport { Text } from \"../Text\";\nimport { ElementFactory } from \"../../factory/ElementFactory\";\nimport { Element, DOMTokenList, Attr, NamedNodeMap } from './Element';\nimport { ELEMENT_NODE, TEXT_NODE, ATTRIBUTE_NODE } from '../Node';\nimport { CSSSelector } from '../../utils/CSSSelector';\nimport { HTMLElementTagNameMap } from \"./index\";\nimport { NodeBase } from '../NodeBase';\n\n// InsertPosition type for insertAdjacent methods\ntype InsertPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';\n\n// Simple DOMException class for error handling\nclass DOMException extends Error {\n constructor(message: string, public name: string = 'DOMException') {\n super(message);\n this.name = name;\n }\n}\n/**\n * Base implementation of the Element interface\n */\nexport abstract class ElementBase extends ParentNodeBase implements Element {\n private _id: string = '';\n private _className: string = '';\n private _attributes: Map<string, string> = new Map();\n\n constructor(\n public _tagName: string,\n ownerDocument?: any\n ) {\n super(ELEMENT_NODE, _tagName.toUpperCase(), ownerDocument);\n }\n\n get tagName(): string {\n return this._tagName.toUpperCase();\n }\n\n get localName(): string {\n return this._tagName.toLowerCase();\n }\n\n // Element interface implementation\n get id(): string {\n return this._id;\n }\n\n set id(value: string) {\n this._id = value;\n this._attributes.set('id', value);\n }\n\n get className(): string {\n return this._className;\n }\n\n set className(value: string) {\n this._className = value;\n this._attributes.set('class', value);\n }\n\n get classList(): DOMTokenList {\n return new DOMTokenListImpl(this);\n }\n\n get innerHTML(): string {\n // Generate innerHTML from actual child nodes\n let html = '';\n for (const child of this._childNodesInternal) {\n if (child.nodeType === TEXT_NODE) {\n // For text nodes, use the escaped content stored in _nodeValue\n html += (child as any)._nodeValue || '';\n } else if (child.nodeType === ELEMENT_NODE) {\n // Generate outerHTML directly to avoid circular dependency\n html += this.generateChildElementHTML(child as any);\n } else if (child.nodeType === 8) { // COMMENT_NODE\n html += `<!--${(child as any).textContent || ''}-->`;\n }\n }\n return html;\n }\n\n get innerText(): string {\n // innerText should return the decoded text content\n return this.textContent || '';\n }\n\n set innerText(value: string | null) {\n // Clear all children and add escaped text content\n this._childNodesInternal = [];\n if (value !== null && value !== undefined) {\n const stringValue = String(value);\n const escapedValue = this.escapeHTMLEntities(stringValue);\n // Create text node with escaped content\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(escapedValue, this._ownerDocument);\n this._childNodesInternal.push(textNode);\n textNode._parentNodeInternal = this;\n }\n }\n\n set innerHTML(value: string) {\n // Clear existing children\n while (this._childNodesInternal.length > 0) {\n const child = this._childNodesInternal[0];\n if (child) {\n this.removeChild(child);\n }\n }\n\n // Parse HTML and create child nodes\n if (value.trim()) {\n this.parseAndAppendHTML(value);\n }\n }\n\n /**\n * Generate HTML for a child element without using outerHTML to avoid circular dependency\n */\n private generateChildElementHTML(element: any): string {\n const tagName = element.tagName.toLowerCase();\n \n // Get attributes\n const attrs = Array.from(element._attributes?.entries() || [])\n .map(([name, value]: [string, string]) => value === '' ? ` ${name}` : ` ${name}=\"${value.replace(/\"/g, '&quot;')}\"`)\n .join('');\n\n // Check if it's a self-closing tag\n const selfClosingTags = ['img', 'input', 'br', 'hr', 'meta', 'link', 'area', 'base', 'col', 'embed', 'source', 'track', 'wbr'];\n const isSelfClosing = selfClosingTags.includes(tagName);\n\n if (isSelfClosing) {\n return `<${tagName}${attrs} />`;\n } else {\n // Generate innerHTML directly without calling element.innerHTML to avoid recursion\n let childHTML = '';\n for (const child of element._childNodesInternal || []) {\n if (child.nodeType === TEXT_NODE) {\n childHTML += (child as any)._nodeValue || '';\n } else if (child.nodeType === ELEMENT_NODE) {\n childHTML += this.generateChildElementHTML(child as any);\n } else if (child.nodeType === 8) { // COMMENT_NODE\n childHTML += `<!--${(child as any).textContent || ''}-->`;\n }\n }\n return `<${tagName}${attrs}>${childHTML}</${tagName}>`;\n }\n }\n\n /**\n * Improved HTML parser for innerHTML using a stack-based approach\n */\n private parseAndAppendHTML(html: string): void {\n const ElementFactory = require('../../factory/ElementFactory').ElementFactory;\n \n let i = 0;\n const length = html.length;\n \n while (i < length) {\n const nextTagStart = html.indexOf('<', i);\n \n // Handle text content before next tag\n if (nextTagStart === -1) {\n // No more tags, rest is text\n let text = html.substring(i).trim();\n if (text) {\n // Fix broken closing tags (e.g., \"/div>\" -> \"</div>\")\n text = this.fixBrokenClosingTags(text);\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(text, this._ownerDocument);\n this.appendChild(textNode);\n }\n break;\n } else if (nextTagStart > i) {\n // Text content before the tag\n let text = html.substring(i, nextTagStart).trim();\n if (text) {\n // Fix broken closing tags (e.g., \"/div>\" -> \"</div>\")\n text = this.fixBrokenClosingTags(text);\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(text, this._ownerDocument);\n this.appendChild(textNode);\n }\n }\n \n i = nextTagStart;\n \n // Parse the tag - find the real tag end, considering quoted attributes\n const tagEnd = this.findTagEnd(html, i);\n if (tagEnd === -1) break;\n \n const tagContent = html.substring(i + 1, tagEnd);\n \n // Handle comments\n if (tagContent.startsWith('!--')) {\n const commentEnd = html.indexOf('-->', i);\n if (commentEnd !== -1) {\n const commentContent = html.substring(i + 4, commentEnd);\n const { Comment } = require('../Comment');\n const commentNode = new Comment(commentContent, this._ownerDocument);\n this.appendChild(commentNode);\n i = commentEnd + 3;\n continue;\n }\n }\n \n // Handle self-closing tags\n if (tagContent.endsWith('/')) {\n const parts = tagContent.slice(0, -1).trim().split(/\\s+/);\n const tagName = parts[0];\n const attributeString = tagContent.slice(tagName.length, -1).trim();\n \n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n this.appendChild(element);\n i = tagEnd + 1;\n continue;\n }\n \n // Handle closing tags - if they don't have matching opening tags, treat as text\n if (tagContent.startsWith('/')) {\n // For now, treat unmatched closing tags as text content\n const closingTagText = `<${tagContent}>`;\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(closingTagText, this._ownerDocument);\n this.appendChild(textNode);\n i = tagEnd + 1;\n continue;\n }\n \n // Handle opening tags\n const parts = tagContent.split(/\\s+/);\n const tagName = parts[0];\n const attributeString = tagContent.slice(tagName.length).trim();\n \n // Special handling for style and script tags\n if (tagName === 'style' || tagName === 'script') {\n const closingTag = `</${tagName}>`;\n const closingTagIndex = html.indexOf(closingTag, tagEnd + 1);\n \n if (closingTagIndex !== -1) {\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n \n const content = html.substring(tagEnd + 1, closingTagIndex);\n if (content) {\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(content, this._ownerDocument);\n element.appendChild(textNode);\n }\n \n this.appendChild(element);\n i = closingTagIndex + closingTag.length;\n continue;\n }\n }\n \n // Handle regular opening tags with content\n const closingTag = `</${tagName}>`;\n const closingTagIndex = this.findMatchingClosingTag(html, tagName, tagEnd + 1);\n \n if (closingTagIndex !== -1) {\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n \n const content = html.substring(tagEnd + 1, closingTagIndex);\n if (content.trim()) {\n element.innerHTML = content;\n }\n \n this.appendChild(element);\n i = closingTagIndex + closingTag.length;\n } else {\n // No matching closing tag found, treat as self-closing\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n this.appendChild(element);\n i = tagEnd + 1;\n }\n }\n }\n \n /**\n * Find the real end of a tag, considering quoted attributes\n */\n private findTagEnd(html: string, startIndex: number): number {\n let i = startIndex + 1; // Skip the '<'\n let inQuotes = false;\n let quoteChar = '';\n \n while (i < html.length) {\n const char = html[i];\n \n if (!inQuotes) {\n if (char === '\"' || char === \"'\") {\n inQuotes = true;\n quoteChar = char;\n } else if (char === '>') {\n return i;\n }\n } else {\n if (char === quoteChar) {\n inQuotes = false;\n quoteChar = '';\n }\n }\n \n i++;\n }\n \n return -1; // No closing '>' found\n }\n\n /**\n * Fix broken closing tags in text content\n * Converts patterns like \"/div>\" to \"</div>\"\n */\n private fixBrokenClosingTags(text: string): string {\n // Pattern to match broken closing tags: /tagname>\n return text.replace(/\\/(\\w+)>/g, '</$1>');\n }\n\n /**\n * Find the matching closing tag, accounting for nested tags of the same type\n */\n private findMatchingClosingTag(html: string, tagName: string, startIndex: number): number {\n const openTag = `<${tagName}`;\n const closeTag = `</${tagName}>`;\n let depth = 1;\n let i = startIndex;\n \n while (i < html.length && depth > 0) {\n const nextOpen = html.indexOf(openTag, i);\n const nextClose = html.indexOf(closeTag, i);\n \n if (nextClose === -1) {\n return -1; // No closing tag found\n }\n \n if (nextOpen !== -1 && nextOpen < nextClose) {\n // Found another opening tag before the closing tag\n // Make sure it's a complete tag (not just a substring)\n const afterTag = html.charAt(nextOpen + openTag.length);\n if (afterTag === ' ' || afterTag === '>' || afterTag === '/') {\n depth++;\n }\n i = nextOpen + openTag.length;\n } else {\n // Found a closing tag\n depth--;\n if (depth === 0) {\n return nextClose;\n }\n i = nextClose + closeTag.length;\n }\n }\n \n return -1;\n }\n\n /**\n * Parse attributes from attribute string\n */\n private parseAttributes(element: any, attributeString: string): void {\n // Improved attribute parsing that handles complex JavaScript expressions\n let position = 0;\n const length = attributeString.length;\n\n while (position < length) {\n // Skip whitespace\n while (position < length && /\\s/.test(attributeString[position])) {\n position++;\n }\n\n if (position >= length) break;\n\n // Find attribute name\n const nameStart = position;\n while (position < length && /[\\w:-]/.test(attributeString[position])) {\n position++;\n }\n\n if (position === nameStart) {\n // Invalid character, skip it\n position++;\n continue;\n }\n\n const name = attributeString.substring(nameStart, position);\n\n // Skip whitespace\n while (position < length && /\\s/.test(attributeString[position])) {\n position++;\n }\n\n let value = '';\n\n // Check if there's an equals sign\n if (position < length && attributeString[position] === '=') {\n position++; // Skip '='\n\n // Skip whitespace\n while (position < length && /\\s/.test(attributeString[position])) {\n position++;\n }\n\n if (position < length) {\n const quote = attributeString[position];\n \n if (quote === '\"' || quote === \"'\") {\n // Quoted value - find matching closing quote\n position++; // Skip opening quote\n const valueStart = position;\n \n while (position < length && attributeString[position] !== quote) {\n position++;\n }\n \n value = attributeString.substring(valueStart, position);\n \n if (position < length && attributeString[position] === quote) {\n position++; // Skip closing quote\n }\n } else {\n // Unquoted value - read until whitespace or end\n const valueStart = position;\n while (position < length && !/\\s/.test(attributeString[position])) {\n position++;\n }\n value = attributeString.substring(valueStart, position);\n }\n }\n }\n\n // Decode HTML entities in attribute values\n value = this.decodeHTMLEntities(value);\n \n element.setAttribute(name, value);\n }\n }\n\n /**\n * Escape HTML entities in a string to prevent XSS\n */\n protected escapeHTMLEntities(str: string): string {\n const entityMap: { [key: string]: string } = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;'\n };\n\n return str.replace(/[&<>\"']/g, (char) => {\n return entityMap[char] || char;\n });\n }\n\n /**\n * Decode HTML entities in a string\n */\n protected decodeHTMLEntities(str: string): string {\n const entityMap: { [key: string]: string } = {\n '&amp;': '&',\n '&lt;': '<',\n '&gt;': '>',\n '&quot;': '\"',\n '&#39;': \"'\",\n '&#34;': '\"',\n '&apos;': \"'\",\n '&copy;': '\u00A9',\n '&reg;': '\u00AE',\n '&trade;': '\u2122',\n '&nbsp;': ' ',\n '&hellip;': '\u2026',\n '&mdash;': '\u2014',\n '&ndash;': '\u2013',\n '&lsquo;': '\\u2018',\n '&rsquo;': '\\u2019',\n '&ldquo;': '\"',\n '&rdquo;': '\"'\n };\n\n return str.replace(/&[a-zA-Z0-9#]+;/g, (entity) => {\n // Handle named entities\n if (entityMap[entity]) {\n return entityMap[entity];\n }\n \n // Handle numeric entities like &#39; &#34;\n if (entity.startsWith('&#') && entity.endsWith(';')) {\n const numStr = entity.slice(2, -1);\n const num = parseInt(numStr, 10);\n if (!isNaN(num)) {\n return String.fromCharCode(num);\n }\n }\n \n // Handle hex entities like &#x27;\n if (entity.startsWith('&#x') && entity.endsWith(';')) {\n const hexStr = entity.slice(3, -1);\n const num = parseInt(hexStr, 16);\n if (!isNaN(num)) {\n return String.fromCharCode(num);\n }\n }\n \n // Return original if not recognized\n return entity;\n });\n }\n\n get outerHTML(): string {\n const attrs = Array.from(this._attributes.entries())\n .map(([name, value]) => value === '' ? ` ${name}` : ` ${name}=\"${value.replace(/\"/g, '&quot;')}\"`)\n .join('');\n\n // Check if it's a self-closing tag\n const selfClosingTags = ['img', 'input', 'br', 'hr', 'meta', 'link', 'area', 'base', 'col', 'embed', 'source', 'track', 'wbr'];\n const isSelfClosing = selfClosingTags.includes(this.tagName.toLowerCase());\n\n if (isSelfClosing) {\n return `<${this.tagName.toLowerCase()}${attrs} />`;\n } else {\n return `<${this.tagName.toLowerCase()}${attrs}>${this.innerHTML}</${this.tagName.toLowerCase()}>`;\n }\n }\n\n get namespaceURI(): string | null {\n return 'http://www.w3.org/1999/xhtml';\n }\n\n get prefix(): string | null {\n return null;\n }\n\n // Attribute methods\n getAttribute(qualifiedName: string): string | null {\n const value = this._attributes.get(qualifiedName.toLowerCase());\n return value !== undefined ? value : null;\n }\n\n setAttribute(qualifiedName: string, value: string): void {\n const name = qualifiedName.toLowerCase();\n this._attributes.set(name, value);\n\n // Update special properties\n if (name === 'id') {\n this._id = value;\n } else if (name === 'class') {\n this._className = value;\n }\n }\n\n removeAttribute(qualifiedName: string): void {\n const name = qualifiedName.toLowerCase();\n this._attributes.delete(name);\n\n // Update special properties\n if (name === 'id') {\n this._id = '';\n } else if (name === 'class') {\n this._className = '';\n }\n }\n\n hasAttribute(qualifiedName: string): boolean {\n return this._attributes.has(qualifiedName.toLowerCase());\n }\n\n /**\n * Returns the closest ancestor element (including the element itself) that matches the specified CSS selector.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/closest)\n */\n closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;\n closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;\n closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;\n closest<E extends Element = Element>(selectors: string): E | null;\n closest(selectors: string): Element | null {\n let element: Element | null = this as any;\n\n while (element) {\n if (element.matches && element.matches(selectors)) {\n return element;\n }\n element = element.parentElement;\n }\n\n return null;\n }\n\n /**\n * Returns true if the element would be selected by the specified CSS selector; otherwise, returns false.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)\n */\n matches(selectors: string): boolean {\n return CSSSelector.matches(this as any, selectors);\n }\n\n // ChildNode methods are inherited from ParentNodeBase -> ChildNodeBase\n\n // Additional Element properties and methods - Not implemented yet\n\n get attributes(): NamedNodeMap {\n return new NamedNodeMapImpl(this._attributes);\n }\n\n get clientHeight(): number {\n throw new Error('Element.clientHeight is not implemented yet');\n }\n\n get clientLeft(): number {\n throw new Error('Element.clientLeft is not implemented yet');\n }\n\n get clientTop(): number {\n throw new Error('Element.clientTop is not implemented yet');\n }\n\n get clientWidth(): number {\n throw new Error('Element.clientWidth is not implemented yet');\n }\n\n get currentCSSZoom(): number {\n throw new Error('Element.currentCSSZoom is not implemented yet');\n }\n\n onfullscreenchange: ((this: Element, ev: Event) => any) | null = null;\n onfullscreenerror: ((this: Element, ev: Event) => any) | null = null;\n\n get part(): any {\n throw new Error('Element.part is not implemented yet');\n }\n\n get scrollHeight(): number {\n throw new Error('Element.scrollHeight is not implemented yet');\n }\n\n get scrollLeft(): number {\n throw new Error('Element.scrollLeft is not implemented yet');\n }\n\n set scrollLeft(value: number) {\n throw new Error('Element.scrollLeft setter is not implemented yet');\n }\n\n get scrollTop(): number {\n throw new Error('Element.scrollTop is not implemented yet');\n }\n\n set scrollTop(value: number) {\n throw new Error('Element.scrollTop setter is not implemented yet');\n }\n\n get scrollWidth(): number {\n throw new Error('Element.scrollWidth is not implemented yet');\n }\n\n get shadowRoot(): any {\n throw new Error('Element.shadowRoot is not implemented yet');\n }\n\n get slot(): string {\n throw new Error('Element.slot is not implemented yet');\n }\n\n set slot(value: string) {\n throw new Error('Element.slot setter is not implemented yet');\n }\n\n // Methods - Not implemented yet\n\n attachShadow(init: any): any {\n throw new Error('Element.attachShadow() is not implemented yet');\n }\n\n checkVisibility(options?: any): boolean {\n throw new Error('Element.checkVisibility() is not implemented yet');\n }\n\n computedStyleMap(): any {\n throw new Error('Element.computedStyleMap() is not implemented yet');\n }\n\n getAttributeNS(namespace: string | null, localName: string): string | null {\n // For simplicity, we'll ignore namespace and use localName\n return this.getAttribute(localName);\n }\n\n getAttributeNames(): string[] {\n return Array.from(this._attributes.keys());\n }\n\n getAttributeNode(qualifiedName: string): Attr | null {\n const value = this.getAttribute(qualifiedName);\n if (value !== null) {\n return new AttrImpl(qualifiedName, value);\n }\n return null;\n }\n\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n // For simplicity, we'll ignore namespace and use localName\n return this.getAttributeNode(localName);\n }\n\n getBoundingClientRect(): any {\n throw new Error('Element.getBoundingClientRect() is not implemented yet');\n }\n\n getClientRects(): any {\n throw new Error('Element.getClientRects() is not implemented yet');\n }\n\n getElementsByClassName(classNames: string): HTMLCollection {\n const result: Element[] = [];\n const classNameList = classNames.trim().split(/\\s+/);\n\n // Helper function to check if element has all specified classes\n const hasAllClasses = (element: Element, classes: string[]): boolean => {\n const elementClasses = element.className.trim().split(/\\s+/);\n return classes.every(cls => elementClasses.includes(cls));\n };\n\n // Recursive function to traverse all descendants\n const traverse = (node: any) => {\n if (node.nodeType === ELEMENT_NODE) {\n const element = node as Element;\n if (hasAllClasses(element, classNameList)) {\n result.push(element);\n }\n }\n\n // Traverse children\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i]);\n }\n };\n\n // Start traversal from this element's children\n for (let i = 0; i < this.childNodes.length; i++) {\n traverse(this.childNodes[i]);\n }\n\n return new HTMLCollection(result);\n }\n\n getElementsByTagName(qualifiedName: string): HTMLCollection {\n const result: Element[] = [];\n const tagName = qualifiedName.toLowerCase();\n const isWildcard = tagName === '*';\n\n // Recursive function to traverse all descendants\n const traverse = (node: any) => {\n if (node.nodeType === ELEMENT_NODE) {\n const element = node as Element;\n if (isWildcard || element.localName === tagName) {\n result.push(element);\n }\n }\n\n // Traverse children\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i]);\n }\n };\n\n // Start traversal from this element's children\n for (let i = 0; i < this.childNodes.length; i++) {\n traverse(this.childNodes[i]);\n }\n\n return new HTMLCollection(result);\n }\n\n getElementsByTagNameNS(namespace: string | null, localName: string): any {\n // For simplicity, we'll implement this similar to getElementsByTagName\n // In a full implementation, namespace handling would be more complex\n return this.getElementsByTagName(localName);\n }\n\n getHTML(options?: any): string {\n throw new Error('Element.getHTML() is not implemented yet');\n }\n\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n // For simplicity, we'll ignore namespace and use localName\n return this.hasAttribute(localName);\n }\n\n hasAttributes(): boolean {\n return this._attributes.size > 0;\n }\n\n hasPointerCapture(pointerId: number): boolean {\n throw new Error('Element.hasPointerCapture() is not implemented yet');\n }\n\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n const position = where.toLowerCase();\n\n switch (position) {\n case 'beforebegin':\n // Insert before this element\n if (this.parentNode) {\n this.parentNode.insertBefore(element as any, this as any);\n return element;\n }\n return null;\n\n case 'afterbegin':\n // Insert as first child of this element\n if (this.firstChild) {\n this.insertBefore(element as any, this.firstChild);\n } else {\n this.appendChild(element as any);\n }\n return element;\n\n case 'beforeend':\n // Insert as last child of this element\n this.appendChild(element as any);\n return element;\n\n case 'afterend':\n // Insert after this element\n if (this.parentNode) {\n if (this.nextSibling) {\n this.parentNode.insertBefore(element as any, this.nextSibling);\n } else {\n this.parentNode.appendChild(element as any);\n }\n return element;\n }\n return null;\n\n default:\n throw new DOMException(`Invalid position: ${where}`, 'SyntaxError');\n }\n }\n\n insertAdjacentHTML(position: InsertPosition, html: string): void {\n const pos = position.toLowerCase();\n\n // Parse HTML string into elements\n const tempDiv = this._ownerDocument.createElement('div');\n tempDiv.innerHTML = html;\n\n // Move all parsed nodes to the target position\n const fragment = this._ownerDocument.createDocumentFragment();\n while (tempDiv.firstChild) {\n fragment.appendChild(tempDiv.firstChild);\n }\n\n switch (pos) {\n case 'beforebegin':\n if (this.parentNode) {\n this.parentNode.insertBefore(fragment, this as any);\n }\n break;\n\n case 'afterbegin':\n if (this.firstChild) {\n this.insertBefore(fragment, this.firstChild);\n } else {\n this.appendChild(fragment);\n }\n break;\n\n case 'beforeend':\n this.appendChild(fragment);\n break;\n\n case 'afterend':\n if (this.parentNode) {\n if (this.nextSibling) {\n this.parentNode.insertBefore(fragment, this.nextSibling);\n } else {\n this.parentNode.appendChild(fragment);\n }\n }\n break;\n\n default:\n throw new DOMException(`Invalid position: ${position}`, 'SyntaxError');\n }\n }\n\n insertAdjacentText(where: InsertPosition, data: string): void {\n const position = where.toLowerCase();\n\n // Create text node\n const textNode = this._ownerDocument.createTextNode(data);\n\n switch (position) {\n case 'beforebegin':\n if (this.parentNode) {\n this.parentNode.insertBefore(textNode, this as any);\n }\n break;\n\n case 'afterbegin':\n if (this.firstChild) {\n this.insertBefore(textNode, this.firstChild);\n } else {\n this.appendChild(textNode);\n }\n break;\n\n case 'beforeend':\n this.appendChild(textNode);\n break;\n\n case 'afterend':\n if (this.parentNode) {\n if (this.nextSibling) {\n this.parentNode.insertBefore(textNode, this.nextSibling);\n } else {\n this.parentNode.appendChild(textNode);\n }\n }\n break;\n\n default:\n throw new DOMException(`Invalid position: ${where}`, 'SyntaxError');\n }\n }\n\n releasePointerCapture(pointerId: number): void {\n // throw new Error('Element.releasePointerCapture() is not implemented yet');\n }\n\n removeAttributeNS(namespace: string | null, localName: string): void {\n // For simplicity, we'll ignore namespace and use localName\n this.removeAttribute(localName);\n }\n\n removeAttributeNode(attr: Attr): Attr {\n const oldValue = this.getAttribute(attr.name);\n if (oldValue !== null) {\n this.removeAttribute(attr.name);\n return new AttrImpl(attr.name, oldValue);\n }\n throw new DOMException('The attribute node is not an attribute of this element', 'NotFoundError');\n }\n\n requestFullscreen(options?: any): Promise<void> {\n throw new Error('Element.requestFullscreen() is not implemented yet');\n }\n\n requestPointerLock(options?: any): Promise<void> {\n throw new Error('Element.requestPointerLock() is not implemented yet');\n }\n\n scroll(options?: any): void;\n scroll(x: number, y: number): void;\n scroll(optionsOrX?: any, y?: number): void {\n // throw new Error('Element.scroll() is not implemented yet');\n }\n\n scrollBy(options?: any): void;\n scrollBy(x: number, y: number): void;\n scrollBy(optionsOrX?: any, y?: number): void {\n // throw new Error('Element.scrollBy() is not implemented yet');\n }\n\n scrollIntoView(arg?: boolean | any): void {\n // throw new Error('Element.scrollIntoView() is not implemented yet');\n }\n\n scrollTo(options?: any): void;\n scrollTo(x: number, y: number): void;\n scrollTo(optionsOrX?: any, y?: number): void {\n // throw new Error('Element.scrollTo() is not implemented yet');\n }\n\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n // For simplicity, we'll ignore namespace and use qualifiedName\n this.setAttribute(qualifiedName, value);\n }\n\n setAttributeNode(attr: Attr): Attr | null {\n const oldAttr = this.getAttributeNode(attr.name);\n this.setAttribute(attr.name, attr.value);\n return oldAttr;\n }\n\n setAttributeNodeNS(attr: Attr): Attr | null {\n // For simplicity, we'll ignore namespace\n return this.setAttributeNode(attr);\n }\n\n setHTMLUnsafe(html: string): void {\n // throw new Error('Element.setHTMLUnsafe() is not implemented yet');\n }\n\n setPointerCapture(pointerId: number): void {\n // throw new Error('Element.setPointerCapture() is not implemented yet');\n }\n\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n const hasAttr = this.hasAttribute(qualifiedName);\n\n if (force === true || (force === undefined && !hasAttr)) {\n this.setAttribute(qualifiedName, '');\n return true;\n } else if (force === false || (force === undefined && hasAttr)) {\n this.removeAttribute(qualifiedName);\n return false;\n }\n\n return hasAttr;\n }\n\n webkitMatchesSelector(selectors: string): boolean {\n // throw new Error('Element.webkitMatchesSelector() is not implemented yet');\n return false;\n }\n\n // EventTarget methods - Not implemented yet\n addEventListener(type: string, listener: any, options?: any): void {\n // throw new Error('Element.addEventListener() is not implemented yet');\n }\n\n removeEventListener(type: string, listener: any, options?: any): void {\n // throw new Error('Element.removeEventListener() is not implemented yet');\n }\n\n dispatchEvent(event: any): boolean {\n // throw new Error('Element.dispatchEvent() is not implemented yet');\n return true;\n }\n\n cloneNode(deep?: boolean): ElementBase {\n // Use ElementFactory to create the correct element type\n const clone = ElementFactory.createElement(this.tagName, this._ownerDocument);\n\n // Copy attributes\n for (const [name, value] of this._attributes) {\n clone.setAttribute(name, value);\n }\n\n // Copy children if deep clone\n if (deep) {\n for (const child of this._childNodesInternal) {\n if (child && 'cloneNode' in child) {\n clone.appendChild((child as any).cloneNode(true));\n }\n }\n }\n\n return clone;\n }\n}\n\n// DOMTokenList implementation\nclass DOMTokenListImpl implements DOMTokenList {\n constructor(private element: ElementBase) { }\n\n get length(): number {\n return this.element.className.split(/\\s+/).filter(c => c.length > 0).length;\n }\n\n get value(): string {\n return this.element.className;\n }\n\n set value(value: string) {\n this.element.className = value;\n }\n\n add(...tokens: string[]): void {\n const classes = new Set(this.element.className.split(/\\s+/).filter(c => c.length > 0));\n for (const token of tokens) {\n classes.add(token);\n }\n this.element.className = Array.from(classes).join(' ');\n }\n\n remove(...tokens: string[]): void {\n const classes = new Set(this.element.className.split(/\\s+/).filter(c => c.length > 0));\n for (const token of tokens) {\n classes.delete(token);\n }\n this.element.className = Array.from(classes).join(' ');\n }\n\n contains(token: string): boolean {\n return this.element.className.split(/\\s+/).includes(token);\n }\n\n toggle(token: string, force?: boolean): boolean {\n const hasToken = this.contains(token);\n\n if (force === true || (force === undefined && !hasToken)) {\n this.add(token);\n return true;\n } else {\n this.remove(token);\n return false;\n }\n }\n\n replace(oldToken: string, newToken: string): boolean {\n if (this.contains(oldToken)) {\n this.remove(oldToken);\n this.add(newToken);\n return true;\n }\n return false;\n }\n\n item(index: number): string | null {\n const classes = this.element.className.split(/\\s+/).filter(c => c.length > 0);\n return index >= 0 && index < classes.length ? classes[index] : null;\n }\n\n [index: number]: string;\n}\n\n\n\n// Attr implementation\nclass AttrImpl extends NodeBase implements Attr {\n public ownerElement: Element | null = null;\n public namespaceURI: string | null = null;\n public prefix: string | null = null;\n public specified: boolean = true;\n\n constructor(public name: string, public value: string) {\n super(ATTRIBUTE_NODE, name);\n }\n\n get localName(): string {\n return this.name;\n }\n}\n\n// NamedNodeMap implementation\nclass NamedNodeMapImpl implements NamedNodeMap {\n constructor(private attributes: Map<string, string>) { }\n\n get length(): number {\n return this.attributes.size;\n }\n\n getNamedItem(qualifiedName: string): Attr | null {\n const value = this.attributes.get(qualifiedName.toLowerCase());\n return value !== undefined ? new AttrImpl(qualifiedName, value) : null;\n }\n\n getNamedItemNS(namespace: string | null, localName: string): Attr | null {\n // For simplicity, ignore namespace\n return this.getNamedItem(localName);\n }\n\n item(index: number): Attr | null {\n const keys = Array.from(this.attributes.keys());\n if (index >= 0 && index < keys.length) {\n const key = keys[index];\n const value = this.attributes.get(key)!;\n return new AttrImpl(key, value);\n }\n return null;\n }\n\n removeNamedItem(qualifiedName: string): Attr {\n const value = this.attributes.get(qualifiedName.toLowerCase());\n if (value !== undefined) {\n this.attributes.delete(qualifiedName.toLowerCase());\n return new AttrImpl(qualifiedName, value);\n }\n throw new DOMException('The attribute is not found', 'NotFoundError');\n }\n\n removeNamedItemNS(namespace: string | null, localName: string): Attr {\n // For simplicity, ignore namespace\n return this.removeNamedItem(localName);\n }\n\n setNamedItem(attr: Attr): Attr | null {\n const oldValue = this.attributes.get(attr.name.toLowerCase());\n this.attributes.set(attr.name.toLowerCase(), attr.value);\n return oldValue !== undefined ? new AttrImpl(attr.name, oldValue) : null;\n }\n\n setNamedItemNS(attr: Attr): Attr | null {\n // For simplicity, ignore namespace\n return this.setNamedItem(attr);\n }\n\n // Iterator implementation\n *[Symbol.iterator](): IterableIterator<Attr> {\n const keys = Array.from(this.attributes.keys());\n for (const key of keys) {\n const value = this.attributes.get(key)!;\n yield new AttrImpl(key, value);\n }\n }\n\n // Additional iterator methods for compatibility\n keys(): IterableIterator<string> {\n return this.attributes.keys();\n }\n\n values(): IterableIterator<Attr> {\n const self = this;\n return (function* () {\n for (const [key, value] of self.attributes) {\n yield new AttrImpl(key, value);\n }\n })();\n }\n\n entries(): IterableIterator<[string, Attr]> {\n const self = this;\n return (function* () {\n for (const [key, value] of self.attributes) {\n yield [key, new AttrImpl(key, value)] as [string, Attr];\n }\n })();\n }\n\n // forEach method for compatibility\n forEach(callback: (attr: Attr, index: number, map: NamedNodeMap) => void, thisArg?: any): void {\n const keys = Array.from(this.attributes.keys());\n keys.forEach((key, index) => {\n const value = this.attributes.get(key)!;\n const attr = new AttrImpl(key, value);\n callback.call(thisArg, attr, index, this);\n });\n }\n\n [index: number]: Attr;\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA+B;AAE/B,wBAA+B;AAE/B,4BAA+B;AAE/B,kBAAwD;AACxD,yBAA4B;AAE5B,sBAAyB;AAMzB,MAAM,qBAAqB,MAAM;AAAA,EAC7B,YAAY,SAAwB,OAAe,gBAAgB;AAC/D,UAAM,OAAO;AADmB;AAEhC,SAAK,OAAO;AAAA,EAChB;AACJ;AAIO,MAAe,oBAAoB,qCAAkC;AAAA,EAKxE,YACW,UACP,eACF;AACE,UAAM,0BAAc,SAAS,YAAY,GAAG,aAAa;AAHlD;AALX,SAAQ,MAAc;AACtB,SAAQ,aAAqB;AAC7B,SAAQ,cAAmC,oBAAI,IAAI;AA4lBnD,8BAAiE;AACjE,6BAAgE;AAAA,EAtlBhE;AAAA,EAEA,IAAI,UAAkB;AAClB,WAAO,KAAK,SAAS,YAAY;AAAA,EACrC;AAAA,EAEA,IAAI,YAAoB;AACpB,WAAO,KAAK,SAAS,YAAY;AAAA,EACrC;AAAA;AAAA,EAGA,IAAI,KAAa;AACb,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,GAAG,OAAe;AAClB,SAAK,MAAM;AACX,SAAK,YAAY,IAAI,MAAM,KAAK;AAAA,EACpC;AAAA,EAEA,IAAI,YAAoB;AACpB,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,UAAU,OAAe;AACzB,SAAK,aAAa;AAClB,SAAK,YAAY,IAAI,SAAS,KAAK;AAAA,EACvC;AAAA,EAEA,IAAI,YAA0B;AAC1B,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,MAAyB;AAEpC,WAAO,KAAK,aAAa,IAAI;AAAA,EACjC;AAAA;AAAA,EAGA,EAAE,OAAO,QAAQ,IAA4B;AACzC,UAAM,OAAO,MAAM,KAAK,KAAK,WAAW,KAAK,CAAC;AAC9C,eAAW,OAAO,MAAM;AACpB,YAAM,QAAQ,KAAK,WAAW,IAAI,GAAG;AACrC,YAAM,IAAI,SAAS,KAAK,KAAK;AAAA,IACjC;AAAA,EACJ;AAAA;AAAA,EAGA,OAAiC;AAC7B,WAAO,KAAK,WAAW,KAAK;AAAA,EAChC;AAAA,EAEA,SAAiC;AAC7B,UAAM,OAAO;AACb,WAAQ,aAAa;AACjB,iBAAW,CAAC,KAAK,KAAK,KAAK,KAAK,YAAY;AACxC,cAAM,IAAI,SAAS,KAAK,KAAK;AAAA,MACjC;AAAA,IACJ,EAAG;AAAA,EACP;AAAA,EAEA,UAA4C;AACxC,UAAM,OAAO;AACb,WAAQ,aAAa;AACjB,iBAAW,CAAC,KAAK,KAAK,KAAK,KAAK,YAAY;AACxC,cAAM,CAAC,KAAK,IAAI,SAAS,KAAK,KAAK,CAAC;AAAA,MACxC;AAAA,IACJ,EAAG;AAAA,EACP;AAAA;AAAA,EAGA,QAAQ,UAAkE,SAAqB;AAC3F,UAAM,OAAO,MAAM,KAAK,KAAK,WAAW,KAAK,CAAC;AAC9C,SAAK,QAAQ,CAAC,KAAK,UAAU;AACzB,YAAM,QAAQ,KAAK,WAAW,IAAI,GAAG;AACrC,YAAM,OAAO,IAAI,SAAS,KAAK,KAAK;AACpC,eAAS,KAAK,SAAS,MAAM,OAAO,IAAI;AAAA,IAC5C,CAAC;AAAA,EACL;AAGJ;",
4
+ "sourcesContent": ["import { ParentNodeBase } from '../ParentNodeBase';\nimport { ChildNodeBase } from '../ChildNodeBase';\nimport { HTMLCollection } from \"../collection\";\nimport { Text } from \"../Text\";\nimport { ElementFactory } from \"../../factory/ElementFactory\";\nimport { Element, DOMTokenList, Attr, NamedNodeMap, DOMRect } from './Element';\nimport { ELEMENT_NODE, TEXT_NODE, ATTRIBUTE_NODE } from '../Node';\nimport { CSSSelector } from '../../utils/CSSSelector';\nimport { HTMLElementTagNameMap } from \"./index\";\nimport { NodeBase } from '../NodeBase';\n\n// InsertPosition type for insertAdjacent methods\ntype InsertPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';\n\n// Simple DOMException class for error handling\nclass DOMException extends Error {\n constructor(message: string, public name: string = 'DOMException') {\n super(message);\n this.name = name;\n }\n}\n/**\n * Base implementation of the Element interface\n */\nexport abstract class ElementBase extends ParentNodeBase implements Element {\n private _id: string = '';\n private _className: string = '';\n private _attributes: Map<string, string> = new Map();\n\n constructor(\n public _tagName: string,\n ownerDocument?: any\n ) {\n super(ELEMENT_NODE, _tagName.toUpperCase(), ownerDocument);\n }\n\n get tagName(): string {\n return this._tagName.toUpperCase();\n }\n\n get localName(): string {\n return this._tagName.toLowerCase();\n }\n\n // Element interface implementation\n get id(): string {\n return this._id;\n }\n\n set id(value: string) {\n this._id = value;\n this._attributes.set('id', value);\n }\n\n get className(): string {\n return this._className;\n }\n\n set className(value: string) {\n this._className = value;\n this._attributes.set('class', value);\n }\n\n get classList(): DOMTokenList {\n return new DOMTokenListImpl(this);\n }\n\n get innerHTML(): string {\n // Generate innerHTML from actual child nodes\n let html = '';\n for (const child of this._childNodesInternal) {\n if (child.nodeType === TEXT_NODE) {\n // For text nodes, use the escaped content stored in _nodeValue\n html += (child as any)._nodeValue || '';\n } else if (child.nodeType === ELEMENT_NODE) {\n // Generate outerHTML directly to avoid circular dependency\n html += this.generateChildElementHTML(child as any);\n } else if (child.nodeType === 8) { // COMMENT_NODE\n html += `<!--${(child as any).textContent || ''}-->`;\n }\n }\n return html;\n }\n\n get innerText(): string {\n // innerText should return the decoded text content\n return this.textContent || '';\n }\n\n set innerText(value: string | null) {\n // Clear all children and add escaped text content\n this._childNodesInternal = [];\n if (value !== null && value !== undefined) {\n const stringValue = String(value);\n const escapedValue = this.escapeHTMLEntities(stringValue);\n // Create text node with escaped content\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(escapedValue, this._ownerDocument);\n this._childNodesInternal.push(textNode);\n textNode._parentNodeInternal = this;\n }\n }\n\n set innerHTML(value: string) {\n // Clear existing children\n while (this._childNodesInternal.length > 0) {\n const child = this._childNodesInternal[0];\n if (child) {\n this.removeChild(child);\n }\n }\n\n // Parse HTML and create child nodes\n if (value.trim()) {\n this.parseAndAppendHTML(value);\n }\n }\n\n /**\n * Generate HTML for a child element without using outerHTML to avoid circular dependency\n */\n private generateChildElementHTML(element: any): string {\n const tagName = element.tagName.toLowerCase();\n // Get attributes\n const attrs = Array.from(element._attributes?.entries() || [])\n .map(([name, value]: [string, string]) => value === '' ? ` ${name}` : ` ${name}=\"${String(value).replace(/\"/g, '&quot;')}\"`)\n .join('');\n\n // Check if it's a self-closing tag\n const selfClosingTags = ['img', 'input', 'br', 'hr', 'meta', 'link', 'area', 'base', 'col', 'embed', 'source', 'track', 'wbr'];\n const isSelfClosing = selfClosingTags.includes(tagName);\n\n if (isSelfClosing) {\n return `<${tagName}${attrs} />`;\n } else {\n // Generate innerHTML directly without calling element.innerHTML to avoid recursion\n let childHTML = '';\n for (const child of element._childNodesInternal || []) {\n if (child.nodeType === TEXT_NODE) {\n childHTML += (child as any)._nodeValue || '';\n } else if (child.nodeType === ELEMENT_NODE) {\n childHTML += this.generateChildElementHTML(child as any);\n } else if (child.nodeType === 8) { // COMMENT_NODE\n childHTML += `<!--${(child as any).textContent || ''}-->`;\n }\n }\n return `<${tagName}${attrs}>${childHTML}</${tagName}>`;\n }\n }\n\n /**\n * Improved HTML parser for innerHTML using a stack-based approach\n */\n private parseAndAppendHTML(html: string): void {\n const ElementFactory = require('../../factory/ElementFactory').ElementFactory;\n\n let i = 0;\n const length = html.length;\n\n while (i < length) {\n const nextTagStart = html.indexOf('<', i);\n\n // Handle text content before next tag\n if (nextTagStart === -1) {\n // No more tags, rest is text\n let text = html.substring(i).trim();\n if (text) {\n // Fix broken closing tags (e.g., \"/div>\" -> \"</div>\")\n text = this.fixBrokenClosingTags(text);\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(text, this._ownerDocument);\n this.appendChild(textNode);\n }\n break;\n } else if (nextTagStart > i) {\n // Text content before the tag\n let text = html.substring(i, nextTagStart).trim();\n if (text) {\n // Fix broken closing tags (e.g., \"/div>\" -> \"</div>\")\n text = this.fixBrokenClosingTags(text);\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(text, this._ownerDocument);\n this.appendChild(textNode);\n }\n }\n\n i = nextTagStart;\n\n // Parse the tag - find the real tag end, considering quoted attributes\n const tagEnd = this.findTagEnd(html, i);\n if (tagEnd === -1) break;\n\n const tagContent = html.substring(i + 1, tagEnd);\n\n // Handle comments\n if (tagContent.startsWith('!--')) {\n const commentEnd = html.indexOf('-->', i);\n if (commentEnd !== -1) {\n const commentContent = html.substring(i + 4, commentEnd);\n const { Comment } = require('../Comment');\n const commentNode = new Comment(commentContent, this._ownerDocument);\n this.appendChild(commentNode);\n i = commentEnd + 3;\n continue;\n }\n }\n\n // Handle self-closing tags\n if (tagContent.endsWith('/')) {\n const parts = tagContent.slice(0, -1).trim().split(/\\s+/);\n const tagName = parts[0];\n const attributeString = tagContent.slice(tagName.length, -1).trim();\n\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n this.appendChild(element);\n i = tagEnd + 1;\n continue;\n }\n\n // Handle closing tags - if they don't have matching opening tags, treat as text\n if (tagContent.startsWith('/')) {\n // For now, treat unmatched closing tags as text content\n const closingTagText = `<${tagContent}>`;\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(closingTagText, this._ownerDocument);\n this.appendChild(textNode);\n i = tagEnd + 1;\n continue;\n }\n\n // Handle opening tags\n const parts = tagContent.split(/\\s+/);\n const tagName = parts[0];\n const attributeString = tagContent.slice(tagName.length).trim();\n\n // Special handling for style and script tags\n if (tagName === 'style' || tagName === 'script') {\n const closingTag = `</${tagName}>`;\n const closingTagIndex = html.indexOf(closingTag, tagEnd + 1);\n\n if (closingTagIndex !== -1) {\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n\n const content = html.substring(tagEnd + 1, closingTagIndex);\n if (content) {\n const { TextBase } = require('../TextBase');\n const textNode = new TextBase(content, this._ownerDocument);\n element.appendChild(textNode);\n }\n\n this.appendChild(element);\n i = closingTagIndex + closingTag.length;\n continue;\n }\n }\n\n // Handle regular opening tags with content\n const closingTag = `</${tagName}>`;\n const closingTagIndex = this.findMatchingClosingTag(html, tagName, tagEnd + 1);\n\n if (closingTagIndex !== -1) {\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n\n const content = html.substring(tagEnd + 1, closingTagIndex);\n if (content.trim()) {\n element.innerHTML = content;\n }\n\n this.appendChild(element);\n i = closingTagIndex + closingTag.length;\n } else {\n // No matching closing tag found, treat as self-closing\n const element = ElementFactory.createElement(tagName, this._ownerDocument);\n this.parseAttributes(element, attributeString);\n this.appendChild(element);\n i = tagEnd + 1;\n }\n }\n }\n\n /**\n * Find the real end of a tag, considering quoted attributes\n */\n private findTagEnd(html: string, startIndex: number): number {\n let i = startIndex + 1; // Skip the '<'\n let inQuotes = false;\n let quoteChar = '';\n\n while (i < html.length) {\n const char = html[i];\n\n if (!inQuotes) {\n if (char === '\"' || char === \"'\") {\n inQuotes = true;\n quoteChar = char;\n } else if (char === '>') {\n return i;\n }\n } else {\n if (char === quoteChar) {\n inQuotes = false;\n quoteChar = '';\n }\n }\n\n i++;\n }\n\n return -1; // No closing '>' found\n }\n\n /**\n * Fix broken closing tags in text content\n * Converts patterns like \"/div>\" to \"</div>\"\n */\n private fixBrokenClosingTags(text: string): string {\n // Pattern to match broken closing tags: /tagname>\n return text.replace(/\\/(\\w+)>/g, '</$1>');\n }\n\n /**\n * Find the matching closing tag, accounting for nested tags of the same type\n */\n private findMatchingClosingTag(html: string, tagName: string, startIndex: number): number {\n const openTag = `<${tagName}`;\n const closeTag = `</${tagName}>`;\n let depth = 1;\n let i = startIndex;\n\n while (i < html.length && depth > 0) {\n const nextOpen = html.indexOf(openTag, i);\n const nextClose = html.indexOf(closeTag, i);\n\n if (nextClose === -1) {\n return -1; // No closing tag found\n }\n\n if (nextOpen !== -1 && nextOpen < nextClose) {\n // Found another opening tag before the closing tag\n // Make sure it's a complete tag (not just a substring)\n const afterTag = html.charAt(nextOpen + openTag.length);\n if (afterTag === ' ' || afterTag === '>' || afterTag === '/') {\n depth++;\n }\n i = nextOpen + openTag.length;\n } else {\n // Found a closing tag\n depth--;\n if (depth === 0) {\n return nextClose;\n }\n i = nextClose + closeTag.length;\n }\n }\n\n return -1;\n }\n\n /**\n * Parse attributes from attribute string\n */\n private parseAttributes(element: any, attributeString: string): void {\n // Improved attribute parsing that handles complex JavaScript expressions\n let position = 0;\n const length = attributeString.length;\n\n while (position < length) {\n // Skip whitespace\n while (position < length && /\\s/.test(attributeString[position])) {\n position++;\n }\n\n if (position >= length) break;\n\n // Find attribute name\n const nameStart = position;\n while (position < length && /[\\w:-]/.test(attributeString[position])) {\n position++;\n }\n\n if (position === nameStart) {\n // Invalid character, skip it\n position++;\n continue;\n }\n\n const name = attributeString.substring(nameStart, position);\n\n // Skip whitespace\n while (position < length && /\\s/.test(attributeString[position])) {\n position++;\n }\n\n let value = '';\n\n // Check if there's an equals sign\n if (position < length && attributeString[position] === '=') {\n position++; // Skip '='\n\n // Skip whitespace\n while (position < length && /\\s/.test(attributeString[position])) {\n position++;\n }\n\n if (position < length) {\n const quote = attributeString[position];\n\n if (quote === '\"' || quote === \"'\") {\n // Quoted value - find matching closing quote\n position++; // Skip opening quote\n const valueStart = position;\n\n while (position < length && attributeString[position] !== quote) {\n position++;\n }\n\n value = attributeString.substring(valueStart, position);\n\n if (position < length && attributeString[position] === quote) {\n position++; // Skip closing quote\n }\n } else {\n // Unquoted value - read until whitespace or end\n const valueStart = position;\n while (position < length && !/\\s/.test(attributeString[position])) {\n position++;\n }\n value = attributeString.substring(valueStart, position);\n }\n }\n }\n\n // Decode HTML entities in attribute values\n value = this.decodeHTMLEntities(value);\n\n element.setAttribute(name, value);\n }\n }\n\n /**\n * Escape HTML entities in a string to prevent XSS\n */\n protected escapeHTMLEntities(str: string): string {\n const entityMap: { [key: string]: string } = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;'\n };\n\n return str.replace(/[&<>\"']/g, (char) => {\n return entityMap[char] || char;\n });\n }\n\n /**\n * Decode HTML entities in a string\n */\n protected decodeHTMLEntities(str: string): string {\n const entityMap: { [key: string]: string } = {\n '&amp;': '&',\n '&lt;': '<',\n '&gt;': '>',\n '&quot;': '\"',\n '&#39;': \"'\",\n '&#34;': '\"',\n '&apos;': \"'\",\n '&copy;': '\u00A9',\n '&reg;': '\u00AE',\n '&trade;': '\u2122',\n '&nbsp;': ' ',\n '&hellip;': '\u2026',\n '&mdash;': '\u2014',\n '&ndash;': '\u2013',\n '&lsquo;': '\\u2018',\n '&rsquo;': '\\u2019',\n '&ldquo;': '\"',\n '&rdquo;': '\"'\n };\n\n return str.replace(/&[a-zA-Z0-9#]+;/g, (entity) => {\n // Handle named entities\n if (entityMap[entity]) {\n return entityMap[entity];\n }\n\n // Handle numeric entities like &#39; &#34;\n if (entity.startsWith('&#') && entity.endsWith(';')) {\n const numStr = entity.slice(2, -1);\n const num = parseInt(numStr, 10);\n if (!isNaN(num)) {\n return String.fromCharCode(num);\n }\n }\n\n // Handle hex entities like &#x27;\n if (entity.startsWith('&#x') && entity.endsWith(';')) {\n const hexStr = entity.slice(3, -1);\n const num = parseInt(hexStr, 16);\n if (!isNaN(num)) {\n return String.fromCharCode(num);\n }\n }\n\n // Return original if not recognized\n return entity;\n });\n }\n\n get outerHTML(): string {\n const attrs = Array.from(this._attributes.entries())\n .map(([name, value]) => value === '' ? ` ${name}` : ` ${name}=\"${value.replace(/\"/g, '&quot;')}\"`)\n .join('');\n\n // Check if it's a self-closing tag\n const selfClosingTags = ['img', 'input', 'br', 'hr', 'meta', 'link', 'area', 'base', 'col', 'embed', 'source', 'track', 'wbr'];\n const isSelfClosing = selfClosingTags.includes(this.tagName.toLowerCase());\n\n if (isSelfClosing) {\n return `<${this.tagName.toLowerCase()}${attrs} />`;\n } else {\n return `<${this.tagName.toLowerCase()}${attrs}>${this.innerHTML}</${this.tagName.toLowerCase()}>`;\n }\n }\n\n get namespaceURI(): string | null {\n return 'http://www.w3.org/1999/xhtml';\n }\n\n get prefix(): string | null {\n return null;\n }\n\n // Attribute methods\n getAttribute(qualifiedName: string): string | null {\n const value = this._attributes.get(qualifiedName.toLowerCase());\n return value !== undefined ? value : null;\n }\n\n setAttribute(qualifiedName: string, value: string): void {\n const name = qualifiedName.toLowerCase();\n this._attributes.set(name, value);\n\n // Update special properties\n if (name === 'id') {\n this._id = value;\n } else if (name === 'class') {\n this._className = value;\n }\n }\n\n removeAttribute(qualifiedName: string): void {\n const name = qualifiedName.toLowerCase();\n this._attributes.delete(name);\n\n // Update special properties\n if (name === 'id') {\n this._id = '';\n } else if (name === 'class') {\n this._className = '';\n }\n }\n\n hasAttribute(qualifiedName: string): boolean {\n return this._attributes.has(qualifiedName.toLowerCase());\n }\n\n /**\n * Returns the closest ancestor element (including the element itself) that matches the specified CSS selector.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/closest)\n */\n closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;\n closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;\n closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;\n closest<E extends Element = Element>(selectors: string): E | null;\n closest(selectors: string): Element | null {\n let element: Element | null = this as any;\n\n while (element) {\n if (element.matches && element.matches(selectors)) {\n return element;\n }\n element = element.parentElement;\n }\n\n return null;\n }\n\n /**\n * Returns true if the element would be selected by the specified CSS selector; otherwise, returns false.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)\n */\n matches(selectors: string): boolean {\n return CSSSelector.matches(this as any, selectors);\n }\n\n // ChildNode methods are inherited from ParentNodeBase -> ChildNodeBase\n\n // Additional Element properties and methods - Not implemented yet\n\n get attributes(): NamedNodeMap {\n return new NamedNodeMapImpl(this._attributes);\n }\n\n get clientHeight(): number {\n throw new Error('Element.clientHeight is not implemented yet');\n }\n\n get clientLeft(): number {\n throw new Error('Element.clientLeft is not implemented yet');\n }\n\n get clientTop(): number {\n throw new Error('Element.clientTop is not implemented yet');\n }\n\n get clientWidth(): number {\n throw new Error('Element.clientWidth is not implemented yet');\n }\n\n get currentCSSZoom(): number {\n throw new Error('Element.currentCSSZoom is not implemented yet');\n }\n\n onfullscreenchange: ((this: Element, ev: Event) => any) | null = null;\n onfullscreenerror: ((this: Element, ev: Event) => any) | null = null;\n\n get part(): any {\n throw new Error('Element.part is not implemented yet');\n }\n\n get scrollHeight(): number {\n throw new Error('Element.scrollHeight is not implemented yet');\n }\n\n get scrollLeft(): number {\n throw new Error('Element.scrollLeft is not implemented yet');\n }\n\n set scrollLeft(value: number) {\n throw new Error('Element.scrollLeft setter is not implemented yet');\n }\n\n get scrollTop(): number {\n throw new Error('Element.scrollTop is not implemented yet');\n }\n\n set scrollTop(value: number) {\n throw new Error('Element.scrollTop setter is not implemented yet');\n }\n\n get scrollWidth(): number {\n throw new Error('Element.scrollWidth is not implemented yet');\n }\n\n get shadowRoot(): any {\n throw new Error('Element.shadowRoot is not implemented yet');\n }\n\n get slot(): string {\n throw new Error('Element.slot is not implemented yet');\n }\n\n set slot(value: string) {\n throw new Error('Element.slot setter is not implemented yet');\n }\n\n // Methods - Not implemented yet\n\n attachShadow(init: any): any {\n throw new Error('Element.attachShadow() is not implemented yet');\n }\n\n checkVisibility(options?: any): boolean {\n throw new Error('Element.checkVisibility() is not implemented yet');\n }\n\n computedStyleMap(): any {\n throw new Error('Element.computedStyleMap() is not implemented yet');\n }\n\n getAttributeNS(namespace: string | null, localName: string): string | null {\n // For simplicity, we'll ignore namespace and use localName\n return this.getAttribute(localName);\n }\n\n getAttributeNames(): string[] {\n return Array.from(this._attributes.keys());\n }\n\n getAttributeNode(qualifiedName: string): Attr | null {\n const value = this.getAttribute(qualifiedName);\n if (value !== null) {\n return new AttrImpl(qualifiedName, value);\n }\n return null;\n }\n\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n // For simplicity, we'll ignore namespace and use localName\n return this.getAttributeNode(localName);\n }\n\n getBoundingClientRect(): DOMRect {\n return {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n toJSON: () => ({})\n };\n }\n\n getClientRects(): any {\n throw new Error('Element.getClientRects() is not implemented yet');\n }\n\n getElementsByClassName(classNames: string): HTMLCollection {\n const result: Element[] = [];\n const classNameList = classNames.trim().split(/\\s+/);\n\n // Helper function to check if element has all specified classes\n const hasAllClasses = (element: Element, classes: string[]): boolean => {\n const elementClasses = element.className.trim().split(/\\s+/);\n return classes.every(cls => elementClasses.includes(cls));\n };\n\n // Recursive function to traverse all descendants\n const traverse = (node: any) => {\n if (node.nodeType === ELEMENT_NODE) {\n const element = node as Element;\n if (hasAllClasses(element, classNameList)) {\n result.push(element);\n }\n }\n\n // Traverse children\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i]);\n }\n };\n\n // Start traversal from this element's children\n for (let i = 0; i < this.childNodes.length; i++) {\n traverse(this.childNodes[i]);\n }\n\n return new HTMLCollection(result);\n }\n\n getElementsByTagName(qualifiedName: string): HTMLCollection {\n const result: Element[] = [];\n const tagName = qualifiedName.toLowerCase();\n const isWildcard = tagName === '*';\n\n // Recursive function to traverse all descendants\n const traverse = (node: any) => {\n if (node.nodeType === ELEMENT_NODE) {\n const element = node as Element;\n if (isWildcard || element.localName === tagName) {\n result.push(element);\n }\n }\n\n // Traverse children\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i]);\n }\n };\n\n // Start traversal from this element's children\n for (let i = 0; i < this.childNodes.length; i++) {\n traverse(this.childNodes[i]);\n }\n\n return new HTMLCollection(result);\n }\n\n getElementsByTagNameNS(namespace: string | null, localName: string): any {\n // For simplicity, we'll implement this similar to getElementsByTagName\n // In a full implementation, namespace handling would be more complex\n return this.getElementsByTagName(localName);\n }\n\n getHTML(options?: any): string {\n throw new Error('Element.getHTML() is not implemented yet');\n }\n\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n // For simplicity, we'll ignore namespace and use localName\n return this.hasAttribute(localName);\n }\n\n hasAttributes(): boolean {\n return this._attributes.size > 0;\n }\n\n hasPointerCapture(pointerId: number): boolean {\n throw new Error('Element.hasPointerCapture() is not implemented yet');\n }\n\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n const position = where.toLowerCase();\n\n switch (position) {\n case 'beforebegin':\n // Insert before this element\n if (this.parentNode) {\n this.parentNode.insertBefore(element as any, this as any);\n return element;\n }\n return null;\n\n case 'afterbegin':\n // Insert as first child of this element\n if (this.firstChild) {\n this.insertBefore(element as any, this.firstChild);\n } else {\n this.appendChild(element as any);\n }\n return element;\n\n case 'beforeend':\n // Insert as last child of this element\n this.appendChild(element as any);\n return element;\n\n case 'afterend':\n // Insert after this element\n if (this.parentNode) {\n if (this.nextSibling) {\n this.parentNode.insertBefore(element as any, this.nextSibling);\n } else {\n this.parentNode.appendChild(element as any);\n }\n return element;\n }\n return null;\n\n default:\n throw new DOMException(`Invalid position: ${where}`, 'SyntaxError');\n }\n }\n\n insertAdjacentHTML(position: InsertPosition, html: string): void {\n const pos = position.toLowerCase();\n\n // Parse HTML string into elements\n const tempDiv = this._ownerDocument.createElement('div');\n tempDiv.innerHTML = html;\n\n // Move all parsed nodes to the target position\n const fragment = this._ownerDocument.createDocumentFragment();\n while (tempDiv.firstChild) {\n fragment.appendChild(tempDiv.firstChild);\n }\n\n switch (pos) {\n case 'beforebegin':\n if (this.parentNode) {\n this.parentNode.insertBefore(fragment, this as any);\n }\n break;\n\n case 'afterbegin':\n if (this.firstChild) {\n this.insertBefore(fragment, this.firstChild);\n } else {\n this.appendChild(fragment);\n }\n break;\n\n case 'beforeend':\n this.appendChild(fragment);\n break;\n\n case 'afterend':\n if (this.parentNode) {\n if (this.nextSibling) {\n this.parentNode.insertBefore(fragment, this.nextSibling);\n } else {\n this.parentNode.appendChild(fragment);\n }\n }\n break;\n\n default:\n throw new DOMException(`Invalid position: ${position}`, 'SyntaxError');\n }\n }\n\n insertAdjacentText(where: InsertPosition, data: string): void {\n const position = where.toLowerCase();\n\n // Create text node\n const textNode = this._ownerDocument.createTextNode(data);\n\n switch (position) {\n case 'beforebegin':\n if (this.parentNode) {\n this.parentNode.insertBefore(textNode, this as any);\n }\n break;\n\n case 'afterbegin':\n if (this.firstChild) {\n this.insertBefore(textNode, this.firstChild);\n } else {\n this.appendChild(textNode);\n }\n break;\n\n case 'beforeend':\n this.appendChild(textNode);\n break;\n\n case 'afterend':\n if (this.parentNode) {\n if (this.nextSibling) {\n this.parentNode.insertBefore(textNode, this.nextSibling);\n } else {\n this.parentNode.appendChild(textNode);\n }\n }\n break;\n\n default:\n throw new DOMException(`Invalid position: ${where}`, 'SyntaxError');\n }\n }\n\n releasePointerCapture(pointerId: number): void {\n // throw new Error('Element.releasePointerCapture() is not implemented yet');\n }\n\n removeAttributeNS(namespace: string | null, localName: string): void {\n // For simplicity, we'll ignore namespace and use localName\n this.removeAttribute(localName);\n }\n\n removeAttributeNode(attr: Attr): Attr {\n const oldValue = this.getAttribute(attr.name);\n if (oldValue !== null) {\n this.removeAttribute(attr.name);\n return new AttrImpl(attr.name, oldValue);\n }\n throw new DOMException('The attribute node is not an attribute of this element', 'NotFoundError');\n }\n\n requestFullscreen(options?: any): Promise<void> {\n throw new Error('Element.requestFullscreen() is not implemented yet');\n }\n\n requestPointerLock(options?: any): Promise<void> {\n throw new Error('Element.requestPointerLock() is not implemented yet');\n }\n\n scroll(options?: any): void;\n scroll(x: number, y: number): void;\n scroll(optionsOrX?: any, y?: number): void {\n // throw new Error('Element.scroll() is not implemented yet');\n }\n\n scrollBy(options?: any): void;\n scrollBy(x: number, y: number): void;\n scrollBy(optionsOrX?: any, y?: number): void {\n // throw new Error('Element.scrollBy() is not implemented yet');\n }\n\n scrollIntoView(arg?: boolean | any): void {\n // throw new Error('Element.scrollIntoView() is not implemented yet');\n }\n\n scrollTo(options?: any): void;\n scrollTo(x: number, y: number): void;\n scrollTo(optionsOrX?: any, y?: number): void {\n // throw new Error('Element.scrollTo() is not implemented yet');\n }\n\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n // For simplicity, we'll ignore namespace and use qualifiedName\n this.setAttribute(qualifiedName, value);\n }\n\n setAttributeNode(attr: Attr): Attr | null {\n const oldAttr = this.getAttributeNode(attr.name);\n this.setAttribute(attr.name, attr.value);\n return oldAttr;\n }\n\n setAttributeNodeNS(attr: Attr): Attr | null {\n // For simplicity, we'll ignore namespace\n return this.setAttributeNode(attr);\n }\n\n setHTMLUnsafe(html: string): void {\n // throw new Error('Element.setHTMLUnsafe() is not implemented yet');\n }\n\n setPointerCapture(pointerId: number): void {\n // throw new Error('Element.setPointerCapture() is not implemented yet');\n }\n\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n const hasAttr = this.hasAttribute(qualifiedName);\n\n if (force === true || (force === undefined && !hasAttr)) {\n this.setAttribute(qualifiedName, '');\n return true;\n } else if (force === false || (force === undefined && hasAttr)) {\n this.removeAttribute(qualifiedName);\n return false;\n }\n\n return hasAttr;\n }\n\n webkitMatchesSelector(selectors: string): boolean {\n // throw new Error('Element.webkitMatchesSelector() is not implemented yet');\n return false;\n }\n\n // EventTarget methods - Not implemented yet\n addEventListener(type: string, listener: any, options?: any): void {\n // throw new Error('Element.addEventListener() is not implemented yet');\n }\n\n removeEventListener(type: string, listener: any, options?: any): void {\n // throw new Error('Element.removeEventListener() is not implemented yet');\n }\n\n dispatchEvent(event: any): boolean {\n // throw new Error('Element.dispatchEvent() is not implemented yet');\n return true;\n }\n\n cloneNode(deep?: boolean): ElementBase {\n // Use ElementFactory to create the correct element type\n const clone = ElementFactory.createElement(this.tagName, this._ownerDocument);\n\n // Copy attributes\n for (const [name, value] of this._attributes) {\n clone.setAttribute(name, value);\n }\n\n // Copy children if deep clone\n if (deep) {\n for (const child of this._childNodesInternal) {\n if (child && 'cloneNode' in child) {\n clone.appendChild((child as any).cloneNode(true));\n }\n }\n }\n\n return clone;\n }\n}\n\n// DOMTokenList implementation\nclass DOMTokenListImpl implements DOMTokenList {\n constructor(private element: ElementBase) { }\n\n get length(): number {\n return this.element.className.split(/\\s+/).filter(c => c.length > 0).length;\n }\n\n get value(): string {\n return this.element.className;\n }\n\n set value(value: string) {\n this.element.className = value;\n }\n\n add(...tokens: string[]): void {\n const classes = new Set(this.element.className.split(/\\s+/).filter(c => c.length > 0));\n for (const token of tokens) {\n classes.add(token);\n }\n this.element.className = Array.from(classes).join(' ');\n }\n\n remove(...tokens: string[]): void {\n const classes = new Set(this.element.className.split(/\\s+/).filter(c => c.length > 0));\n for (const token of tokens) {\n classes.delete(token);\n }\n this.element.className = Array.from(classes).join(' ');\n }\n\n contains(token: string): boolean {\n return this.element.className.split(/\\s+/).includes(token);\n }\n\n toggle(token: string, force?: boolean): boolean {\n const hasToken = this.contains(token);\n\n if (force === true || (force === undefined && !hasToken)) {\n this.add(token);\n return true;\n } else {\n this.remove(token);\n return false;\n }\n }\n\n replace(oldToken: string, newToken: string): boolean {\n if (this.contains(oldToken)) {\n this.remove(oldToken);\n this.add(newToken);\n return true;\n }\n return false;\n }\n\n item(index: number): string | null {\n const classes = this.element.className.split(/\\s+/).filter(c => c.length > 0);\n return index >= 0 && index < classes.length ? classes[index] : null;\n }\n\n [index: number]: string;\n}\n\n\n\n// Attr implementation\nclass AttrImpl extends NodeBase implements Attr {\n public ownerElement: Element | null = null;\n public namespaceURI: string | null = null;\n public prefix: string | null = null;\n public specified: boolean = true;\n\n constructor(public name: string, public value: string) {\n super(ATTRIBUTE_NODE, name);\n }\n\n get localName(): string {\n return this.name;\n }\n}\n\n// NamedNodeMap implementation\nclass NamedNodeMapImpl implements NamedNodeMap {\n constructor(private attributes: Map<string, string>) { }\n\n get length(): number {\n return this.attributes.size;\n }\n\n getNamedItem(qualifiedName: string): Attr | null {\n const value = this.attributes.get(qualifiedName.toLowerCase());\n return value !== undefined ? new AttrImpl(qualifiedName, value) : null;\n }\n\n getNamedItemNS(namespace: string | null, localName: string): Attr | null {\n // For simplicity, ignore namespace\n return this.getNamedItem(localName);\n }\n\n item(index: number): Attr | null {\n const keys = Array.from(this.attributes.keys());\n if (index >= 0 && index < keys.length) {\n const key = keys[index];\n const value = this.attributes.get(key)!;\n return new AttrImpl(key, value);\n }\n return null;\n }\n\n removeNamedItem(qualifiedName: string): Attr {\n const value = this.attributes.get(qualifiedName.toLowerCase());\n if (value !== undefined) {\n this.attributes.delete(qualifiedName.toLowerCase());\n return new AttrImpl(qualifiedName, value);\n }\n throw new DOMException('The attribute is not found', 'NotFoundError');\n }\n\n removeNamedItemNS(namespace: string | null, localName: string): Attr {\n // For simplicity, ignore namespace\n return this.removeNamedItem(localName);\n }\n\n setNamedItem(attr: Attr): Attr | null {\n const oldValue = this.attributes.get(attr.name.toLowerCase());\n this.attributes.set(attr.name.toLowerCase(), attr.value);\n return oldValue !== undefined ? new AttrImpl(attr.name, oldValue) : null;\n }\n\n setNamedItemNS(attr: Attr): Attr | null {\n // For simplicity, ignore namespace\n return this.setNamedItem(attr);\n }\n\n // Iterator implementation\n *[Symbol.iterator](): IterableIterator<Attr> {\n const keys = Array.from(this.attributes.keys());\n for (const key of keys) {\n const value = this.attributes.get(key)!;\n yield new AttrImpl(key, value);\n }\n }\n\n // Additional iterator methods for compatibility\n keys(): IterableIterator<string> {\n return this.attributes.keys();\n }\n\n values(): IterableIterator<Attr> {\n const self = this;\n return (function* () {\n for (const [key, value] of self.attributes) {\n yield new AttrImpl(key, value);\n }\n })();\n }\n\n entries(): IterableIterator<[string, Attr]> {\n const self = this;\n return (function* () {\n for (const [key, value] of self.attributes) {\n yield [key, new AttrImpl(key, value)] as [string, Attr];\n }\n })();\n }\n\n // forEach method for compatibility\n forEach(callback: (attr: Attr, index: number, map: NamedNodeMap) => void, thisArg?: any): void {\n const keys = Array.from(this.attributes.keys());\n keys.forEach((key, index) => {\n const value = this.attributes.get(key)!;\n const attr = new AttrImpl(key, value);\n callback.call(thisArg, attr, index, this);\n });\n }\n\n [index: number]: Attr;\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA+B;AAE/B,wBAA+B;AAE/B,4BAA+B;AAE/B,kBAAwD;AACxD,yBAA4B;AAE5B,sBAAyB;AAMzB,MAAM,qBAAqB,MAAM;AAAA,EAC7B,YAAY,SAAwB,OAAe,gBAAgB;AAC/D,UAAM,OAAO;AADmB;AAEhC,SAAK,OAAO;AAAA,EAChB;AACJ;AAIO,MAAe,oBAAoB,qCAAkC;AAAA,EAKxE,YACW,UACP,eACF;AACE,UAAM,0BAAc,SAAS,YAAY,GAAG,aAAa;AAHlD;AALX,SAAQ,MAAc;AACtB,SAAQ,aAAqB;AAC7B,SAAQ,cAAmC,oBAAI,IAAI;AA2lBnD,8BAAiE;AACjE,6BAAgE;AAAA,EArlBhE;AAAA,EAEA,IAAI,UAAkB;AAClB,WAAO,KAAK,SAAS,YAAY;AAAA,EACrC;AAAA,EAEA,IAAI,YAAoB;AACpB,WAAO,KAAK,SAAS,YAAY;AAAA,EACrC;AAAA;AAAA,EAGA,IAAI,KAAa;AACb,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,GAAG,OAAe;AAClB,SAAK,MAAM;AACX,SAAK,YAAY,IAAI,MAAM,KAAK;AAAA,EACpC;AAAA,EAEA,IAAI,YAAoB;AACpB,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,UAAU,OAAe;AACzB,SAAK,aAAa;AAClB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,IAAI;AAAA,IAC5C,CAAC;AAAA,EACL;AAGJ;",
6
6
  "names": ["ElementFactory", "parts", "tagName", "attributeString", "closingTag", "closingTagIndex"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/node/elements/HTMLElement.ts"],
4
- "sourcesContent": ["import { Element } from './Element';\n\n/**\n * The **`HTMLElement`** interface represents any HTML element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement)\n */\nexport interface HTMLElement extends Element {\n /**\n * Returns the value of element's title content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/title)\n */\n title: string;\n\n /**\n * Returns the value of element's lang content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang)\n */\n lang: string;\n\n /**\n * Returns the value of element's dir content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir)\n */\n dir: string;\n\n /**\n * Returns the value of element's hidden content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidden)\n */\n hidden: boolean;\n\n /**\n * Returns the value of element's tabindex content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex)\n */\n tabIndex: number;\n\n /**\n * Returns the value of element's accesskey content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey)\n */\n accessKey: string;\n\n /**\n * Returns the value of element's contenteditable content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable)\n */\n contentEditable: string;\n\n /**\n * Returns whether the element is editable.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable)\n */\n readonly isContentEditable: boolean;\n\n /**\n * Returns the element's inner text content.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText)\n */\n innerText: string;\n\n /**\n * Returns the element's outer text content.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText)\n */\n outerText: string;\n\n /**\n * Simulates a mouse click on an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click)\n */\n click(): void;\n\n /**\n * Makes the element take focus.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/focus)\n */\n focus(options?: FocusOptions): void;\n\n /**\n * Makes the element lose focus.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/blur)\n */\n blur(): void;\n}\n\n\n// \uAE30\uBCF8 \uD0C0\uC785\uB4E4\nexport interface FocusOptions {\n preventScroll?: boolean;\n}"],
4
+ "sourcesContent": ["import { Element } from './Element';\n\n/**\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ElementCSSInlineStyle)\n */\nexport interface ElementCSSInlineStyle {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) */\n readonly attributeStyleMap: StylePropertyMap;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) */\n style: CSSStyleDeclaration | string;\n}\n\nexport interface StylePropertyMap {\n append(property: string, ...values: (string | any)[]): void;\n clear(): void;\n delete(property: string): void;\n set(property: string, ...values: (string | any)[]): void;\n [key: string]: any;\n}\n\n/**\n * The **`HTMLElement`** interface represents any HTML element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement)\n */\nexport interface HTMLElement extends Element, ElementCSSInlineStyle {\n /**\n * Returns the value of element's title content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/title)\n */\n title: string;\n\n /**\n * Returns the value of element's lang content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lang)\n */\n lang: string;\n\n /**\n * Returns the value of element's dir content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dir)\n */\n dir: string;\n\n /**\n * Returns the value of element's hidden content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidden)\n */\n hidden: boolean;\n\n /**\n * Returns the value of element's tabindex content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex)\n */\n tabIndex: number;\n\n /**\n * Returns the value of element's accesskey content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/accessKey)\n */\n accessKey: string;\n\n /**\n * Returns the value of element's contenteditable content attribute. Can be set to change it.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable)\n */\n contentEditable: string;\n\n /**\n * Returns whether the element is editable.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/isContentEditable)\n */\n readonly isContentEditable: boolean;\n\n /**\n * Returns the element's inner text content.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText)\n */\n innerText: string;\n\n /**\n * Returns the element's outer text content.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText)\n */\n outerText: string;\n\n /**\n * Simulates a mouse click on an element.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click)\n */\n click(): void;\n\n /**\n * Makes the element take focus.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/focus)\n */\n focus(options?: FocusOptions): void;\n\n /**\n * Makes the element lose focus.\n * \n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/blur)\n */\n blur(): void;\n}\n\n\n// \uAE30\uBCF8 \uD0C0\uC785\uB4E4\nexport interface FocusOptions {\n preventScroll?: boolean;\n}\n\nexport interface CSSStyleDeclaration {\n cssText: string;\n length: number;\n parentRule: any;\n getPropertyPriority(property: string): string;\n getPropertyValue(property: string): string;\n item(index: number): string;\n removeProperty(property: string): string;\n setProperty(property: string, value: string | null, priority?: string): void;\n [index: number]: string;\n [key: string]: any;\n}\n\nexport interface DOMStringMap {\n [key: string]: string | undefined;\n}"],
5
5
  "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }