@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,900 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const conversions = require("webidl-conversions");
|
|
4
|
+
const utils = require("./utils.js");
|
|
5
|
+
|
|
6
|
+
const TextTrackKind = require("./TextTrackKind.js");
|
|
7
|
+
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
|
|
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 implSymbol = utils.implSymbol;
|
|
13
|
+
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
|
|
14
|
+
const HTMLElement = require("./HTMLElement.js");
|
|
15
|
+
|
|
16
|
+
const interfaceName = "HTMLMediaElement";
|
|
17
|
+
|
|
18
|
+
exports.is = value => {
|
|
19
|
+
return utils.isObject(value) && Object.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;
|
|
20
|
+
};
|
|
21
|
+
exports.isImpl = value => {
|
|
22
|
+
return utils.isObject(value) && value instanceof Impl.implementation;
|
|
23
|
+
};
|
|
24
|
+
exports.convert = (globalObject, value, { context = "The provided value" } = {}) => {
|
|
25
|
+
if (exports.is(value)) {
|
|
26
|
+
return utils.implForWrapper(value);
|
|
27
|
+
}
|
|
28
|
+
throw new globalObject.TypeError(`${context} is not of type 'HTMLMediaElement'.`);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function makeWrapper(globalObject, newTarget) {
|
|
32
|
+
let proto;
|
|
33
|
+
if (newTarget !== undefined) {
|
|
34
|
+
proto = newTarget.prototype;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!utils.isObject(proto)) {
|
|
38
|
+
proto = globalObject[ctorRegistrySymbol]["HTMLMediaElement"].prototype;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return Object.create(proto);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.create = (globalObject, constructorArgs, privateData) => {
|
|
45
|
+
const wrapper = makeWrapper(globalObject);
|
|
46
|
+
return exports.setup(wrapper, globalObject, constructorArgs, privateData);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.createImpl = (globalObject, constructorArgs, privateData) => {
|
|
50
|
+
const wrapper = exports.create(globalObject, constructorArgs, privateData);
|
|
51
|
+
return utils.implForWrapper(wrapper);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports._internalSetup = (wrapper, globalObject) => {
|
|
55
|
+
HTMLElement._internalSetup(wrapper, globalObject);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {
|
|
59
|
+
privateData.wrapper = wrapper;
|
|
60
|
+
|
|
61
|
+
exports._internalSetup(wrapper, globalObject);
|
|
62
|
+
Object.defineProperty(wrapper, implSymbol, {
|
|
63
|
+
value: new Impl.implementation(globalObject, constructorArgs, privateData),
|
|
64
|
+
configurable: true
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
|
|
68
|
+
if (Impl.init) {
|
|
69
|
+
Impl.init(wrapper[implSymbol]);
|
|
70
|
+
}
|
|
71
|
+
return wrapper;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.new = (globalObject, newTarget) => {
|
|
75
|
+
const wrapper = makeWrapper(globalObject, newTarget);
|
|
76
|
+
|
|
77
|
+
exports._internalSetup(wrapper, globalObject);
|
|
78
|
+
Object.defineProperty(wrapper, implSymbol, {
|
|
79
|
+
value: Object.create(Impl.implementation.prototype),
|
|
80
|
+
configurable: true
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
|
|
84
|
+
if (Impl.init) {
|
|
85
|
+
Impl.init(wrapper[implSymbol]);
|
|
86
|
+
}
|
|
87
|
+
return wrapper[implSymbol];
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const exposed = new Set(["Window"]);
|
|
91
|
+
|
|
92
|
+
exports.install = (globalObject, globalNames) => {
|
|
93
|
+
if (!globalNames.some(globalName => exposed.has(globalName))) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const ctorRegistry = utils.initCtorRegistry(globalObject);
|
|
98
|
+
class HTMLMediaElement extends globalObject.HTMLElement {
|
|
99
|
+
constructor() {
|
|
100
|
+
throw new globalObject.TypeError("Illegal constructor");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
load() {
|
|
104
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
105
|
+
if (!exports.is(esValue)) {
|
|
106
|
+
throw new globalObject.TypeError(
|
|
107
|
+
"'load' called on an object that is not a valid instance of HTMLMediaElement."
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return esValue[implSymbol].load();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
canPlayType(type) {
|
|
115
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
116
|
+
if (!exports.is(esValue)) {
|
|
117
|
+
throw new globalObject.TypeError(
|
|
118
|
+
"'canPlayType' called on an object that is not a valid instance of HTMLMediaElement."
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (arguments.length < 1) {
|
|
123
|
+
throw new globalObject.TypeError(
|
|
124
|
+
`Failed to execute 'canPlayType' on 'HTMLMediaElement': 1 argument required, but only ${arguments.length} present.`
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const args = [];
|
|
128
|
+
{
|
|
129
|
+
let curArg = arguments[0];
|
|
130
|
+
curArg = conversions["DOMString"](curArg, {
|
|
131
|
+
context: "Failed to execute 'canPlayType' on 'HTMLMediaElement': parameter 1",
|
|
132
|
+
globals: globalObject
|
|
133
|
+
});
|
|
134
|
+
args.push(curArg);
|
|
135
|
+
}
|
|
136
|
+
return utils.tryWrapperForImpl(esValue[implSymbol].canPlayType(...args));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
play() {
|
|
140
|
+
try {
|
|
141
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
142
|
+
if (!exports.is(esValue)) {
|
|
143
|
+
throw new globalObject.TypeError(
|
|
144
|
+
"'play' called on an object that is not a valid instance of HTMLMediaElement."
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return utils.tryWrapperForImpl(esValue[implSymbol].play());
|
|
149
|
+
} catch (e) {
|
|
150
|
+
return globalObject.Promise.reject(e);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
pause() {
|
|
155
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
156
|
+
if (!exports.is(esValue)) {
|
|
157
|
+
throw new globalObject.TypeError(
|
|
158
|
+
"'pause' called on an object that is not a valid instance of HTMLMediaElement."
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return esValue[implSymbol].pause();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
addTextTrack(kind) {
|
|
166
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
167
|
+
if (!exports.is(esValue)) {
|
|
168
|
+
throw new globalObject.TypeError(
|
|
169
|
+
"'addTextTrack' called on an object that is not a valid instance of HTMLMediaElement."
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (arguments.length < 1) {
|
|
174
|
+
throw new globalObject.TypeError(
|
|
175
|
+
`Failed to execute 'addTextTrack' on 'HTMLMediaElement': 1 argument required, but only ${arguments.length} present.`
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
const args = [];
|
|
179
|
+
{
|
|
180
|
+
let curArg = arguments[0];
|
|
181
|
+
curArg = TextTrackKind.convert(globalObject, curArg, {
|
|
182
|
+
context: "Failed to execute 'addTextTrack' on 'HTMLMediaElement': parameter 1"
|
|
183
|
+
});
|
|
184
|
+
args.push(curArg);
|
|
185
|
+
}
|
|
186
|
+
{
|
|
187
|
+
let curArg = arguments[1];
|
|
188
|
+
if (curArg !== undefined) {
|
|
189
|
+
curArg = conversions["DOMString"](curArg, {
|
|
190
|
+
context: "Failed to execute 'addTextTrack' on 'HTMLMediaElement': parameter 2",
|
|
191
|
+
globals: globalObject
|
|
192
|
+
});
|
|
193
|
+
} else {
|
|
194
|
+
curArg = "";
|
|
195
|
+
}
|
|
196
|
+
args.push(curArg);
|
|
197
|
+
}
|
|
198
|
+
{
|
|
199
|
+
let curArg = arguments[2];
|
|
200
|
+
if (curArg !== undefined) {
|
|
201
|
+
curArg = conversions["DOMString"](curArg, {
|
|
202
|
+
context: "Failed to execute 'addTextTrack' on 'HTMLMediaElement': parameter 3",
|
|
203
|
+
globals: globalObject
|
|
204
|
+
});
|
|
205
|
+
} else {
|
|
206
|
+
curArg = "";
|
|
207
|
+
}
|
|
208
|
+
args.push(curArg);
|
|
209
|
+
}
|
|
210
|
+
return utils.tryWrapperForImpl(esValue[implSymbol].addTextTrack(...args));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
get src() {
|
|
214
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
215
|
+
|
|
216
|
+
if (!exports.is(esValue)) {
|
|
217
|
+
throw new globalObject.TypeError(
|
|
218
|
+
"'get src' called on an object that is not a valid instance of HTMLMediaElement."
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
223
|
+
try {
|
|
224
|
+
const impl = esValue[implSymbol];
|
|
225
|
+
const value = impl._reflectGetTheContentAttribute("src");
|
|
226
|
+
if (value === null) {
|
|
227
|
+
return "";
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const document = impl._ownerDocument;
|
|
231
|
+
if (this._srcURLCacheKey === value && this._baseURLCache === document._baseURLCache) {
|
|
232
|
+
return this._srcURLCache;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
this._srcURLCacheKey = value;
|
|
236
|
+
this._baseURLCache = document._baseURLCache;
|
|
237
|
+
|
|
238
|
+
const urlRecord = document.encodingParseAURL(value);
|
|
239
|
+
if (urlRecord !== null) {
|
|
240
|
+
this._srcURLCache = serializeURLwhatwg_url(urlRecord);
|
|
241
|
+
return this._srcURLCache;
|
|
242
|
+
}
|
|
243
|
+
this._srcURLCache = conversions.USVString(value);
|
|
244
|
+
return this._srcURLCache;
|
|
245
|
+
} finally {
|
|
246
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
set src(V) {
|
|
251
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
252
|
+
|
|
253
|
+
if (!exports.is(esValue)) {
|
|
254
|
+
throw new globalObject.TypeError(
|
|
255
|
+
"'set src' called on an object that is not a valid instance of HTMLMediaElement."
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
V = conversions["USVString"](V, {
|
|
260
|
+
context: "Failed to set the 'src' property on 'HTMLMediaElement': The provided value",
|
|
261
|
+
globals: globalObject
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
265
|
+
try {
|
|
266
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("src", V);
|
|
267
|
+
} finally {
|
|
268
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
get currentSrc() {
|
|
273
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
274
|
+
|
|
275
|
+
if (!exports.is(esValue)) {
|
|
276
|
+
throw new globalObject.TypeError(
|
|
277
|
+
"'get currentSrc' called on an object that is not a valid instance of HTMLMediaElement."
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return esValue[implSymbol]["currentSrc"];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
get crossOrigin() {
|
|
285
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
286
|
+
|
|
287
|
+
if (!exports.is(esValue)) {
|
|
288
|
+
throw new globalObject.TypeError(
|
|
289
|
+
"'get crossOrigin' called on an object that is not a valid instance of HTMLMediaElement."
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
294
|
+
try {
|
|
295
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("crossorigin");
|
|
296
|
+
} finally {
|
|
297
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
set crossOrigin(V) {
|
|
302
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
303
|
+
|
|
304
|
+
if (!exports.is(esValue)) {
|
|
305
|
+
throw new globalObject.TypeError(
|
|
306
|
+
"'set crossOrigin' called on an object that is not a valid instance of HTMLMediaElement."
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (V === null || V === undefined) {
|
|
311
|
+
V = null;
|
|
312
|
+
} else {
|
|
313
|
+
V = conversions["DOMString"](V, {
|
|
314
|
+
context: "Failed to set the 'crossOrigin' property on 'HTMLMediaElement': The provided value",
|
|
315
|
+
globals: globalObject
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
320
|
+
try {
|
|
321
|
+
if (V === null) {
|
|
322
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("crossorigin");
|
|
323
|
+
} else {
|
|
324
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("crossorigin", V);
|
|
325
|
+
}
|
|
326
|
+
} finally {
|
|
327
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
get networkState() {
|
|
332
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
333
|
+
|
|
334
|
+
if (!exports.is(esValue)) {
|
|
335
|
+
throw new globalObject.TypeError(
|
|
336
|
+
"'get networkState' called on an object that is not a valid instance of HTMLMediaElement."
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return esValue[implSymbol]["networkState"];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
get preload() {
|
|
344
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
345
|
+
|
|
346
|
+
if (!exports.is(esValue)) {
|
|
347
|
+
throw new globalObject.TypeError(
|
|
348
|
+
"'get preload' called on an object that is not a valid instance of HTMLMediaElement."
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
353
|
+
try {
|
|
354
|
+
const value = esValue[implSymbol]._reflectGetTheContentAttribute("preload");
|
|
355
|
+
return value === null ? "" : value;
|
|
356
|
+
} finally {
|
|
357
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
set preload(V) {
|
|
362
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
363
|
+
|
|
364
|
+
if (!exports.is(esValue)) {
|
|
365
|
+
throw new globalObject.TypeError(
|
|
366
|
+
"'set preload' called on an object that is not a valid instance of HTMLMediaElement."
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
V = conversions["DOMString"](V, {
|
|
371
|
+
context: "Failed to set the 'preload' property on 'HTMLMediaElement': The provided value",
|
|
372
|
+
globals: globalObject
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
376
|
+
try {
|
|
377
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("preload", V);
|
|
378
|
+
} finally {
|
|
379
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
get buffered() {
|
|
384
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
385
|
+
|
|
386
|
+
if (!exports.is(esValue)) {
|
|
387
|
+
throw new globalObject.TypeError(
|
|
388
|
+
"'get buffered' called on an object that is not a valid instance of HTMLMediaElement."
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return utils.tryWrapperForImpl(esValue[implSymbol]["buffered"]);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
get readyState() {
|
|
396
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
397
|
+
|
|
398
|
+
if (!exports.is(esValue)) {
|
|
399
|
+
throw new globalObject.TypeError(
|
|
400
|
+
"'get readyState' called on an object that is not a valid instance of HTMLMediaElement."
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
return esValue[implSymbol]["readyState"];
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
get seeking() {
|
|
408
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
409
|
+
|
|
410
|
+
if (!exports.is(esValue)) {
|
|
411
|
+
throw new globalObject.TypeError(
|
|
412
|
+
"'get seeking' called on an object that is not a valid instance of HTMLMediaElement."
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
return esValue[implSymbol]["seeking"];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
get currentTime() {
|
|
420
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
421
|
+
|
|
422
|
+
if (!exports.is(esValue)) {
|
|
423
|
+
throw new globalObject.TypeError(
|
|
424
|
+
"'get currentTime' called on an object that is not a valid instance of HTMLMediaElement."
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
return esValue[implSymbol]["currentTime"];
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
set currentTime(V) {
|
|
432
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
433
|
+
|
|
434
|
+
if (!exports.is(esValue)) {
|
|
435
|
+
throw new globalObject.TypeError(
|
|
436
|
+
"'set currentTime' called on an object that is not a valid instance of HTMLMediaElement."
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
V = conversions["double"](V, {
|
|
441
|
+
context: "Failed to set the 'currentTime' property on 'HTMLMediaElement': The provided value",
|
|
442
|
+
globals: globalObject
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
esValue[implSymbol]["currentTime"] = V;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
get duration() {
|
|
449
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
450
|
+
|
|
451
|
+
if (!exports.is(esValue)) {
|
|
452
|
+
throw new globalObject.TypeError(
|
|
453
|
+
"'get duration' called on an object that is not a valid instance of HTMLMediaElement."
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
return esValue[implSymbol]["duration"];
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
get paused() {
|
|
461
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
462
|
+
|
|
463
|
+
if (!exports.is(esValue)) {
|
|
464
|
+
throw new globalObject.TypeError(
|
|
465
|
+
"'get paused' called on an object that is not a valid instance of HTMLMediaElement."
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return esValue[implSymbol]["paused"];
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
get defaultPlaybackRate() {
|
|
473
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
474
|
+
|
|
475
|
+
if (!exports.is(esValue)) {
|
|
476
|
+
throw new globalObject.TypeError(
|
|
477
|
+
"'get defaultPlaybackRate' called on an object that is not a valid instance of HTMLMediaElement."
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
return esValue[implSymbol]["defaultPlaybackRate"];
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
set defaultPlaybackRate(V) {
|
|
485
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
486
|
+
|
|
487
|
+
if (!exports.is(esValue)) {
|
|
488
|
+
throw new globalObject.TypeError(
|
|
489
|
+
"'set defaultPlaybackRate' called on an object that is not a valid instance of HTMLMediaElement."
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
V = conversions["double"](V, {
|
|
494
|
+
context: "Failed to set the 'defaultPlaybackRate' property on 'HTMLMediaElement': The provided value",
|
|
495
|
+
globals: globalObject
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
esValue[implSymbol]["defaultPlaybackRate"] = V;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
get playbackRate() {
|
|
502
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
503
|
+
|
|
504
|
+
if (!exports.is(esValue)) {
|
|
505
|
+
throw new globalObject.TypeError(
|
|
506
|
+
"'get playbackRate' called on an object that is not a valid instance of HTMLMediaElement."
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
return esValue[implSymbol]["playbackRate"];
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
set playbackRate(V) {
|
|
514
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
515
|
+
|
|
516
|
+
if (!exports.is(esValue)) {
|
|
517
|
+
throw new globalObject.TypeError(
|
|
518
|
+
"'set playbackRate' called on an object that is not a valid instance of HTMLMediaElement."
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
V = conversions["double"](V, {
|
|
523
|
+
context: "Failed to set the 'playbackRate' property on 'HTMLMediaElement': The provided value",
|
|
524
|
+
globals: globalObject
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
esValue[implSymbol]["playbackRate"] = V;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
get played() {
|
|
531
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
532
|
+
|
|
533
|
+
if (!exports.is(esValue)) {
|
|
534
|
+
throw new globalObject.TypeError(
|
|
535
|
+
"'get played' called on an object that is not a valid instance of HTMLMediaElement."
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
return utils.tryWrapperForImpl(esValue[implSymbol]["played"]);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
get seekable() {
|
|
543
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
544
|
+
|
|
545
|
+
if (!exports.is(esValue)) {
|
|
546
|
+
throw new globalObject.TypeError(
|
|
547
|
+
"'get seekable' called on an object that is not a valid instance of HTMLMediaElement."
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
return utils.tryWrapperForImpl(esValue[implSymbol]["seekable"]);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
get ended() {
|
|
555
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
556
|
+
|
|
557
|
+
if (!exports.is(esValue)) {
|
|
558
|
+
throw new globalObject.TypeError(
|
|
559
|
+
"'get ended' called on an object that is not a valid instance of HTMLMediaElement."
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return esValue[implSymbol]["ended"];
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
get autoplay() {
|
|
567
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
568
|
+
|
|
569
|
+
if (!exports.is(esValue)) {
|
|
570
|
+
throw new globalObject.TypeError(
|
|
571
|
+
"'get autoplay' called on an object that is not a valid instance of HTMLMediaElement."
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
576
|
+
try {
|
|
577
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("autoplay") !== null;
|
|
578
|
+
} finally {
|
|
579
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
set autoplay(V) {
|
|
584
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
585
|
+
|
|
586
|
+
if (!exports.is(esValue)) {
|
|
587
|
+
throw new globalObject.TypeError(
|
|
588
|
+
"'set autoplay' called on an object that is not a valid instance of HTMLMediaElement."
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
V = conversions["boolean"](V, {
|
|
593
|
+
context: "Failed to set the 'autoplay' property on 'HTMLMediaElement': The provided value",
|
|
594
|
+
globals: globalObject
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
598
|
+
try {
|
|
599
|
+
if (V) {
|
|
600
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("autoplay", "");
|
|
601
|
+
} else {
|
|
602
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("autoplay");
|
|
603
|
+
}
|
|
604
|
+
} finally {
|
|
605
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
get loop() {
|
|
610
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
611
|
+
|
|
612
|
+
if (!exports.is(esValue)) {
|
|
613
|
+
throw new globalObject.TypeError(
|
|
614
|
+
"'get loop' called on an object that is not a valid instance of HTMLMediaElement."
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
619
|
+
try {
|
|
620
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("loop") !== null;
|
|
621
|
+
} finally {
|
|
622
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
set loop(V) {
|
|
627
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
628
|
+
|
|
629
|
+
if (!exports.is(esValue)) {
|
|
630
|
+
throw new globalObject.TypeError(
|
|
631
|
+
"'set loop' called on an object that is not a valid instance of HTMLMediaElement."
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
V = conversions["boolean"](V, {
|
|
636
|
+
context: "Failed to set the 'loop' property on 'HTMLMediaElement': The provided value",
|
|
637
|
+
globals: globalObject
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
641
|
+
try {
|
|
642
|
+
if (V) {
|
|
643
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("loop", "");
|
|
644
|
+
} else {
|
|
645
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("loop");
|
|
646
|
+
}
|
|
647
|
+
} finally {
|
|
648
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
get controls() {
|
|
653
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
654
|
+
|
|
655
|
+
if (!exports.is(esValue)) {
|
|
656
|
+
throw new globalObject.TypeError(
|
|
657
|
+
"'get controls' called on an object that is not a valid instance of HTMLMediaElement."
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
662
|
+
try {
|
|
663
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("controls") !== null;
|
|
664
|
+
} finally {
|
|
665
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
set controls(V) {
|
|
670
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
671
|
+
|
|
672
|
+
if (!exports.is(esValue)) {
|
|
673
|
+
throw new globalObject.TypeError(
|
|
674
|
+
"'set controls' called on an object that is not a valid instance of HTMLMediaElement."
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
V = conversions["boolean"](V, {
|
|
679
|
+
context: "Failed to set the 'controls' property on 'HTMLMediaElement': The provided value",
|
|
680
|
+
globals: globalObject
|
|
681
|
+
});
|
|
682
|
+
|
|
683
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
684
|
+
try {
|
|
685
|
+
if (V) {
|
|
686
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("controls", "");
|
|
687
|
+
} else {
|
|
688
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("controls");
|
|
689
|
+
}
|
|
690
|
+
} finally {
|
|
691
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
get volume() {
|
|
696
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
697
|
+
|
|
698
|
+
if (!exports.is(esValue)) {
|
|
699
|
+
throw new globalObject.TypeError(
|
|
700
|
+
"'get volume' called on an object that is not a valid instance of HTMLMediaElement."
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
return esValue[implSymbol]["volume"];
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
set volume(V) {
|
|
708
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
709
|
+
|
|
710
|
+
if (!exports.is(esValue)) {
|
|
711
|
+
throw new globalObject.TypeError(
|
|
712
|
+
"'set volume' called on an object that is not a valid instance of HTMLMediaElement."
|
|
713
|
+
);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
V = conversions["double"](V, {
|
|
717
|
+
context: "Failed to set the 'volume' property on 'HTMLMediaElement': The provided value",
|
|
718
|
+
globals: globalObject
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
esValue[implSymbol]["volume"] = V;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
get muted() {
|
|
725
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
726
|
+
|
|
727
|
+
if (!exports.is(esValue)) {
|
|
728
|
+
throw new globalObject.TypeError(
|
|
729
|
+
"'get muted' called on an object that is not a valid instance of HTMLMediaElement."
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
return esValue[implSymbol]["muted"];
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
set muted(V) {
|
|
737
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
738
|
+
|
|
739
|
+
if (!exports.is(esValue)) {
|
|
740
|
+
throw new globalObject.TypeError(
|
|
741
|
+
"'set muted' called on an object that is not a valid instance of HTMLMediaElement."
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
V = conversions["boolean"](V, {
|
|
746
|
+
context: "Failed to set the 'muted' property on 'HTMLMediaElement': The provided value",
|
|
747
|
+
globals: globalObject
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
esValue[implSymbol]["muted"] = V;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
get defaultMuted() {
|
|
754
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
755
|
+
|
|
756
|
+
if (!exports.is(esValue)) {
|
|
757
|
+
throw new globalObject.TypeError(
|
|
758
|
+
"'get defaultMuted' called on an object that is not a valid instance of HTMLMediaElement."
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
763
|
+
try {
|
|
764
|
+
return esValue[implSymbol]._reflectGetTheContentAttribute("muted") !== null;
|
|
765
|
+
} finally {
|
|
766
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
set defaultMuted(V) {
|
|
771
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
772
|
+
|
|
773
|
+
if (!exports.is(esValue)) {
|
|
774
|
+
throw new globalObject.TypeError(
|
|
775
|
+
"'set defaultMuted' called on an object that is not a valid instance of HTMLMediaElement."
|
|
776
|
+
);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
V = conversions["boolean"](V, {
|
|
780
|
+
context: "Failed to set the 'defaultMuted' property on 'HTMLMediaElement': The provided value",
|
|
781
|
+
globals: globalObject
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
785
|
+
try {
|
|
786
|
+
if (V) {
|
|
787
|
+
esValue[implSymbol]._reflectSetTheContentAttribute("muted", "");
|
|
788
|
+
} else {
|
|
789
|
+
esValue[implSymbol]._reflectDeleteTheContentAttribute("muted");
|
|
790
|
+
}
|
|
791
|
+
} finally {
|
|
792
|
+
ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
get audioTracks() {
|
|
797
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
798
|
+
|
|
799
|
+
if (!exports.is(esValue)) {
|
|
800
|
+
throw new globalObject.TypeError(
|
|
801
|
+
"'get audioTracks' called on an object that is not a valid instance of HTMLMediaElement."
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
return utils.getSameObject(this, "audioTracks", () => {
|
|
806
|
+
return utils.tryWrapperForImpl(esValue[implSymbol]["audioTracks"]);
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
get videoTracks() {
|
|
811
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
812
|
+
|
|
813
|
+
if (!exports.is(esValue)) {
|
|
814
|
+
throw new globalObject.TypeError(
|
|
815
|
+
"'get videoTracks' called on an object that is not a valid instance of HTMLMediaElement."
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
return utils.getSameObject(this, "videoTracks", () => {
|
|
820
|
+
return utils.tryWrapperForImpl(esValue[implSymbol]["videoTracks"]);
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
get textTracks() {
|
|
825
|
+
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
826
|
+
|
|
827
|
+
if (!exports.is(esValue)) {
|
|
828
|
+
throw new globalObject.TypeError(
|
|
829
|
+
"'get textTracks' called on an object that is not a valid instance of HTMLMediaElement."
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
return utils.getSameObject(this, "textTracks", () => {
|
|
834
|
+
return utils.tryWrapperForImpl(esValue[implSymbol]["textTracks"]);
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
Object.defineProperties(HTMLMediaElement.prototype, {
|
|
839
|
+
load: { enumerable: true },
|
|
840
|
+
canPlayType: { enumerable: true },
|
|
841
|
+
play: { enumerable: true },
|
|
842
|
+
pause: { enumerable: true },
|
|
843
|
+
addTextTrack: { enumerable: true },
|
|
844
|
+
src: { enumerable: true },
|
|
845
|
+
currentSrc: { enumerable: true },
|
|
846
|
+
crossOrigin: { enumerable: true },
|
|
847
|
+
networkState: { enumerable: true },
|
|
848
|
+
preload: { enumerable: true },
|
|
849
|
+
buffered: { enumerable: true },
|
|
850
|
+
readyState: { enumerable: true },
|
|
851
|
+
seeking: { enumerable: true },
|
|
852
|
+
currentTime: { enumerable: true },
|
|
853
|
+
duration: { enumerable: true },
|
|
854
|
+
paused: { enumerable: true },
|
|
855
|
+
defaultPlaybackRate: { enumerable: true },
|
|
856
|
+
playbackRate: { enumerable: true },
|
|
857
|
+
played: { enumerable: true },
|
|
858
|
+
seekable: { enumerable: true },
|
|
859
|
+
ended: { enumerable: true },
|
|
860
|
+
autoplay: { enumerable: true },
|
|
861
|
+
loop: { enumerable: true },
|
|
862
|
+
controls: { enumerable: true },
|
|
863
|
+
volume: { enumerable: true },
|
|
864
|
+
muted: { enumerable: true },
|
|
865
|
+
defaultMuted: { enumerable: true },
|
|
866
|
+
audioTracks: { enumerable: true },
|
|
867
|
+
videoTracks: { enumerable: true },
|
|
868
|
+
textTracks: { enumerable: true },
|
|
869
|
+
[Symbol.toStringTag]: { value: "HTMLMediaElement", configurable: true },
|
|
870
|
+
NETWORK_EMPTY: { value: 0, enumerable: true },
|
|
871
|
+
NETWORK_IDLE: { value: 1, enumerable: true },
|
|
872
|
+
NETWORK_LOADING: { value: 2, enumerable: true },
|
|
873
|
+
NETWORK_NO_SOURCE: { value: 3, enumerable: true },
|
|
874
|
+
HAVE_NOTHING: { value: 0, enumerable: true },
|
|
875
|
+
HAVE_METADATA: { value: 1, enumerable: true },
|
|
876
|
+
HAVE_CURRENT_DATA: { value: 2, enumerable: true },
|
|
877
|
+
HAVE_FUTURE_DATA: { value: 3, enumerable: true },
|
|
878
|
+
HAVE_ENOUGH_DATA: { value: 4, enumerable: true }
|
|
879
|
+
});
|
|
880
|
+
Object.defineProperties(HTMLMediaElement, {
|
|
881
|
+
NETWORK_EMPTY: { value: 0, enumerable: true },
|
|
882
|
+
NETWORK_IDLE: { value: 1, enumerable: true },
|
|
883
|
+
NETWORK_LOADING: { value: 2, enumerable: true },
|
|
884
|
+
NETWORK_NO_SOURCE: { value: 3, enumerable: true },
|
|
885
|
+
HAVE_NOTHING: { value: 0, enumerable: true },
|
|
886
|
+
HAVE_METADATA: { value: 1, enumerable: true },
|
|
887
|
+
HAVE_CURRENT_DATA: { value: 2, enumerable: true },
|
|
888
|
+
HAVE_FUTURE_DATA: { value: 3, enumerable: true },
|
|
889
|
+
HAVE_ENOUGH_DATA: { value: 4, enumerable: true }
|
|
890
|
+
});
|
|
891
|
+
ctorRegistry[interfaceName] = HTMLMediaElement;
|
|
892
|
+
|
|
893
|
+
Object.defineProperty(globalObject, interfaceName, {
|
|
894
|
+
configurable: true,
|
|
895
|
+
writable: true,
|
|
896
|
+
value: HTMLMediaElement
|
|
897
|
+
});
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
const Impl = require("../../jsdom/living/nodes/HTMLMediaElement-impl.js");
|