@depup/jsdom 28.1.0-depup.1
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.
- package/LICENSE.txt +22 -0
- package/README.md +38 -0
- package/changes.json +38 -0
- package/lib/api.js +373 -0
- package/lib/generated/event-sets.js +115 -0
- package/lib/generated/idl/AbortController.js +143 -0
- package/lib/generated/idl/AbortSignal.js +249 -0
- package/lib/generated/idl/AbstractRange.js +171 -0
- package/lib/generated/idl/AddEventListenerOptions.js +53 -0
- package/lib/generated/idl/AssignedNodesOptions.js +28 -0
- package/lib/generated/idl/Attr.js +219 -0
- package/lib/generated/idl/BarProp.js +117 -0
- package/lib/generated/idl/BeforeUnloadEvent.js +139 -0
- package/lib/generated/idl/BinaryType.js +12 -0
- package/lib/generated/idl/Blob.js +253 -0
- package/lib/generated/idl/BlobCallback.js +30 -0
- package/lib/generated/idl/BlobEvent.js +157 -0
- package/lib/generated/idl/BlobEventInit.js +43 -0
- package/lib/generated/idl/BlobPropertyBag.js +42 -0
- package/lib/generated/idl/CDATASection.js +109 -0
- package/lib/generated/idl/CanPlayTypeResult.js +12 -0
- package/lib/generated/idl/CharacterData.js +455 -0
- package/lib/generated/idl/CloseEvent.js +168 -0
- package/lib/generated/idl/CloseEventInit.js +65 -0
- package/lib/generated/idl/Comment.js +120 -0
- package/lib/generated/idl/CompositionEvent.js +219 -0
- package/lib/generated/idl/CompositionEventInit.js +32 -0
- package/lib/generated/idl/Crypto.js +148 -0
- package/lib/generated/idl/CustomElementConstructor.js +34 -0
- package/lib/generated/idl/CustomElementRegistry.js +269 -0
- package/lib/generated/idl/CustomEvent.js +206 -0
- package/lib/generated/idl/CustomEventInit.js +32 -0
- package/lib/generated/idl/DOMException.js +222 -0
- package/lib/generated/idl/DOMImplementation.js +237 -0
- package/lib/generated/idl/DOMParser.js +140 -0
- package/lib/generated/idl/DOMRect.js +276 -0
- package/lib/generated/idl/DOMRectInit.js +76 -0
- package/lib/generated/idl/DOMRectReadOnly.js +285 -0
- package/lib/generated/idl/DOMStringMap.js +299 -0
- package/lib/generated/idl/DOMTokenList.js +539 -0
- package/lib/generated/idl/DeviceMotionEvent.js +183 -0
- package/lib/generated/idl/DeviceMotionEventAcceleration.js +145 -0
- package/lib/generated/idl/DeviceMotionEventAccelerationInit.js +61 -0
- package/lib/generated/idl/DeviceMotionEventInit.js +70 -0
- package/lib/generated/idl/DeviceMotionEventRotationRate.js +145 -0
- package/lib/generated/idl/DeviceMotionEventRotationRateInit.js +61 -0
- package/lib/generated/idl/DeviceOrientationEvent.js +183 -0
- package/lib/generated/idl/DeviceOrientationEventInit.js +80 -0
- package/lib/generated/idl/Document.js +4511 -0
- package/lib/generated/idl/DocumentFragment.js +336 -0
- package/lib/generated/idl/DocumentReadyState.js +12 -0
- package/lib/generated/idl/DocumentType.js +254 -0
- package/lib/generated/idl/Element.js +3720 -0
- package/lib/generated/idl/ElementCreationOptions.js +26 -0
- package/lib/generated/idl/ElementDefinitionOptions.js +29 -0
- package/lib/generated/idl/ElementInternals.js +2152 -0
- package/lib/generated/idl/EndingType.js +12 -0
- package/lib/generated/idl/ErrorEvent.js +192 -0
- package/lib/generated/idl/ErrorEventInit.js +92 -0
- package/lib/generated/idl/Event.js +430 -0
- package/lib/generated/idl/EventHandlerNonNull.js +36 -0
- package/lib/generated/idl/EventInit.js +58 -0
- package/lib/generated/idl/EventListener.js +35 -0
- package/lib/generated/idl/EventListenerOptions.js +28 -0
- package/lib/generated/idl/EventModifierInit.js +221 -0
- package/lib/generated/idl/EventTarget.js +259 -0
- package/lib/generated/idl/External.js +130 -0
- package/lib/generated/idl/File.js +185 -0
- package/lib/generated/idl/FileList.js +298 -0
- package/lib/generated/idl/FilePropertyBag.js +33 -0
- package/lib/generated/idl/FileReader.js +468 -0
- package/lib/generated/idl/FocusEvent.js +144 -0
- package/lib/generated/idl/FocusEventInit.js +36 -0
- package/lib/generated/idl/FormData.js +468 -0
- package/lib/generated/idl/Function.js +42 -0
- package/lib/generated/idl/GetRootNodeOptions.js +31 -0
- package/lib/generated/idl/HTMLAnchorElement.js +1026 -0
- package/lib/generated/idl/HTMLAreaElement.js +825 -0
- package/lib/generated/idl/HTMLAudioElement.js +111 -0
- package/lib/generated/idl/HTMLBRElement.js +156 -0
- package/lib/generated/idl/HTMLBaseElement.js +196 -0
- package/lib/generated/idl/HTMLBodyElement.js +880 -0
- package/lib/generated/idl/HTMLButtonElement.js +525 -0
- package/lib/generated/idl/HTMLCanvasElement.js +307 -0
- package/lib/generated/idl/HTMLCollection.js +352 -0
- package/lib/generated/idl/HTMLDListElement.js +159 -0
- package/lib/generated/idl/HTMLDataElement.js +156 -0
- package/lib/generated/idl/HTMLDataListElement.js +126 -0
- package/lib/generated/idl/HTMLDetailsElement.js +159 -0
- package/lib/generated/idl/HTMLDialogElement.js +159 -0
- package/lib/generated/idl/HTMLDirectoryElement.js +159 -0
- package/lib/generated/idl/HTMLDivElement.js +156 -0
- package/lib/generated/idl/HTMLElement.js +3492 -0
- package/lib/generated/idl/HTMLEmbedElement.js +381 -0
- package/lib/generated/idl/HTMLFieldSetElement.js +332 -0
- package/lib/generated/idl/HTMLFontElement.js +239 -0
- package/lib/generated/idl/HTMLFormControlsCollection.js +318 -0
- package/lib/generated/idl/HTMLFormElement.js +661 -0
- package/lib/generated/idl/HTMLFrameElement.js +513 -0
- package/lib/generated/idl/HTMLFrameSetElement.js +711 -0
- package/lib/generated/idl/HTMLHRElement.js +323 -0
- package/lib/generated/idl/HTMLHeadElement.js +111 -0
- package/lib/generated/idl/HTMLHeadingElement.js +156 -0
- package/lib/generated/idl/HTMLHtmlElement.js +156 -0
- package/lib/generated/idl/HTMLIFrameElement.js +689 -0
- package/lib/generated/idl/HTMLImageElement.js +906 -0
- package/lib/generated/idl/HTMLInputElement.js +1931 -0
- package/lib/generated/idl/HTMLLIElement.js +204 -0
- package/lib/generated/idl/HTMLLabelElement.js +182 -0
- package/lib/generated/idl/HTMLLegendElement.js +169 -0
- package/lib/generated/idl/HTMLLinkElement.js +555 -0
- package/lib/generated/idl/HTMLMapElement.js +171 -0
- package/lib/generated/idl/HTMLMarqueeElement.js +558 -0
- package/lib/generated/idl/HTMLMediaElement.js +900 -0
- package/lib/generated/idl/HTMLMenuElement.js +159 -0
- package/lib/generated/idl/HTMLMetaElement.js +279 -0
- package/lib/generated/idl/HTMLMeterElement.js +368 -0
- package/lib/generated/idl/HTMLModElement.js +217 -0
- package/lib/generated/idl/HTMLOListElement.js +284 -0
- package/lib/generated/idl/HTMLObjectElement.js +945 -0
- package/lib/generated/idl/HTMLOptGroupElement.js +200 -0
- package/lib/generated/idl/HTMLOptionElement.js +379 -0
- package/lib/generated/idl/HTMLOptionsCollection.js +513 -0
- package/lib/generated/idl/HTMLOutputElement.js +395 -0
- package/lib/generated/idl/HTMLParagraphElement.js +156 -0
- package/lib/generated/idl/HTMLParamElement.js +279 -0
- package/lib/generated/idl/HTMLPictureElement.js +111 -0
- package/lib/generated/idl/HTMLPreElement.js +163 -0
- package/lib/generated/idl/HTMLProgressElement.js +232 -0
- package/lib/generated/idl/HTMLQuoteElement.js +176 -0
- package/lib/generated/idl/HTMLScriptElement.js +472 -0
- package/lib/generated/idl/HTMLSelectElement.js +993 -0
- package/lib/generated/idl/HTMLSlotElement.js +195 -0
- package/lib/generated/idl/HTMLSourceElement.js +340 -0
- package/lib/generated/idl/HTMLSpanElement.js +111 -0
- package/lib/generated/idl/HTMLStyleElement.js +210 -0
- package/lib/generated/idl/HTMLTableCaptionElement.js +156 -0
- package/lib/generated/idl/HTMLTableCellElement.js +733 -0
- package/lib/generated/idl/HTMLTableColElement.js +376 -0
- package/lib/generated/idl/HTMLTableElement.js +802 -0
- package/lib/generated/idl/HTMLTableRowElement.js +417 -0
- package/lib/generated/idl/HTMLTableSectionElement.js +349 -0
- package/lib/generated/idl/HTMLTemplateElement.js +124 -0
- package/lib/generated/idl/HTMLTextAreaElement.js +1210 -0
- package/lib/generated/idl/HTMLTimeElement.js +156 -0
- package/lib/generated/idl/HTMLTitleElement.js +155 -0
- package/lib/generated/idl/HTMLTrackElement.js +366 -0
- package/lib/generated/idl/HTMLUListElement.js +200 -0
- package/lib/generated/idl/HTMLUnknownElement.js +109 -0
- package/lib/generated/idl/HTMLVideoElement.js +344 -0
- package/lib/generated/idl/HashChangeEvent.js +157 -0
- package/lib/generated/idl/HashChangeEventInit.js +50 -0
- package/lib/generated/idl/Headers.js +418 -0
- package/lib/generated/idl/History.js +266 -0
- package/lib/generated/idl/InputEvent.js +168 -0
- package/lib/generated/idl/InputEventInit.js +68 -0
- package/lib/generated/idl/KeyboardEvent.js +445 -0
- package/lib/generated/idl/KeyboardEventInit.js +116 -0
- package/lib/generated/idl/Location.js +404 -0
- package/lib/generated/idl/MessageEvent.js +317 -0
- package/lib/generated/idl/MessageEventInit.js +100 -0
- package/lib/generated/idl/MimeType.js +156 -0
- package/lib/generated/idl/MimeTypeArray.js +326 -0
- package/lib/generated/idl/MouseEvent.js +595 -0
- package/lib/generated/idl/MouseEventInit.js +189 -0
- package/lib/generated/idl/MutationCallback.js +34 -0
- package/lib/generated/idl/MutationObserver.js +178 -0
- package/lib/generated/idl/MutationObserverInit.js +121 -0
- package/lib/generated/idl/MutationRecord.js +229 -0
- package/lib/generated/idl/NamedNodeMap.js +529 -0
- package/lib/generated/idl/Navigator.js +326 -0
- package/lib/generated/idl/Node.js +765 -0
- package/lib/generated/idl/NodeFilter.js +75 -0
- package/lib/generated/idl/NodeIterator.js +207 -0
- package/lib/generated/idl/NodeList.js +302 -0
- package/lib/generated/idl/OnBeforeUnloadEventHandlerNonNull.js +42 -0
- package/lib/generated/idl/OnErrorEventHandlerNonNull.js +56 -0
- package/lib/generated/idl/PageTransitionEvent.js +144 -0
- package/lib/generated/idl/PageTransitionEventInit.js +35 -0
- package/lib/generated/idl/Performance.js +142 -0
- package/lib/generated/idl/Plugin.js +359 -0
- package/lib/generated/idl/PluginArray.js +336 -0
- package/lib/generated/idl/PointerEvent.js +324 -0
- package/lib/generated/idl/PointerEventInit.js +241 -0
- package/lib/generated/idl/PopStateEvent.js +144 -0
- package/lib/generated/idl/PopStateEventInit.js +32 -0
- package/lib/generated/idl/ProcessingInstruction.js +122 -0
- package/lib/generated/idl/ProgressEvent.js +170 -0
- package/lib/generated/idl/ProgressEventInit.js +65 -0
- package/lib/generated/idl/PromiseRejectionEvent.js +157 -0
- package/lib/generated/idl/PromiseRejectionEventInit.js +42 -0
- package/lib/generated/idl/RadioNodeList.js +296 -0
- package/lib/generated/idl/Range.js +643 -0
- package/lib/generated/idl/SVGAnimatedPreserveAspectRatio.js +136 -0
- package/lib/generated/idl/SVGAnimatedRect.js +136 -0
- package/lib/generated/idl/SVGAnimatedString.js +149 -0
- package/lib/generated/idl/SVGBoundingBoxOptions.js +64 -0
- package/lib/generated/idl/SVGDefsElement.js +109 -0
- package/lib/generated/idl/SVGDescElement.js +109 -0
- package/lib/generated/idl/SVGElement.js +3157 -0
- package/lib/generated/idl/SVGGElement.js +109 -0
- package/lib/generated/idl/SVGGraphicsElement.js +139 -0
- package/lib/generated/idl/SVGMetadataElement.js +109 -0
- package/lib/generated/idl/SVGNumber.js +132 -0
- package/lib/generated/idl/SVGPreserveAspectRatio.js +196 -0
- package/lib/generated/idl/SVGRect.js +210 -0
- package/lib/generated/idl/SVGSVGElement.js +786 -0
- package/lib/generated/idl/SVGStringList.js +511 -0
- package/lib/generated/idl/SVGSwitchElement.js +109 -0
- package/lib/generated/idl/SVGSymbolElement.js +146 -0
- package/lib/generated/idl/SVGTitleElement.js +109 -0
- package/lib/generated/idl/Screen.js +180 -0
- package/lib/generated/idl/ScrollBehavior.js +12 -0
- package/lib/generated/idl/ScrollIntoViewOptions.js +45 -0
- package/lib/generated/idl/ScrollLogicalPosition.js +14 -0
- package/lib/generated/idl/ScrollOptions.js +30 -0
- package/lib/generated/idl/ScrollRestoration.js +12 -0
- package/lib/generated/idl/Selection.js +571 -0
- package/lib/generated/idl/SelectionMode.js +12 -0
- package/lib/generated/idl/ShadowRoot.js +189 -0
- package/lib/generated/idl/ShadowRootInit.js +30 -0
- package/lib/generated/idl/ShadowRootMode.js +12 -0
- package/lib/generated/idl/StaticRange.js +123 -0
- package/lib/generated/idl/StaticRangeInit.js +72 -0
- package/lib/generated/idl/Storage.js +397 -0
- package/lib/generated/idl/StorageEvent.js +318 -0
- package/lib/generated/idl/StorageEventInit.js +99 -0
- package/lib/generated/idl/StyleSheetList.js +300 -0
- package/lib/generated/idl/SubmitEvent.js +144 -0
- package/lib/generated/idl/SubmitEventInit.js +36 -0
- package/lib/generated/idl/SupportedType.js +18 -0
- package/lib/generated/idl/Text.js +170 -0
- package/lib/generated/idl/TextDecodeOptions.js +28 -0
- package/lib/generated/idl/TextDecoder.js +211 -0
- package/lib/generated/idl/TextDecoderOptions.js +43 -0
- package/lib/generated/idl/TextEncoder.js +176 -0
- package/lib/generated/idl/TextEncoderEncodeIntoResult.js +42 -0
- package/lib/generated/idl/TextTrackKind.js +12 -0
- package/lib/generated/idl/TouchEvent.js +222 -0
- package/lib/generated/idl/TouchEventInit.js +89 -0
- package/lib/generated/idl/TransitionEvent.js +170 -0
- package/lib/generated/idl/TransitionEventInit.js +65 -0
- package/lib/generated/idl/TreeWalker.js +255 -0
- package/lib/generated/idl/UIEvent.js +235 -0
- package/lib/generated/idl/UIEventInit.js +62 -0
- package/lib/generated/idl/ValidityState.js +249 -0
- package/lib/generated/idl/VisibilityState.js +12 -0
- package/lib/generated/idl/VoidFunction.js +26 -0
- package/lib/generated/idl/WebSocket.js +480 -0
- package/lib/generated/idl/WheelEvent.js +191 -0
- package/lib/generated/idl/WheelEventInit.js +71 -0
- package/lib/generated/idl/XMLDocument.js +109 -0
- package/lib/generated/idl/XMLHttpRequest.js +663 -0
- package/lib/generated/idl/XMLHttpRequestEventTarget.js +334 -0
- package/lib/generated/idl/XMLHttpRequestResponseType.js +14 -0
- package/lib/generated/idl/XMLHttpRequestUpload.js +109 -0
- package/lib/generated/idl/XMLSerializer.js +132 -0
- package/lib/generated/idl/utils.js +252 -0
- package/lib/generated/js-globals.json +332 -0
- package/lib/jsdom/browser/Window.js +952 -0
- package/lib/jsdom/browser/default-stylesheet.css +415 -0
- package/lib/jsdom/browser/not-implemented.js +20 -0
- package/lib/jsdom/browser/parser/html.js +208 -0
- package/lib/jsdom/browser/parser/index.js +37 -0
- package/lib/jsdom/browser/parser/xml.js +202 -0
- package/lib/jsdom/browser/resources/async-resource-queue.js +114 -0
- package/lib/jsdom/browser/resources/decompress-interceptor.js +184 -0
- package/lib/jsdom/browser/resources/jsdom-dispatcher.js +756 -0
- package/lib/jsdom/browser/resources/per-document-resource-loader.js +116 -0
- package/lib/jsdom/browser/resources/request-interceptor.js +171 -0
- package/lib/jsdom/browser/resources/request-manager.js +33 -0
- package/lib/jsdom/browser/resources/resource-queue.js +142 -0
- package/lib/jsdom/browser/resources/stream-handler.js +89 -0
- package/lib/jsdom/level2/style.js +65 -0
- package/lib/jsdom/level3/xpath.js +1875 -0
- package/lib/jsdom/living/aborting/AbortController-impl.js +17 -0
- package/lib/jsdom/living/aborting/AbortSignal-impl.js +131 -0
- package/lib/jsdom/living/attributes/Attr-impl.js +60 -0
- package/lib/jsdom/living/attributes/NamedNodeMap-impl.js +78 -0
- package/lib/jsdom/living/attributes.js +312 -0
- package/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js +75 -0
- package/lib/jsdom/living/constraint-validation/ValidityState-impl.js +66 -0
- package/lib/jsdom/living/crypto/Crypto-impl.js +68 -0
- package/lib/jsdom/living/cssom/StyleSheetList-impl.js +38 -0
- package/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js +279 -0
- package/lib/jsdom/living/custom-elements/ElementInternals-impl.js +56 -0
- package/lib/jsdom/living/deviceorientation/DeviceMotionEventAcceleration-impl.js +7 -0
- package/lib/jsdom/living/deviceorientation/DeviceMotionEventRotationRate-impl.js +7 -0
- package/lib/jsdom/living/documents.js +15 -0
- package/lib/jsdom/living/domparsing/DOMParser-impl.js +59 -0
- package/lib/jsdom/living/domparsing/InnerHTML-impl.js +30 -0
- package/lib/jsdom/living/domparsing/XMLSerializer-impl.js +18 -0
- package/lib/jsdom/living/domparsing/parse5-adapter-serialization.js +63 -0
- package/lib/jsdom/living/domparsing/serialization.js +36 -0
- package/lib/jsdom/living/encoding/TextDecoder-impl.js +25 -0
- package/lib/jsdom/living/encoding/TextEncoder-impl.js +26 -0
- package/lib/jsdom/living/events/BeforeUnloadEvent-impl.js +12 -0
- package/lib/jsdom/living/events/BlobEvent-impl.js +14 -0
- package/lib/jsdom/living/events/CloseEvent-impl.js +10 -0
- package/lib/jsdom/living/events/CompositionEvent-impl.js +20 -0
- package/lib/jsdom/living/events/CustomEvent-impl.js +21 -0
- package/lib/jsdom/living/events/DeviceMotionEvent-impl.js +49 -0
- package/lib/jsdom/living/events/DeviceOrientationEvent-impl.js +10 -0
- package/lib/jsdom/living/events/ErrorEvent-impl.js +14 -0
- package/lib/jsdom/living/events/Event-impl.js +195 -0
- package/lib/jsdom/living/events/EventModifierMixin-impl.js +24 -0
- package/lib/jsdom/living/events/EventTarget-impl.js +438 -0
- package/lib/jsdom/living/events/FocusEvent-impl.js +9 -0
- package/lib/jsdom/living/events/HashChangeEvent-impl.js +14 -0
- package/lib/jsdom/living/events/InputEvent-impl.js +11 -0
- package/lib/jsdom/living/events/KeyboardEvent-impl.js +29 -0
- package/lib/jsdom/living/events/MessageEvent-impl.js +25 -0
- package/lib/jsdom/living/events/MouseEvent-impl.js +72 -0
- package/lib/jsdom/living/events/PageTransitionEvent-impl.js +20 -0
- package/lib/jsdom/living/events/PointerEvent-impl.js +21 -0
- package/lib/jsdom/living/events/PopStateEvent-impl.js +9 -0
- package/lib/jsdom/living/events/ProgressEvent-impl.js +14 -0
- package/lib/jsdom/living/events/PromiseRejectionEvent-impl.js +14 -0
- package/lib/jsdom/living/events/StorageEvent-impl.js +26 -0
- package/lib/jsdom/living/events/SubmitEvent-impl.js +13 -0
- package/lib/jsdom/living/events/TouchEvent-impl.js +14 -0
- package/lib/jsdom/living/events/TransitionEvent-impl.js +10 -0
- package/lib/jsdom/living/events/UIEvent-impl.js +43 -0
- package/lib/jsdom/living/events/WheelEvent-impl.js +12 -0
- package/lib/jsdom/living/fetch/Headers-impl.js +173 -0
- package/lib/jsdom/living/fetch/header-list.js +158 -0
- package/lib/jsdom/living/fetch/header-types.js +205 -0
- package/lib/jsdom/living/fetch/header-utils.js +26 -0
- package/lib/jsdom/living/file-api/Blob-impl.js +125 -0
- package/lib/jsdom/living/file-api/File-impl.js +12 -0
- package/lib/jsdom/living/file-api/FileList-impl.js +15 -0
- package/lib/jsdom/living/file-api/FileReader-impl.js +148 -0
- package/lib/jsdom/living/geometry/DOMRect-impl.js +39 -0
- package/lib/jsdom/living/geometry/DOMRectReadOnly-impl.js +72 -0
- package/lib/jsdom/living/helpers/binary-data.js +63 -0
- package/lib/jsdom/living/helpers/by-id-cache.js +67 -0
- package/lib/jsdom/living/helpers/colors.js +245 -0
- package/lib/jsdom/living/helpers/create-element.js +329 -0
- package/lib/jsdom/living/helpers/create-event-accessor.js +209 -0
- package/lib/jsdom/living/helpers/custom-elements.js +272 -0
- package/lib/jsdom/living/helpers/dates-and-times.js +270 -0
- package/lib/jsdom/living/helpers/details.js +15 -0
- package/lib/jsdom/living/helpers/encoding.js +60 -0
- package/lib/jsdom/living/helpers/events.js +24 -0
- package/lib/jsdom/living/helpers/focusing.js +104 -0
- package/lib/jsdom/living/helpers/form-controls.js +309 -0
- package/lib/jsdom/living/helpers/html-constructor.js +78 -0
- package/lib/jsdom/living/helpers/internal-constants.js +12 -0
- package/lib/jsdom/living/helpers/is-window.js +18 -0
- package/lib/jsdom/living/helpers/iterable-weak-set.js +48 -0
- package/lib/jsdom/living/helpers/json.js +7 -0
- package/lib/jsdom/living/helpers/mutation-observers.js +198 -0
- package/lib/jsdom/living/helpers/namespaces.js +16 -0
- package/lib/jsdom/living/helpers/node.js +108 -0
- package/lib/jsdom/living/helpers/number-and-date-inputs.js +195 -0
- package/lib/jsdom/living/helpers/ordered-set.js +104 -0
- package/lib/jsdom/living/helpers/page-transition-event.js +9 -0
- package/lib/jsdom/living/helpers/runtime-script-errors.js +75 -0
- package/lib/jsdom/living/helpers/shadow-dom.js +285 -0
- package/lib/jsdom/living/helpers/strings.js +168 -0
- package/lib/jsdom/living/helpers/style-rules.js +404 -0
- package/lib/jsdom/living/helpers/stylesheets.js +148 -0
- package/lib/jsdom/living/helpers/svg/basic-types.js +41 -0
- package/lib/jsdom/living/helpers/svg/render.js +46 -0
- package/lib/jsdom/living/helpers/system-colors.js +147 -0
- package/lib/jsdom/living/helpers/text.js +19 -0
- package/lib/jsdom/living/helpers/traversal.js +72 -0
- package/lib/jsdom/living/helpers/validate-names.js +65 -0
- package/lib/jsdom/living/hr-time/Performance-impl.js +22 -0
- package/lib/jsdom/living/interfaces.js +252 -0
- package/lib/jsdom/living/mutation-observer/MutationObserver-impl.js +95 -0
- package/lib/jsdom/living/mutation-observer/MutationRecord-impl.js +37 -0
- package/lib/jsdom/living/navigator/MimeType-impl.js +3 -0
- package/lib/jsdom/living/navigator/MimeTypeArray-impl.js +21 -0
- package/lib/jsdom/living/navigator/Navigator-impl.js +29 -0
- package/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js +8 -0
- package/lib/jsdom/living/navigator/NavigatorCookies-impl.js +7 -0
- package/lib/jsdom/living/navigator/NavigatorID-impl.js +37 -0
- package/lib/jsdom/living/navigator/NavigatorLanguage-impl.js +9 -0
- package/lib/jsdom/living/navigator/NavigatorOnLine-impl.js +7 -0
- package/lib/jsdom/living/navigator/NavigatorPlugins-impl.js +8 -0
- package/lib/jsdom/living/navigator/Plugin-impl.js +3 -0
- package/lib/jsdom/living/navigator/PluginArray-impl.js +23 -0
- package/lib/jsdom/living/node-document-position.js +10 -0
- package/lib/jsdom/living/node-type.js +16 -0
- package/lib/jsdom/living/node.js +331 -0
- package/lib/jsdom/living/nodes/CDATASection-impl.js +16 -0
- package/lib/jsdom/living/nodes/CharacterData-impl.js +118 -0
- package/lib/jsdom/living/nodes/ChildNode-impl.js +80 -0
- package/lib/jsdom/living/nodes/Comment-impl.js +20 -0
- package/lib/jsdom/living/nodes/DOMImplementation-impl.js +120 -0
- package/lib/jsdom/living/nodes/DOMStringMap-impl.js +64 -0
- package/lib/jsdom/living/nodes/DOMTokenList-impl.js +171 -0
- package/lib/jsdom/living/nodes/Document-impl.js +1000 -0
- package/lib/jsdom/living/nodes/DocumentFragment-impl.js +44 -0
- package/lib/jsdom/living/nodes/DocumentOrShadowRoot-impl.js +28 -0
- package/lib/jsdom/living/nodes/DocumentType-impl.js +24 -0
- package/lib/jsdom/living/nodes/Element-impl.js +584 -0
- package/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js +22 -0
- package/lib/jsdom/living/nodes/ElementContentEditable-impl.js +7 -0
- package/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js +81 -0
- package/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js +50 -0
- package/lib/jsdom/living/nodes/HTMLAreaElement-impl.js +43 -0
- package/lib/jsdom/living/nodes/HTMLAudioElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLBRElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLBaseElement-impl.js +44 -0
- package/lib/jsdom/living/nodes/HTMLBodyElement-impl.js +12 -0
- package/lib/jsdom/living/nodes/HTMLButtonElement-impl.js +79 -0
- package/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js +136 -0
- package/lib/jsdom/living/nodes/HTMLCollection-impl.js +96 -0
- package/lib/jsdom/living/nodes/HTMLDListElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLDataElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLDataListElement-impl.js +20 -0
- package/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js +35 -0
- package/lib/jsdom/living/nodes/HTMLDialogElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLDivElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLElement-impl.js +211 -0
- package/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js +8 -0
- package/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js +43 -0
- package/lib/jsdom/living/nodes/HTMLFontElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLFormControlsCollection-impl.js +33 -0
- package/lib/jsdom/living/nodes/HTMLFormElement-impl.js +248 -0
- package/lib/jsdom/living/nodes/HTMLFrameElement-impl.js +266 -0
- package/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js +12 -0
- package/lib/jsdom/living/nodes/HTMLHRElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLHeadElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js +368 -0
- package/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLImageElement-impl.js +127 -0
- package/lib/jsdom/living/nodes/HTMLInputElement-impl.js +1097 -0
- package/lib/jsdom/living/nodes/HTMLLIElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLLabelElement-impl.js +94 -0
- package/lib/jsdom/living/nodes/HTMLLegendElement-impl.js +18 -0
- package/lib/jsdom/living/nodes/HTMLLinkElement-impl.js +107 -0
- package/lib/jsdom/living/nodes/HTMLMapElement-impl.js +13 -0
- package/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLMediaElement-impl.js +138 -0
- package/lib/jsdom/living/nodes/HTMLMenuElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLMetaElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLMeterElement-impl.js +180 -0
- package/lib/jsdom/living/nodes/HTMLModElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLOListElement-impl.js +22 -0
- package/lib/jsdom/living/nodes/HTMLObjectElement-impl.js +26 -0
- package/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLOptionElement-impl.js +146 -0
- package/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js +110 -0
- package/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js +88 -0
- package/lib/jsdom/living/nodes/HTMLOutputElement-impl.js +88 -0
- package/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLParamElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLPictureElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLPreElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLProgressElement-impl.js +72 -0
- package/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLScriptElement-impl.js +255 -0
- package/lib/jsdom/living/nodes/HTMLSelectElement-impl.js +283 -0
- package/lib/jsdom/living/nodes/HTMLSlotElement-impl.js +59 -0
- package/lib/jsdom/living/nodes/HTMLSourceElement-impl.js +8 -0
- package/lib/jsdom/living/nodes/HTMLSpanElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLStyleElement-impl.js +76 -0
- package/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js +73 -0
- package/lib/jsdom/living/nodes/HTMLTableColElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLTableElement-impl.js +236 -0
- package/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js +88 -0
- package/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js +61 -0
- package/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js +67 -0
- package/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js +244 -0
- package/lib/jsdom/living/nodes/HTMLTimeElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLTitleElement-impl.js +18 -0
- package/lib/jsdom/living/nodes/HTMLTrackElement-impl.js +13 -0
- package/lib/jsdom/living/nodes/HTMLUListElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/HTMLVideoElement-impl.js +17 -0
- package/lib/jsdom/living/nodes/LinkStyle-impl.js +2 -0
- package/lib/jsdom/living/nodes/Node-impl.js +1179 -0
- package/lib/jsdom/living/nodes/NodeList-impl.js +43 -0
- package/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js +28 -0
- package/lib/jsdom/living/nodes/NonElementParentNode-impl.js +11 -0
- package/lib/jsdom/living/nodes/ParentNode-impl.js +90 -0
- package/lib/jsdom/living/nodes/ProcessingInstruction-impl.js +22 -0
- package/lib/jsdom/living/nodes/RadioNodeList-impl.js +49 -0
- package/lib/jsdom/living/nodes/SVGDefsElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/SVGDescElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/SVGElement-impl.js +64 -0
- package/lib/jsdom/living/nodes/SVGGElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js +16 -0
- package/lib/jsdom/living/nodes/SVGMetadataElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/SVGSVGElement-impl.js +40 -0
- package/lib/jsdom/living/nodes/SVGSwitchElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/SVGSymbolElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/SVGTests-impl.js +42 -0
- package/lib/jsdom/living/nodes/SVGTitleElement-impl.js +9 -0
- package/lib/jsdom/living/nodes/ShadowRoot-impl.js +41 -0
- package/lib/jsdom/living/nodes/Slotable-impl.js +48 -0
- package/lib/jsdom/living/nodes/Text-impl.js +96 -0
- package/lib/jsdom/living/nodes/WindowEventHandlers-impl.js +14 -0
- package/lib/jsdom/living/nodes/XMLDocument-impl.js +4 -0
- package/lib/jsdom/living/range/AbstractRange-impl.js +43 -0
- package/lib/jsdom/living/range/Range-impl.js +902 -0
- package/lib/jsdom/living/range/StaticRange-impl.js +39 -0
- package/lib/jsdom/living/range/boundary-point.js +47 -0
- package/lib/jsdom/living/selection/Selection-impl.js +358 -0
- package/lib/jsdom/living/svg/SVGAnimatedPreserveAspectRatio-impl.js +24 -0
- package/lib/jsdom/living/svg/SVGAnimatedRect-impl.js +122 -0
- package/lib/jsdom/living/svg/SVGAnimatedString-impl.js +42 -0
- package/lib/jsdom/living/svg/SVGListBase.js +195 -0
- package/lib/jsdom/living/svg/SVGNumber-impl.js +48 -0
- package/lib/jsdom/living/svg/SVGPreserveAspectRatio-impl.js +100 -0
- package/lib/jsdom/living/svg/SVGRect-impl.js +143 -0
- package/lib/jsdom/living/svg/SVGStringList-impl.js +16 -0
- package/lib/jsdom/living/traversal/NodeIterator-impl.js +107 -0
- package/lib/jsdom/living/traversal/TreeWalker-impl.js +217 -0
- package/lib/jsdom/living/traversal/helpers.js +44 -0
- package/lib/jsdom/living/webidl/DOMException-impl.js +46 -0
- package/lib/jsdom/living/websockets/WebSocket-impl.js +211 -0
- package/lib/jsdom/living/webstorage/Storage-impl.js +102 -0
- package/lib/jsdom/living/window/BarProp-impl.js +10 -0
- package/lib/jsdom/living/window/External-impl.js +9 -0
- package/lib/jsdom/living/window/History-impl.js +148 -0
- package/lib/jsdom/living/window/Location-impl.js +227 -0
- package/lib/jsdom/living/window/Screen-impl.js +13 -0
- package/lib/jsdom/living/window/SessionHistory.js +163 -0
- package/lib/jsdom/living/window/navigation.js +87 -0
- package/lib/jsdom/living/window-properties.js +241 -0
- package/lib/jsdom/living/xhr/FormData-impl.js +191 -0
- package/lib/jsdom/living/xhr/XMLHttpRequest-impl.js +1057 -0
- package/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js +17 -0
- package/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js +4 -0
- package/lib/jsdom/living/xhr/multipart-form-data.js +99 -0
- package/lib/jsdom/living/xhr/xhr-sync-worker.js +51 -0
- package/lib/jsdom/living/xhr/xhr-utils.js +206 -0
- package/lib/jsdom/utils.js +105 -0
- package/lib/jsdom/virtual-console.js +46 -0
- package/package.json +143 -0
|
@@ -0,0 +1,906 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const conversions = require("webidl-conversions");
|
|
4
|
+
const utils = require("./utils.js");
|
|
5
|
+
|
|
6
|
+
const HTMLConstructor_jsdom_living_helpers_html_constructor =
|
|
7
|
+
require("../../jsdom/living/helpers/html-constructor.js").HTMLConstructor;
|
|
8
|
+
const ceReactionsPreSteps_jsdom_living_helpers_custom_elements =
|
|
9
|
+
require("../../jsdom/living/helpers/custom-elements.js").ceReactionsPreSteps;
|
|
10
|
+
const ceReactionsPostSteps_jsdom_living_helpers_custom_elements =
|
|
11
|
+
require("../../jsdom/living/helpers/custom-elements.js").ceReactionsPostSteps;
|
|
12
|
+
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
|
|
13
|
+
const parseNonNegativeInteger_jsdom_living_helpers_strings =
|
|
14
|
+
require("../../jsdom/living/helpers/strings.js").parseNonNegativeInteger;
|
|
15
|
+
const implSymbol = utils.implSymbol;
|
|
16
|
+
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
|
|
17
|
+
const HTMLElement = require("./HTMLElement.js");
|
|
18
|
+
|
|
19
|
+
const interfaceName = "HTMLImageElement";
|
|
20
|
+
|
|
21
|
+
exports.is = value => {
|
|
22
|
+
return utils.isObject(value) && Object.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;
|
|
23
|
+
};
|
|
24
|
+
exports.isImpl = value => {
|
|
25
|
+
return utils.isObject(value) && value instanceof Impl.implementation;
|
|
26
|
+
};
|
|
27
|
+
exports.convert = (globalObject, value, { context = "The provided value" } = {}) => {
|
|
28
|
+
if (exports.is(value)) {
|
|
29
|
+
return utils.implForWrapper(value);
|
|
30
|
+
}
|
|
31
|
+
throw new globalObject.TypeError(`${context} is not of type 'HTMLImageElement'.`);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function makeWrapper(globalObject, newTarget) {
|
|
35
|
+
let proto;
|
|
36
|
+
if (newTarget !== undefined) {
|
|
37
|
+
proto = newTarget.prototype;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (!utils.isObject(proto)) {
|
|
41
|
+
proto = globalObject[ctorRegistrySymbol]["HTMLImageElement"].prototype;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return Object.create(proto);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
exports.create = (globalObject, constructorArgs, privateData) => {
|
|
48
|
+
const wrapper = makeWrapper(globalObject);
|
|
49
|
+
return exports.setup(wrapper, globalObject, constructorArgs, privateData);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.createImpl = (globalObject, constructorArgs, privateData) => {
|
|
53
|
+
const wrapper = exports.create(globalObject, constructorArgs, privateData);
|
|
54
|
+
return utils.implForWrapper(wrapper);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports._internalSetup = (wrapper, globalObject) => {
|
|
58
|
+
HTMLElement._internalSetup(wrapper, globalObject);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {
|
|
62
|
+
privateData.wrapper = wrapper;
|
|
63
|
+
|
|
64
|
+
exports._internalSetup(wrapper, globalObject);
|
|
65
|
+
Object.defineProperty(wrapper, implSymbol, {
|
|
66
|
+
value: new Impl.implementation(globalObject, constructorArgs, privateData),
|
|
67
|
+
configurable: true
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
|
|
71
|
+
if (Impl.init) {
|
|
72
|
+
Impl.init(wrapper[implSymbol]);
|
|
73
|
+
}
|
|
74
|
+
return wrapper;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.new = (globalObject, newTarget) => {
|
|
78
|
+
const wrapper = makeWrapper(globalObject, newTarget);
|
|
79
|
+
|
|
80
|
+
exports._internalSetup(wrapper, globalObject);
|
|
81
|
+
Object.defineProperty(wrapper, implSymbol, {
|
|
82
|
+
value: Object.create(Impl.implementation.prototype),
|
|
83
|
+
configurable: true
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
|
|
87
|
+
if (Impl.init) {
|
|
88
|
+
Impl.init(wrapper[implSymbol]);
|
|
89
|
+
}
|
|
90
|
+
return wrapper[implSymbol];
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const exposed = new Set(["Window"]);
|
|
94
|
+
|
|
95
|
+
exports.install = (globalObject, globalNames) => {
|
|
96
|
+
if (!globalNames.some(globalName => exposed.has(globalName))) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const ctorRegistry = utils.initCtorRegistry(globalObject);
|
|
101
|
+
class HTMLImageElement extends globalObject.HTMLElement {
|
|
102
|
+
constructor() {
|
|
103
|
+
return HTMLConstructor_jsdom_living_helpers_html_constructor(globalObject, interfaceName, new.target);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
get alt() {
|
|
107
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
108
|
+
|
|
109
|
+
if (!exports.is(esValue)) {
|
|
110
|
+
throw new globalObject.TypeError(
|
|
111
|
+
"'get alt' called on an object that is not a valid instance of HTMLImageElement."
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
116
|
+
try {
|
|
117
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("alt");
|
|
118
|
+
return value === null ? "" : value;
|
|
119
|
+
} finally {
|
|
120
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
set alt(V) {
|
|
125
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
126
|
+
|
|
127
|
+
if (!exports.is(esValue)) {
|
|
128
|
+
throw new globalObject.TypeError(
|
|
129
|
+
"'set alt' called on an object that is not a valid instance of HTMLImageElement."
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
V = conversions["DOMString"](V, {
|
|
134
|
+
context: "Failed to set the 'alt' property on 'HTMLImageElement': The provided value",
|
|
135
|
+
globals: globalObject
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
139
|
+
try {
|
|
140
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("alt", V);
|
|
141
|
+
} finally {
|
|
142
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
get src() {
|
|
147
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
148
|
+
|
|
149
|
+
if (!exports.is(esValue)) {
|
|
150
|
+
throw new globalObject.TypeError(
|
|
151
|
+
"'get src' called on an object that is not a valid instance of HTMLImageElement."
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
156
|
+
try {
|
|
157
|
+
const impl = esValue[implSymbol];
|
|
158
|
+
const value = impl._reflectGetTheContentAttribute("src");
|
|
159
|
+
if (value === null) {
|
|
160
|
+
return "";
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const document = impl._ownerDocument;
|
|
164
|
+
if (this._srcURLCacheKey === value && this._baseURLCache === document._baseURLCache) {
|
|
165
|
+
return this._srcURLCache;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
this._srcURLCacheKey = value;
|
|
169
|
+
this._baseURLCache = document._baseURLCache;
|
|
170
|
+
|
|
171
|
+
const urlRecord = document.encodingParseAURL(value);
|
|
172
|
+
if (urlRecord !== null) {
|
|
173
|
+
this._srcURLCache = serializeURLwhatwg_url(urlRecord);
|
|
174
|
+
return this._srcURLCache;
|
|
175
|
+
}
|
|
176
|
+
this._srcURLCache = conversions.USVString(value);
|
|
177
|
+
return this._srcURLCache;
|
|
178
|
+
} finally {
|
|
179
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
set src(V) {
|
|
184
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
185
|
+
|
|
186
|
+
if (!exports.is(esValue)) {
|
|
187
|
+
throw new globalObject.TypeError(
|
|
188
|
+
"'set src' called on an object that is not a valid instance of HTMLImageElement."
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
V = conversions["USVString"](V, {
|
|
193
|
+
context: "Failed to set the 'src' property on 'HTMLImageElement': The provided value",
|
|
194
|
+
globals: globalObject
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
198
|
+
try {
|
|
199
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("src", V);
|
|
200
|
+
} finally {
|
|
201
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
get srcset() {
|
|
206
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
207
|
+
|
|
208
|
+
if (!exports.is(esValue)) {
|
|
209
|
+
throw new globalObject.TypeError(
|
|
210
|
+
"'get srcset' called on an object that is not a valid instance of HTMLImageElement."
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
215
|
+
try {
|
|
216
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("srcset");
|
|
217
|
+
return value === null ? "" : conversions.USVString(value);
|
|
218
|
+
} finally {
|
|
219
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
set srcset(V) {
|
|
224
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
225
|
+
|
|
226
|
+
if (!exports.is(esValue)) {
|
|
227
|
+
throw new globalObject.TypeError(
|
|
228
|
+
"'set srcset' called on an object that is not a valid instance of HTMLImageElement."
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
V = conversions["USVString"](V, {
|
|
233
|
+
context: "Failed to set the 'srcset' property on 'HTMLImageElement': The provided value",
|
|
234
|
+
globals: globalObject
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
238
|
+
try {
|
|
239
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("srcset", V);
|
|
240
|
+
} finally {
|
|
241
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
get sizes() {
|
|
246
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
247
|
+
|
|
248
|
+
if (!exports.is(esValue)) {
|
|
249
|
+
throw new globalObject.TypeError(
|
|
250
|
+
"'get sizes' called on an object that is not a valid instance of HTMLImageElement."
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
255
|
+
try {
|
|
256
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("sizes");
|
|
257
|
+
return value === null ? "" : value;
|
|
258
|
+
} finally {
|
|
259
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
set sizes(V) {
|
|
264
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
265
|
+
|
|
266
|
+
if (!exports.is(esValue)) {
|
|
267
|
+
throw new globalObject.TypeError(
|
|
268
|
+
"'set sizes' called on an object that is not a valid instance of HTMLImageElement."
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
V = conversions["DOMString"](V, {
|
|
273
|
+
context: "Failed to set the 'sizes' property on 'HTMLImageElement': The provided value",
|
|
274
|
+
globals: globalObject
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
278
|
+
try {
|
|
279
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("sizes", V);
|
|
280
|
+
} finally {
|
|
281
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
get crossOrigin() {
|
|
286
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
287
|
+
|
|
288
|
+
if (!exports.is(esValue)) {
|
|
289
|
+
throw new globalObject.TypeError(
|
|
290
|
+
"'get crossOrigin' called on an object that is not a valid instance of HTMLImageElement."
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
295
|
+
try {
|
|
296
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("crossorigin");
|
|
297
|
+
} finally {
|
|
298
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
set crossOrigin(V) {
|
|
303
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
304
|
+
|
|
305
|
+
if (!exports.is(esValue)) {
|
|
306
|
+
throw new globalObject.TypeError(
|
|
307
|
+
"'set crossOrigin' called on an object that is not a valid instance of HTMLImageElement."
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (V === null || V === undefined) {
|
|
312
|
+
V = null;
|
|
313
|
+
} else {
|
|
314
|
+
V = conversions["DOMString"](V, {
|
|
315
|
+
context: "Failed to set the 'crossOrigin' property on 'HTMLImageElement': The provided value",
|
|
316
|
+
globals: globalObject
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
321
|
+
try {
|
|
322
|
+
if (V === null) {
|
|
323
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("crossorigin");
|
|
324
|
+
} else {
|
|
325
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("crossorigin", V);
|
|
326
|
+
}
|
|
327
|
+
} finally {
|
|
328
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
get useMap() {
|
|
333
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
334
|
+
|
|
335
|
+
if (!exports.is(esValue)) {
|
|
336
|
+
throw new globalObject.TypeError(
|
|
337
|
+
"'get useMap' called on an object that is not a valid instance of HTMLImageElement."
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
342
|
+
try {
|
|
343
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("usemap");
|
|
344
|
+
return value === null ? "" : value;
|
|
345
|
+
} finally {
|
|
346
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
set useMap(V) {
|
|
351
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
352
|
+
|
|
353
|
+
if (!exports.is(esValue)) {
|
|
354
|
+
throw new globalObject.TypeError(
|
|
355
|
+
"'set useMap' called on an object that is not a valid instance of HTMLImageElement."
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
V = conversions["DOMString"](V, {
|
|
360
|
+
context: "Failed to set the 'useMap' property on 'HTMLImageElement': The provided value",
|
|
361
|
+
globals: globalObject
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
365
|
+
try {
|
|
366
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("usemap", V);
|
|
367
|
+
} finally {
|
|
368
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
get isMap() {
|
|
373
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
374
|
+
|
|
375
|
+
if (!exports.is(esValue)) {
|
|
376
|
+
throw new globalObject.TypeError(
|
|
377
|
+
"'get isMap' called on an object that is not a valid instance of HTMLImageElement."
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
382
|
+
try {
|
|
383
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("ismap") !== null;
|
|
384
|
+
} finally {
|
|
385
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
set isMap(V) {
|
|
390
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
391
|
+
|
|
392
|
+
if (!exports.is(esValue)) {
|
|
393
|
+
throw new globalObject.TypeError(
|
|
394
|
+
"'set isMap' called on an object that is not a valid instance of HTMLImageElement."
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
V = conversions["boolean"](V, {
|
|
399
|
+
context: "Failed to set the 'isMap' property on 'HTMLImageElement': The provided value",
|
|
400
|
+
globals: globalObject
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
404
|
+
try {
|
|
405
|
+
if (V) {
|
|
406
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("ismap", "");
|
|
407
|
+
} else {
|
|
408
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("ismap");
|
|
409
|
+
}
|
|
410
|
+
} finally {
|
|
411
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
get width() {
|
|
416
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
417
|
+
|
|
418
|
+
if (!exports.is(esValue)) {
|
|
419
|
+
throw new globalObject.TypeError(
|
|
420
|
+
"'get width' called on an object that is not a valid instance of HTMLImageElement."
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
425
|
+
try {
|
|
426
|
+
return esValue[implSymbol]["width"];
|
|
427
|
+
} finally {
|
|
428
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
set width(V) {
|
|
433
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
434
|
+
|
|
435
|
+
if (!exports.is(esValue)) {
|
|
436
|
+
throw new globalObject.TypeError(
|
|
437
|
+
"'set width' called on an object that is not a valid instance of HTMLImageElement."
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
V = conversions["unsigned long"](V, {
|
|
442
|
+
context: "Failed to set the 'width' property on 'HTMLImageElement': The provided value",
|
|
443
|
+
globals: globalObject
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
447
|
+
try {
|
|
448
|
+
esValue[implSymbol]["width"] = V;
|
|
449
|
+
} finally {
|
|
450
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
get height() {
|
|
455
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
456
|
+
|
|
457
|
+
if (!exports.is(esValue)) {
|
|
458
|
+
throw new globalObject.TypeError(
|
|
459
|
+
"'get height' called on an object that is not a valid instance of HTMLImageElement."
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
464
|
+
try {
|
|
465
|
+
return esValue[implSymbol]["height"];
|
|
466
|
+
} finally {
|
|
467
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
set height(V) {
|
|
472
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
473
|
+
|
|
474
|
+
if (!exports.is(esValue)) {
|
|
475
|
+
throw new globalObject.TypeError(
|
|
476
|
+
"'set height' called on an object that is not a valid instance of HTMLImageElement."
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
V = conversions["unsigned long"](V, {
|
|
481
|
+
context: "Failed to set the 'height' property on 'HTMLImageElement': The provided value",
|
|
482
|
+
globals: globalObject
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
486
|
+
try {
|
|
487
|
+
esValue[implSymbol]["height"] = V;
|
|
488
|
+
} finally {
|
|
489
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
get naturalWidth() {
|
|
494
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
495
|
+
|
|
496
|
+
if (!exports.is(esValue)) {
|
|
497
|
+
throw new globalObject.TypeError(
|
|
498
|
+
"'get naturalWidth' called on an object that is not a valid instance of HTMLImageElement."
|
|
499
|
+
);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
return esValue[implSymbol]["naturalWidth"];
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
get naturalHeight() {
|
|
506
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
507
|
+
|
|
508
|
+
if (!exports.is(esValue)) {
|
|
509
|
+
throw new globalObject.TypeError(
|
|
510
|
+
"'get naturalHeight' called on an object that is not a valid instance of HTMLImageElement."
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
return esValue[implSymbol]["naturalHeight"];
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
get complete() {
|
|
518
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
519
|
+
|
|
520
|
+
if (!exports.is(esValue)) {
|
|
521
|
+
throw new globalObject.TypeError(
|
|
522
|
+
"'get complete' called on an object that is not a valid instance of HTMLImageElement."
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return esValue[implSymbol]["complete"];
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
get currentSrc() {
|
|
530
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
531
|
+
|
|
532
|
+
if (!exports.is(esValue)) {
|
|
533
|
+
throw new globalObject.TypeError(
|
|
534
|
+
"'get currentSrc' called on an object that is not a valid instance of HTMLImageElement."
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
return esValue[implSymbol]["currentSrc"];
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
get name() {
|
|
542
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
543
|
+
|
|
544
|
+
if (!exports.is(esValue)) {
|
|
545
|
+
throw new globalObject.TypeError(
|
|
546
|
+
"'get name' called on an object that is not a valid instance of HTMLImageElement."
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
551
|
+
try {
|
|
552
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("name");
|
|
553
|
+
return value === null ? "" : value;
|
|
554
|
+
} finally {
|
|
555
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
set name(V) {
|
|
560
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
561
|
+
|
|
562
|
+
if (!exports.is(esValue)) {
|
|
563
|
+
throw new globalObject.TypeError(
|
|
564
|
+
"'set name' called on an object that is not a valid instance of HTMLImageElement."
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
V = conversions["DOMString"](V, {
|
|
569
|
+
context: "Failed to set the 'name' property on 'HTMLImageElement': The provided value",
|
|
570
|
+
globals: globalObject
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
574
|
+
try {
|
|
575
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("name", V);
|
|
576
|
+
} finally {
|
|
577
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
get lowsrc() {
|
|
582
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
583
|
+
|
|
584
|
+
if (!exports.is(esValue)) {
|
|
585
|
+
throw new globalObject.TypeError(
|
|
586
|
+
"'get lowsrc' called on an object that is not a valid instance of HTMLImageElement."
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
591
|
+
try {
|
|
592
|
+
const impl = esValue[implSymbol];
|
|
593
|
+
const value = impl._reflectGetTheContentAttribute("lowsrc");
|
|
594
|
+
if (value === null) {
|
|
595
|
+
return "";
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const document = impl._ownerDocument;
|
|
599
|
+
if (this._lowsrcURLCacheKey === value && this._baseURLCache === document._baseURLCache) {
|
|
600
|
+
return this._lowsrcURLCache;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
this._lowsrcURLCacheKey = value;
|
|
604
|
+
this._baseURLCache = document._baseURLCache;
|
|
605
|
+
|
|
606
|
+
const urlRecord = document.encodingParseAURL(value);
|
|
607
|
+
if (urlRecord !== null) {
|
|
608
|
+
this._lowsrcURLCache = serializeURLwhatwg_url(urlRecord);
|
|
609
|
+
return this._lowsrcURLCache;
|
|
610
|
+
}
|
|
611
|
+
this._lowsrcURLCache = conversions.USVString(value);
|
|
612
|
+
return this._lowsrcURLCache;
|
|
613
|
+
} finally {
|
|
614
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
set lowsrc(V) {
|
|
619
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
620
|
+
|
|
621
|
+
if (!exports.is(esValue)) {
|
|
622
|
+
throw new globalObject.TypeError(
|
|
623
|
+
"'set lowsrc' called on an object that is not a valid instance of HTMLImageElement."
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
V = conversions["USVString"](V, {
|
|
628
|
+
context: "Failed to set the 'lowsrc' property on 'HTMLImageElement': The provided value",
|
|
629
|
+
globals: globalObject
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
633
|
+
try {
|
|
634
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("lowsrc", V);
|
|
635
|
+
} finally {
|
|
636
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
get align() {
|
|
641
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
642
|
+
|
|
643
|
+
if (!exports.is(esValue)) {
|
|
644
|
+
throw new globalObject.TypeError(
|
|
645
|
+
"'get align' called on an object that is not a valid instance of HTMLImageElement."
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
650
|
+
try {
|
|
651
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("align");
|
|
652
|
+
return value === null ? "" : value;
|
|
653
|
+
} finally {
|
|
654
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
set align(V) {
|
|
659
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
660
|
+
|
|
661
|
+
if (!exports.is(esValue)) {
|
|
662
|
+
throw new globalObject.TypeError(
|
|
663
|
+
"'set align' called on an object that is not a valid instance of HTMLImageElement."
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
V = conversions["DOMString"](V, {
|
|
668
|
+
context: "Failed to set the 'align' property on 'HTMLImageElement': The provided value",
|
|
669
|
+
globals: globalObject
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
673
|
+
try {
|
|
674
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("align", V);
|
|
675
|
+
} finally {
|
|
676
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
get hspace() {
|
|
681
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
682
|
+
|
|
683
|
+
if (!exports.is(esValue)) {
|
|
684
|
+
throw new globalObject.TypeError(
|
|
685
|
+
"'get hspace' called on an object that is not a valid instance of HTMLImageElement."
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
690
|
+
try {
|
|
691
|
+
let value = esValue[implSymbol]._reflectGetTheContentAttribute("hspace");
|
|
692
|
+
if (value !== null) {
|
|
693
|
+
value = parseNonNegativeInteger_jsdom_living_helpers_strings(value);
|
|
694
|
+
if (value !== null && value >= 0 && value <= 2147483647) {
|
|
695
|
+
return value;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return 0;
|
|
699
|
+
} finally {
|
|
700
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
set hspace(V) {
|
|
705
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
706
|
+
|
|
707
|
+
if (!exports.is(esValue)) {
|
|
708
|
+
throw new globalObject.TypeError(
|
|
709
|
+
"'set hspace' called on an object that is not a valid instance of HTMLImageElement."
|
|
710
|
+
);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
V = conversions["unsigned long"](V, {
|
|
714
|
+
context: "Failed to set the 'hspace' property on 'HTMLImageElement': The provided value",
|
|
715
|
+
globals: globalObject
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
719
|
+
try {
|
|
720
|
+
const newValue = V <= 2147483647 && V >= 0 ? V : 0;
|
|
721
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("hspace", String(newValue));
|
|
722
|
+
} finally {
|
|
723
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
get vspace() {
|
|
728
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
729
|
+
|
|
730
|
+
if (!exports.is(esValue)) {
|
|
731
|
+
throw new globalObject.TypeError(
|
|
732
|
+
"'get vspace' called on an object that is not a valid instance of HTMLImageElement."
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
737
|
+
try {
|
|
738
|
+
let value = esValue[implSymbol]._reflectGetTheContentAttribute("vspace");
|
|
739
|
+
if (value !== null) {
|
|
740
|
+
value = parseNonNegativeInteger_jsdom_living_helpers_strings(value);
|
|
741
|
+
if (value !== null && value >= 0 && value <= 2147483647) {
|
|
742
|
+
return value;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
return 0;
|
|
746
|
+
} finally {
|
|
747
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
set vspace(V) {
|
|
752
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
753
|
+
|
|
754
|
+
if (!exports.is(esValue)) {
|
|
755
|
+
throw new globalObject.TypeError(
|
|
756
|
+
"'set vspace' called on an object that is not a valid instance of HTMLImageElement."
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
V = conversions["unsigned long"](V, {
|
|
761
|
+
context: "Failed to set the 'vspace' property on 'HTMLImageElement': The provided value",
|
|
762
|
+
globals: globalObject
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
766
|
+
try {
|
|
767
|
+
const newValue = V <= 2147483647 && V >= 0 ? V : 0;
|
|
768
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("vspace", String(newValue));
|
|
769
|
+
} finally {
|
|
770
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
get longDesc() {
|
|
775
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
776
|
+
|
|
777
|
+
if (!exports.is(esValue)) {
|
|
778
|
+
throw new globalObject.TypeError(
|
|
779
|
+
"'get longDesc' called on an object that is not a valid instance of HTMLImageElement."
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
784
|
+
try {
|
|
785
|
+
const impl = esValue[implSymbol];
|
|
786
|
+
const value = impl._reflectGetTheContentAttribute("longdesc");
|
|
787
|
+
if (value === null) {
|
|
788
|
+
return "";
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
const document = impl._ownerDocument;
|
|
792
|
+
if (this._longdescURLCacheKey === value && this._baseURLCache === document._baseURLCache) {
|
|
793
|
+
return this._longdescURLCache;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
this._longdescURLCacheKey = value;
|
|
797
|
+
this._baseURLCache = document._baseURLCache;
|
|
798
|
+
|
|
799
|
+
const urlRecord = document.encodingParseAURL(value);
|
|
800
|
+
if (urlRecord !== null) {
|
|
801
|
+
this._longdescURLCache = serializeURLwhatwg_url(urlRecord);
|
|
802
|
+
return this._longdescURLCache;
|
|
803
|
+
}
|
|
804
|
+
this._longdescURLCache = conversions.USVString(value);
|
|
805
|
+
return this._longdescURLCache;
|
|
806
|
+
} finally {
|
|
807
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
set longDesc(V) {
|
|
812
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
813
|
+
|
|
814
|
+
if (!exports.is(esValue)) {
|
|
815
|
+
throw new globalObject.TypeError(
|
|
816
|
+
"'set longDesc' called on an object that is not a valid instance of HTMLImageElement."
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
V = conversions["USVString"](V, {
|
|
821
|
+
context: "Failed to set the 'longDesc' property on 'HTMLImageElement': The provided value",
|
|
822
|
+
globals: globalObject
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
826
|
+
try {
|
|
827
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("longdesc", V);
|
|
828
|
+
} finally {
|
|
829
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
get border() {
|
|
834
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
835
|
+
|
|
836
|
+
if (!exports.is(esValue)) {
|
|
837
|
+
throw new globalObject.TypeError(
|
|
838
|
+
"'get border' called on an object that is not a valid instance of HTMLImageElement."
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
843
|
+
try {
|
|
844
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("border");
|
|
845
|
+
return value === null ? "" : value;
|
|
846
|
+
} finally {
|
|
847
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
set border(V) {
|
|
852
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
853
|
+
|
|
854
|
+
if (!exports.is(esValue)) {
|
|
855
|
+
throw new globalObject.TypeError(
|
|
856
|
+
"'set border' called on an object that is not a valid instance of HTMLImageElement."
|
|
857
|
+
);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
V = conversions["DOMString"](V, {
|
|
861
|
+
context: "Failed to set the 'border' property on 'HTMLImageElement': The provided value",
|
|
862
|
+
globals: globalObject,
|
|
863
|
+
treatNullAsEmptyString: true
|
|
864
|
+
});
|
|
865
|
+
|
|
866
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
867
|
+
try {
|
|
868
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("border", V);
|
|
869
|
+
} finally {
|
|
870
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
Object.defineProperties(HTMLImageElement.prototype, {
|
|
875
|
+
alt: { enumerable: true },
|
|
876
|
+
src: { enumerable: true },
|
|
877
|
+
srcset: { enumerable: true },
|
|
878
|
+
sizes: { enumerable: true },
|
|
879
|
+
crossOrigin: { enumerable: true },
|
|
880
|
+
useMap: { enumerable: true },
|
|
881
|
+
isMap: { enumerable: true },
|
|
882
|
+
width: { enumerable: true },
|
|
883
|
+
height: { enumerable: true },
|
|
884
|
+
naturalWidth: { enumerable: true },
|
|
885
|
+
naturalHeight: { enumerable: true },
|
|
886
|
+
complete: { enumerable: true },
|
|
887
|
+
currentSrc: { enumerable: true },
|
|
888
|
+
name: { enumerable: true },
|
|
889
|
+
lowsrc: { enumerable: true },
|
|
890
|
+
align: { enumerable: true },
|
|
891
|
+
hspace: { enumerable: true },
|
|
892
|
+
vspace: { enumerable: true },
|
|
893
|
+
longDesc: { enumerable: true },
|
|
894
|
+
border: { enumerable: true },
|
|
895
|
+
[Symbol.toStringTag]: { value: "HTMLImageElement", configurable: true }
|
|
896
|
+
});
|
|
897
|
+
ctorRegistry[interfaceName] = HTMLImageElement;
|
|
898
|
+
|
|
899
|
+
Object.defineProperty(globalObject, interfaceName, {
|
|
900
|
+
configurable: true,
|
|
901
|
+
writable: true,
|
|
902
|
+
value: HTMLImageElement
|
|
903
|
+
});
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
const Impl = require("../../jsdom/living/nodes/HTMLImageElement-impl.js");
|