From 5b44eee1e766e60bb3b73022fa0f297cced3ba16 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 01:50:40 +0900 Subject: [PATCH 01/24] WebIDLToSwift: Generate into a single file to make the output filenames predictable --- Sources/DOMKit/WebIDL/ARIAMixin.swift | 212 - Sources/DOMKit/WebIDL/AbortController.swift | 27 - Sources/DOMKit/WebIDL/AbortSignal.swift | 39 - Sources/DOMKit/WebIDL/AbstractRange.swift | 34 - Sources/DOMKit/WebIDL/AbstractWorker.swift | 12 - .../WebIDL/AddEventListenerOptions.swift | 30 - Sources/DOMKit/WebIDL/Animatable.swift | 17 - Sources/DOMKit/WebIDL/Animation.swift | 104 - Sources/DOMKit/WebIDL/AnimationEffect.swift | 29 - .../WebIDL/AnimationFrameProvider.swift | 14 - .../DOMKit/WebIDL/AnimationPlayState.swift | 24 - .../DOMKit/WebIDL/AnimationReplaceState.swift | 23 - Sources/DOMKit/WebIDL/AnimationTimeline.swift | 22 - .../DOMKit/WebIDL/ArrayBuffer_or_String.swift | 46 - .../DOMKit/WebIDL/AssignedNodesOptions.swift | 20 - Sources/DOMKit/WebIDL/Attr.swift | 40 - Sources/DOMKit/WebIDL/AudioTrack.swift | 34 - Sources/DOMKit/WebIDL/AudioTrackList.swift | 37 - ...udioTrack_or_TextTrack_or_VideoTrack.swift | 60 - Sources/DOMKit/WebIDL/BarProp.swift | 18 - .../DOMKit/WebIDL/BaseComputedKeyframe.swift | 35 - Sources/DOMKit/WebIDL/BaseKeyframe.swift | 30 - .../WebIDL/BasePropertyIndexedKeyframe.swift | 30 - Sources/DOMKit/WebIDL/BeforeUnloadEvent.swift | 14 - Sources/DOMKit/WebIDL/Blob.swift | 57 - Sources/DOMKit/WebIDL/BlobPart.swift | 60 - Sources/DOMKit/WebIDL/BlobPropertyBag.swift | 25 - Sources/DOMKit/WebIDL/Body.swift | 71 - Sources/DOMKit/WebIDL/BroadcastChannel.swift | 38 - Sources/DOMKit/WebIDL/BufferSource.swift | 46 - .../WebIDL/ByteLengthQueuingStrategy.swift | 26 - Sources/DOMKit/WebIDL/CDATASection.swift | 12 - Sources/DOMKit/WebIDL/Cache.swift | 98 - Sources/DOMKit/WebIDL/CacheQueryOptions.swift | 30 - Sources/DOMKit/WebIDL/CacheStorage.swift | 74 - Sources/DOMKit/WebIDL/CanPlayTypeResult.swift | 23 - Sources/DOMKit/WebIDL/CanvasCompositing.swift | 17 - Sources/DOMKit/WebIDL/CanvasDirection.swift | 23 - Sources/DOMKit/WebIDL/CanvasDrawImage.swift | 31 - Sources/DOMKit/WebIDL/CanvasDrawPath.swift | 62 - Sources/DOMKit/WebIDL/CanvasFillRule.swift | 22 - .../WebIDL/CanvasFillStrokeStyles.swift | 43 - Sources/DOMKit/WebIDL/CanvasFilter.swift | 18 - ...terInput_or_seq_of_CanvasFilterInput.swift | 46 - .../WebIDL/CanvasFilter_or_String.swift | 46 - Sources/DOMKit/WebIDL/CanvasFilters.swift | 12 - Sources/DOMKit/WebIDL/CanvasFontKerning.swift | 23 - Sources/DOMKit/WebIDL/CanvasFontStretch.swift | 29 - .../DOMKit/WebIDL/CanvasFontVariantCaps.swift | 27 - Sources/DOMKit/WebIDL/CanvasGradient.swift | 19 - ...sGradient_or_CanvasPattern_or_String.swift | 60 - Sources/DOMKit/WebIDL/CanvasImageData.swift | 39 - .../DOMKit/WebIDL/CanvasImageSmoothing.swift | 17 - Sources/DOMKit/WebIDL/CanvasLineCap.swift | 23 - Sources/DOMKit/WebIDL/CanvasLineJoin.swift | 23 - Sources/DOMKit/WebIDL/CanvasPath.swift | 77 - .../WebIDL/CanvasPathDrawingStyles.swift | 42 - Sources/DOMKit/WebIDL/CanvasPattern.swift | 19 - Sources/DOMKit/WebIDL/CanvasRect.swift | 22 - .../WebIDL/CanvasRenderingContext2D.swift | 23 - .../CanvasRenderingContext2DSettings.swift | 35 - .../DOMKit/WebIDL/CanvasShadowStyles.swift | 27 - Sources/DOMKit/WebIDL/CanvasState.swift | 27 - Sources/DOMKit/WebIDL/CanvasText.swift | 22 - Sources/DOMKit/WebIDL/CanvasTextAlign.swift | 25 - .../DOMKit/WebIDL/CanvasTextBaseline.swift | 26 - .../WebIDL/CanvasTextDrawingStyles.swift | 57 - .../DOMKit/WebIDL/CanvasTextRendering.swift | 24 - Sources/DOMKit/WebIDL/CanvasTransform.swift | 59 - .../DOMKit/WebIDL/CanvasUserInterface.swift | 27 - Sources/DOMKit/WebIDL/CharacterData.swift | 45 - Sources/DOMKit/WebIDL/ChildNode.swift | 27 - .../DOMKit/WebIDL/ClientQueryOptions.swift | 25 - Sources/DOMKit/WebIDL/ClientType.swift | 24 - Sources/DOMKit/WebIDL/ClosureAttribute.swift | 455 - .../DOMKit/WebIDL/ColorSpaceConversion.swift | 22 - Sources/DOMKit/WebIDL/Comment.swift | 16 - .../DOMKit/WebIDL/CompositeOperation.swift | 23 - .../WebIDL/CompositeOperationOrAuto.swift | 24 - ...o_or_seq_of_CompositeOperationOrAuto.swift | 46 - Sources/DOMKit/WebIDL/CompositionEvent.swift | 25 - .../DOMKit/WebIDL/CompositionEventInit.swift | 20 - .../DOMKit/WebIDL/ComputedEffectTiming.swift | 25 - .../DOMKit/WebIDL/CountQueuingStrategy.swift | 26 - .../DOMKit/WebIDL/CustomElementRegistry.swift | 41 - Sources/DOMKit/WebIDL/CustomEvent.swift | 25 - Sources/DOMKit/WebIDL/CustomEventInit.swift | 20 - Sources/DOMKit/WebIDL/DOMException.swift | 80 - Sources/DOMKit/WebIDL/DOMImplementation.swift | 34 - Sources/DOMKit/WebIDL/DOMMatrix.swift | 245 - Sources/DOMKit/WebIDL/DOMMatrix2DInit.swift | 75 - Sources/DOMKit/WebIDL/DOMMatrixInit.swift | 70 - Sources/DOMKit/WebIDL/DOMMatrixReadOnly.swift | 224 - Sources/DOMKit/WebIDL/DOMParser.swift | 23 - .../WebIDL/DOMParserSupportedType.swift | 25 - Sources/DOMKit/WebIDL/DOMPoint.swift | 47 - Sources/DOMKit/WebIDL/DOMPointInit.swift | 35 - .../WebIDL/DOMPointInit_or_Double.swift | 46 - ...ble_or_seq_of_DOMPointInit_or_Double.swift | 60 - Sources/DOMKit/WebIDL/DOMPointReadOnly.swift | 49 - Sources/DOMKit/WebIDL/DOMQuad.swift | 54 - Sources/DOMKit/WebIDL/DOMQuadInit.swift | 35 - Sources/DOMKit/WebIDL/DOMRect.swift | 47 - Sources/DOMKit/WebIDL/DOMRectInit.swift | 35 - Sources/DOMKit/WebIDL/DOMRectList.swift | 22 - Sources/DOMKit/WebIDL/DOMRectReadOnly.swift | 60 - Sources/DOMKit/WebIDL/DOMStringList.swift | 27 - Sources/DOMKit/WebIDL/DOMStringMap.swift | 22 - Sources/DOMKit/WebIDL/DOMTokenList.swift | 61 - Sources/DOMKit/WebIDL/DataTransfer.swift | 58 - Sources/DOMKit/WebIDL/DataTransferItem.swift | 29 - .../DOMKit/WebIDL/DataTransferItemList.swift | 42 - Sources/DOMKit/WebIDL/Document.swift | 352 - .../DocumentAndElementEventHandlers.swift | 22 - Sources/DOMKit/WebIDL/DocumentFragment.swift | 16 - .../DOMKit/WebIDL/DocumentOrShadowRoot.swift | 14 - .../DOMKit/WebIDL/DocumentReadyState.swift | 23 - Sources/DOMKit/WebIDL/DocumentTimeline.swift | 16 - .../WebIDL/DocumentTimelineOptions.swift | 20 - Sources/DOMKit/WebIDL/DocumentType.swift | 24 - .../WebIDL/DocumentVisibilityState.swift | 22 - .../Document_or_XMLHttpRequestBodyInit.swift | 46 - .../Double_or_KeyframeAnimationOptions.swift | 46 - .../Double_or_KeyframeEffectOptions.swift | 46 - Sources/DOMKit/WebIDL/Double_or_String.swift | 46 - Sources/DOMKit/WebIDL/DragEvent.swift | 20 - Sources/DOMKit/WebIDL/DragEventInit.swift | 20 - Sources/DOMKit/WebIDL/EffectTiming.swift | 50 - Sources/DOMKit/WebIDL/Element.swift | 177 - .../WebIDL/ElementContentEditable.swift | 24 - .../WebIDL/ElementCreationOptions.swift | 20 - .../ElementCreationOptions_or_String.swift | 46 - .../WebIDL/ElementDefinitionOptions.swift | 20 - Sources/DOMKit/WebIDL/ElementInternals.swift | 58 - .../WebIDL/Element_or_HTMLCollection.swift | 46 - .../WebIDL/Element_or_RadioNodeList.swift | 46 - Sources/DOMKit/WebIDL/Element_or_Text.swift | 46 - Sources/DOMKit/WebIDL/EndingType.swift | 22 - Sources/DOMKit/WebIDL/ErrorEvent.swift | 36 - Sources/DOMKit/WebIDL/ErrorEventInit.swift | 40 - Sources/DOMKit/WebIDL/Event.swift | 103 - Sources/DOMKit/WebIDL/EventInit.swift | 30 - .../DOMKit/WebIDL/EventListenerOptions.swift | 20 - Sources/DOMKit/WebIDL/EventModifierInit.swift | 85 - Sources/DOMKit/WebIDL/EventSource.swift | 51 - Sources/DOMKit/WebIDL/EventSourceInit.swift | 20 - Sources/DOMKit/WebIDL/EventTarget.swift | 27 - Sources/DOMKit/WebIDL/Event_or_String.swift | 46 - .../DOMKit/WebIDL/ExtendableEventInit.swift | 16 - Sources/DOMKit/WebIDL/External.swift | 24 - Sources/DOMKit/WebIDL/FetchEventInit.swift | 45 - Sources/DOMKit/WebIDL/File.swift | 24 - Sources/DOMKit/WebIDL/FileList.swift | 22 - Sources/DOMKit/WebIDL/FilePropertyBag.swift | 20 - Sources/DOMKit/WebIDL/FileReader.swift | 83 - .../WebIDL/File_or_FormData_or_String.swift | 60 - Sources/DOMKit/WebIDL/FillMode.swift | 25 - Sources/DOMKit/WebIDL/FocusEvent.swift | 20 - Sources/DOMKit/WebIDL/FocusEventInit.swift | 20 - Sources/DOMKit/WebIDL/FocusOptions.swift | 20 - Sources/DOMKit/WebIDL/FormData.swift | 63 - .../DOMKit/WebIDL/FormDataEntryValue.swift | 46 - Sources/DOMKit/WebIDL/FormDataEvent.swift | 20 - Sources/DOMKit/WebIDL/FormDataEventInit.swift | 20 - Sources/DOMKit/WebIDL/FrameType.swift | 24 - Sources/DOMKit/WebIDL/Generated.swift | 18510 ++++++++++++++++ .../WebIDL/GenericTransformStream.swift | 11 - .../DOMKit/WebIDL/GetAnimationsOptions.swift | 20 - .../DOMKit/WebIDL/GetRootNodeOptions.swift | 20 - .../DOMKit/WebIDL/GlobalEventHandlers.swift | 347 - Sources/DOMKit/WebIDL/HTMLAllCollection.swift | 31 - Sources/DOMKit/WebIDL/HTMLAnchorElement.swift | 72 - Sources/DOMKit/WebIDL/HTMLAreaElement.swift | 56 - Sources/DOMKit/WebIDL/HTMLAudioElement.swift | 16 - Sources/DOMKit/WebIDL/HTMLBRElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLBaseElement.swift | 24 - Sources/DOMKit/WebIDL/HTMLBodyElement.swift | 40 - Sources/DOMKit/WebIDL/HTMLButtonElement.swift | 87 - Sources/DOMKit/WebIDL/HTMLCanvasElement.swift | 41 - ...HTMLCanvasElement_or_OffscreenCanvas.swift | 46 - Sources/DOMKit/WebIDL/HTMLCollection.swift | 26 - Sources/DOMKit/WebIDL/HTMLDListElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLDataElement.swift | 20 - .../DOMKit/WebIDL/HTMLDataListElement.swift | 20 - .../DOMKit/WebIDL/HTMLDetailsElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLDialogElement.swift | 39 - .../DOMKit/WebIDL/HTMLDirectoryElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLDivElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLElement.swift | 78 - .../DOMKit/WebIDL/HTMLElement_or_Int32.swift | 46 - Sources/DOMKit/WebIDL/HTMLEmbedElement.swift | 45 - .../DOMKit/WebIDL/HTMLFieldSetElement.swift | 63 - Sources/DOMKit/WebIDL/HTMLFontElement.swift | 28 - .../WebIDL/HTMLFormControlsCollection.swift | 16 - Sources/DOMKit/WebIDL/HTMLFormElement.swift | 101 - Sources/DOMKit/WebIDL/HTMLFrameElement.swift | 56 - .../DOMKit/WebIDL/HTMLFrameSetElement.swift | 24 - Sources/DOMKit/WebIDL/HTMLHRElement.swift | 36 - Sources/DOMKit/WebIDL/HTMLHeadElement.swift | 16 - .../DOMKit/WebIDL/HTMLHeadingElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLHtmlElement.swift | 20 - .../WebIDL/HTMLHyperlinkElementUtils.swift | 59 - Sources/DOMKit/WebIDL/HTMLIFrameElement.swift | 93 - Sources/DOMKit/WebIDL/HTMLImageElement.swift | 120 - Sources/DOMKit/WebIDL/HTMLInputElement.swift | 246 - Sources/DOMKit/WebIDL/HTMLLIElement.swift | 24 - Sources/DOMKit/WebIDL/HTMLLabelElement.swift | 28 - Sources/DOMKit/WebIDL/HTMLLegendElement.swift | 24 - Sources/DOMKit/WebIDL/HTMLLinkElement.swift | 88 - Sources/DOMKit/WebIDL/HTMLMapElement.swift | 24 - .../DOMKit/WebIDL/HTMLMarqueeElement.swift | 70 - Sources/DOMKit/WebIDL/HTMLMediaElement.swift | 182 - Sources/DOMKit/WebIDL/HTMLMenuElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLMetaElement.swift | 36 - Sources/DOMKit/WebIDL/HTMLMeterElement.swift | 44 - Sources/DOMKit/WebIDL/HTMLModElement.swift | 24 - Sources/DOMKit/WebIDL/HTMLOListElement.swift | 32 - Sources/DOMKit/WebIDL/HTMLObjectElement.swift | 124 - .../DOMKit/WebIDL/HTMLOptGroupElement.swift | 24 - ...OptGroupElement_or_HTMLOptionElement.swift | 46 - Sources/DOMKit/WebIDL/HTMLOptionElement.swift | 48 - .../DOMKit/WebIDL/HTMLOptionsCollection.swift | 35 - Sources/DOMKit/WebIDL/HTMLOrSVGElement.swift | 34 - Sources/DOMKit/WebIDL/HTMLOutputElement.swift | 71 - .../DOMKit/WebIDL/HTMLParagraphElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLParamElement.swift | 32 - .../DOMKit/WebIDL/HTMLPictureElement.swift | 16 - Sources/DOMKit/WebIDL/HTMLPreElement.swift | 20 - .../DOMKit/WebIDL/HTMLProgressElement.swift | 32 - Sources/DOMKit/WebIDL/HTMLQuoteElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLScriptElement.swift | 73 - Sources/DOMKit/WebIDL/HTMLSelectElement.swift | 125 - Sources/DOMKit/WebIDL/HTMLSlotElement.swift | 35 - Sources/DOMKit/WebIDL/HTMLSourceElement.swift | 44 - Sources/DOMKit/WebIDL/HTMLSpanElement.swift | 16 - Sources/DOMKit/WebIDL/HTMLStyleElement.swift | 28 - .../WebIDL/HTMLTableCaptionElement.swift | 20 - .../DOMKit/WebIDL/HTMLTableCellElement.swift | 76 - .../DOMKit/WebIDL/HTMLTableColElement.swift | 40 - Sources/DOMKit/WebIDL/HTMLTableElement.swift | 117 - .../DOMKit/WebIDL/HTMLTableRowElement.swift | 58 - .../WebIDL/HTMLTableSectionElement.swift | 46 - .../DOMKit/WebIDL/HTMLTemplateElement.swift | 20 - .../DOMKit/WebIDL/HTMLTextAreaElement.swift | 147 - Sources/DOMKit/WebIDL/HTMLTimeElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLTitleElement.swift | 20 - Sources/DOMKit/WebIDL/HTMLTrackElement.swift | 52 - Sources/DOMKit/WebIDL/HTMLUListElement.swift | 24 - .../DOMKit/WebIDL/HTMLUnknownElement.swift | 12 - Sources/DOMKit/WebIDL/HTMLVideoElement.swift | 40 - Sources/DOMKit/WebIDL/HashChangeEvent.swift | 24 - .../DOMKit/WebIDL/HashChangeEventInit.swift | 25 - Sources/DOMKit/WebIDL/Headers.swift | 48 - Sources/DOMKit/WebIDL/HeadersInit.swift | 46 - Sources/DOMKit/WebIDL/History.swift | 51 - Sources/DOMKit/WebIDL/ImageBitmap.swift | 27 - .../DOMKit/WebIDL/ImageBitmapOptions.swift | 45 - .../WebIDL/ImageBitmapRenderingContext.swift | 23 - .../ImageBitmapRenderingContextSettings.swift | 20 - Sources/DOMKit/WebIDL/ImageBitmapSource.swift | 60 - Sources/DOMKit/WebIDL/ImageData.swift | 38 - Sources/DOMKit/WebIDL/ImageDataSettings.swift | 20 - .../DOMKit/WebIDL/ImageEncodeOptions.swift | 25 - Sources/DOMKit/WebIDL/ImageOrientation.swift | 22 - .../DOMKit/WebIDL/ImageSmoothingQuality.swift | 23 - Sources/DOMKit/WebIDL/InputEvent.swift | 28 - Sources/DOMKit/WebIDL/InputEventInit.swift | 30 - Sources/DOMKit/WebIDL/KeyboardEvent.swift | 88 - Sources/DOMKit/WebIDL/KeyboardEventInit.swift | 50 - .../WebIDL/KeyframeAnimationOptions.swift | 25 - Sources/DOMKit/WebIDL/KeyframeEffect.swift | 42 - .../DOMKit/WebIDL/KeyframeEffectOptions.swift | 25 - Sources/DOMKit/WebIDL/Location.swift | 69 - Sources/DOMKit/WebIDL/MediaError.swift | 30 - Sources/DOMKit/WebIDL/MessageChannel.swift | 26 - Sources/DOMKit/WebIDL/MessageEvent.swift | 49 - Sources/DOMKit/WebIDL/MessageEventInit.swift | 40 - .../DOMKit/WebIDL/MessageEventSource.swift | 60 - Sources/DOMKit/WebIDL/MessagePort.swift | 40 - Sources/DOMKit/WebIDL/MimeType.swift | 30 - Sources/DOMKit/WebIDL/MimeTypeArray.swift | 26 - Sources/DOMKit/WebIDL/MouseEvent.swift | 85 - Sources/DOMKit/WebIDL/MouseEventInit.swift | 50 - .../WebIDL/MultiCacheQueryOptions.swift | 20 - Sources/DOMKit/WebIDL/MutationEvent.swift | 51 - Sources/DOMKit/WebIDL/MutationObserver.swift | 31 - .../DOMKit/WebIDL/MutationObserverInit.swift | 50 - Sources/DOMKit/WebIDL/MutationRecord.swift | 50 - Sources/DOMKit/WebIDL/NamedNodeMap.swift | 51 - .../WebIDL/NavigationPreloadManager.swift | 62 - .../WebIDL/NavigationPreloadState.swift | 25 - Sources/DOMKit/WebIDL/Navigator.swift | 18 - .../WebIDL/NavigatorConcurrentHardware.swift | 9 - .../DOMKit/WebIDL/NavigatorContentUtils.swift | 17 - Sources/DOMKit/WebIDL/NavigatorCookies.swift | 9 - Sources/DOMKit/WebIDL/NavigatorID.swift | 32 - Sources/DOMKit/WebIDL/NavigatorLanguage.swift | 11 - Sources/DOMKit/WebIDL/NavigatorOnLine.swift | 9 - Sources/DOMKit/WebIDL/NavigatorPlugins.swift | 18 - Sources/DOMKit/WebIDL/Node.swift | 179 - Sources/DOMKit/WebIDL/NodeIterator.swift | 47 - Sources/DOMKit/WebIDL/NodeList.swift | 27 - Sources/DOMKit/WebIDL/Node_or_String.swift | 46 - .../WebIDL/NonDocumentTypeChildNode.swift | 11 - .../DOMKit/WebIDL/NonElementParentNode.swift | 12 - Sources/DOMKit/WebIDL/OffscreenCanvas.swift | 54 - .../OffscreenCanvasRenderingContext2D.swift | 23 - .../WebIDL/OffscreenRenderingContextId.swift | 25 - .../DOMKit/WebIDL/OptionalEffectTiming.swift | 55 - .../DOMKit/WebIDL/PageTransitionEvent.swift | 20 - .../WebIDL/PageTransitionEventInit.swift | 20 - Sources/DOMKit/WebIDL/ParentNode.swift | 40 - Sources/DOMKit/WebIDL/Path2D.swift | 23 - Sources/DOMKit/WebIDL/Path2D_or_String.swift | 46 - Sources/DOMKit/WebIDL/Performance.swift | 26 - Sources/DOMKit/WebIDL/PlaybackDirection.swift | 24 - Sources/DOMKit/WebIDL/Plugin.swift | 38 - Sources/DOMKit/WebIDL/PluginArray.swift | 31 - Sources/DOMKit/WebIDL/PopStateEvent.swift | 20 - Sources/DOMKit/WebIDL/PopStateEventInit.swift | 20 - .../DOMKit/WebIDL/PredefinedColorSpace.swift | 22 - Sources/DOMKit/WebIDL/PremultiplyAlpha.swift | 23 - .../DOMKit/WebIDL/ProcessingInstruction.swift | 16 - Sources/DOMKit/WebIDL/ProgressEvent.swift | 28 - Sources/DOMKit/WebIDL/ProgressEventInit.swift | 30 - .../DOMKit/WebIDL/PromiseRejectionEvent.swift | 24 - .../WebIDL/PromiseRejectionEventInit.swift | 25 - Sources/DOMKit/WebIDL/QueuingStrategy.swift | 25 - .../DOMKit/WebIDL/QueuingStrategyInit.swift | 20 - Sources/DOMKit/WebIDL/RadioNodeList.swift | 16 - Sources/DOMKit/WebIDL/Range.swift | 132 - .../WebIDL/ReadableByteStreamController.swift | 37 - Sources/DOMKit/WebIDL/ReadableStream.swift | 67 - .../WebIDL/ReadableStreamBYOBReadResult.swift | 25 - .../WebIDL/ReadableStreamBYOBReader.swift | 35 - .../WebIDL/ReadableStreamBYOBRequest.swift | 28 - .../WebIDL/ReadableStreamController.swift | 46 - .../ReadableStreamDefaultController.swift | 33 - .../ReadableStreamDefaultReadResult.swift | 25 - .../WebIDL/ReadableStreamDefaultReader.swift | 35 - .../WebIDL/ReadableStreamGenericReader.swift | 21 - .../ReadableStreamGetReaderOptions.swift | 20 - .../ReadableStreamIteratorOptions.swift | 20 - .../DOMKit/WebIDL/ReadableStreamReader.swift | 46 - .../WebIDL/ReadableStreamReaderMode.swift | 21 - .../DOMKit/WebIDL/ReadableStreamType.swift | 21 - .../DOMKit/WebIDL/ReadableWritablePair.swift | 25 - Sources/DOMKit/WebIDL/ReferrerPolicy.swift | 29 - .../DOMKit/WebIDL/RegistrationOptions.swift | 30 - Sources/DOMKit/WebIDL/Request.swift | 83 - Sources/DOMKit/WebIDL/RequestCache.swift | 26 - .../DOMKit/WebIDL/RequestCredentials.swift | 23 - .../DOMKit/WebIDL/RequestDestination.swift | 40 - Sources/DOMKit/WebIDL/RequestInfo.swift | 46 - Sources/DOMKit/WebIDL/RequestInit.swift | 80 - Sources/DOMKit/WebIDL/RequestMode.swift | 24 - Sources/DOMKit/WebIDL/RequestRedirect.swift | 23 - Sources/DOMKit/WebIDL/ResizeQuality.swift | 24 - Sources/DOMKit/WebIDL/Response.swift | 61 - Sources/DOMKit/WebIDL/ResponseInit.swift | 30 - Sources/DOMKit/WebIDL/ResponseType.swift | 26 - Sources/DOMKit/WebIDL/ScrollRestoration.swift | 22 - Sources/DOMKit/WebIDL/SelectionMode.swift | 24 - Sources/DOMKit/WebIDL/ServiceWorker.swift | 34 - .../WebIDL/ServiceWorkerContainer.swift | 73 - .../WebIDL/ServiceWorkerRegistration.swift | 64 - .../DOMKit/WebIDL/ServiceWorkerState.swift | 26 - .../WebIDL/ServiceWorkerUpdateViaCache.swift | 23 - Sources/DOMKit/WebIDL/ShadowRoot.swift | 32 - Sources/DOMKit/WebIDL/ShadowRootInit.swift | 30 - Sources/DOMKit/WebIDL/ShadowRootMode.swift | 22 - Sources/DOMKit/WebIDL/SharedWorker.swift | 20 - .../DOMKit/WebIDL/SlotAssignmentMode.swift | 22 - Sources/DOMKit/WebIDL/Slottable.swift | 9 - Sources/DOMKit/WebIDL/StaticRange.swift | 16 - Sources/DOMKit/WebIDL/StaticRangeInit.swift | 35 - Sources/DOMKit/WebIDL/Storage.swift | 36 - Sources/DOMKit/WebIDL/StorageEvent.swift | 49 - Sources/DOMKit/WebIDL/StorageEventInit.swift | 40 - Sources/DOMKit/WebIDL/StreamPipeOptions.swift | 35 - .../WebIDL/String_or_WorkerOptions.swift | 46 - ...ng_to_String_or_seq_of_seq_of_String.swift | 60 - .../WebIDL/String_or_seq_of_Double.swift | 46 - .../WebIDL/String_or_seq_of_String.swift | 46 - Sources/DOMKit/WebIDL/Strings.swift | 1437 -- .../WebIDL/StructuredSerializeOptions.swift | 20 - Sources/DOMKit/WebIDL/SubmitEvent.swift | 20 - Sources/DOMKit/WebIDL/SubmitEventInit.swift | 20 - Sources/DOMKit/WebIDL/Text.swift | 25 - Sources/DOMKit/WebIDL/TextMetrics.swift | 62 - Sources/DOMKit/WebIDL/TextTrack.swift | 58 - Sources/DOMKit/WebIDL/TextTrackCue.swift | 40 - Sources/DOMKit/WebIDL/TextTrackCueList.swift | 27 - Sources/DOMKit/WebIDL/TextTrackKind.swift | 25 - Sources/DOMKit/WebIDL/TextTrackList.swift | 37 - Sources/DOMKit/WebIDL/TextTrackMode.swift | 23 - Sources/DOMKit/WebIDL/TimeRanges.swift | 28 - Sources/DOMKit/WebIDL/TimelinePhase.swift | 24 - Sources/DOMKit/WebIDL/TimerHandler.swift | 46 - Sources/DOMKit/WebIDL/TrackEvent.swift | 20 - Sources/DOMKit/WebIDL/TrackEventInit.swift | 20 - Sources/DOMKit/WebIDL/TransformStream.swift | 26 - .../TransformStreamDefaultController.swift | 33 - Sources/DOMKit/WebIDL/Transformer.swift | 40 - Sources/DOMKit/WebIDL/TreeWalker.swift | 63 - Sources/DOMKit/WebIDL/Typedefs.swift | 35 - Sources/DOMKit/WebIDL/UIEvent.swift | 33 - Sources/DOMKit/WebIDL/UIEventInit.swift | 30 - Sources/DOMKit/WebIDL/URL.swift | 81 - Sources/DOMKit/WebIDL/URLSearchParams.swift | 62 - Sources/DOMKit/WebIDL/UnderlyingSink.swift | 40 - Sources/DOMKit/WebIDL/UnderlyingSource.swift | 40 - Sources/DOMKit/WebIDL/ValidityState.swift | 58 - .../DOMKit/WebIDL/ValidityStateFlags.swift | 65 - Sources/DOMKit/WebIDL/VideoTrack.swift | 34 - Sources/DOMKit/WebIDL/VideoTrackList.swift | 41 - Sources/DOMKit/WebIDL/WheelEvent.swift | 38 - Sources/DOMKit/WebIDL/WheelEventInit.swift | 35 - Sources/DOMKit/WebIDL/Window.swift | 190 - .../DOMKit/WebIDL/WindowEventHandlers.swift | 87 - .../DOMKit/WebIDL/WindowLocalStorage.swift | 9 - .../WebIDL/WindowOrWorkerGlobalScope.swift | 107 - .../WebIDL/WindowPostMessageOptions.swift | 20 - .../DOMKit/WebIDL/WindowSessionStorage.swift | 9 - Sources/DOMKit/WebIDL/Worker.swift | 39 - Sources/DOMKit/WebIDL/WorkerOptions.swift | 30 - Sources/DOMKit/WebIDL/WorkerType.swift | 22 - Sources/DOMKit/WebIDL/Worklet.swift | 26 - Sources/DOMKit/WebIDL/WorkletOptions.swift | 20 - Sources/DOMKit/WebIDL/WritableStream.swift | 51 - .../WritableStreamDefaultController.swift | 23 - .../WebIDL/WritableStreamDefaultWriter.swift | 71 - Sources/DOMKit/WebIDL/XMLDocument.swift | 12 - Sources/DOMKit/WebIDL/XMLHttpRequest.swift | 114 - .../WebIDL/XMLHttpRequestBodyInit.swift | 88 - .../WebIDL/XMLHttpRequestEventTarget.swift | 40 - .../WebIDL/XMLHttpRequestResponseType.swift | 26 - .../DOMKit/WebIDL/XMLHttpRequestUpload.swift | 12 - Sources/DOMKit/WebIDL/XPathEvaluator.swift | 18 - .../DOMKit/WebIDL/XPathEvaluatorBase.swift | 13 - Sources/DOMKit/WebIDL/XPathExpression.swift | 19 - Sources/DOMKit/WebIDL/XPathResult.swift | 72 - Sources/DOMKit/WebIDL/XSLTProcessor.swift | 58 - Sources/DOMKit/WebIDL/console.swift | 105 - ...ble_Double_or_seq_of_nullable_Double.swift | 46 - Sources/WebIDLToSwift/IDLBuilder.swift | 40 +- Sources/WebIDLToSwift/MergeDeclarations.swift | 4 +- Sources/WebIDLToSwift/main.swift | 12 +- 448 files changed, 18539 insertions(+), 20310 deletions(-) delete mode 100644 Sources/DOMKit/WebIDL/ARIAMixin.swift delete mode 100644 Sources/DOMKit/WebIDL/AbortController.swift delete mode 100644 Sources/DOMKit/WebIDL/AbortSignal.swift delete mode 100644 Sources/DOMKit/WebIDL/AbstractRange.swift delete mode 100644 Sources/DOMKit/WebIDL/AbstractWorker.swift delete mode 100644 Sources/DOMKit/WebIDL/AddEventListenerOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/Animatable.swift delete mode 100644 Sources/DOMKit/WebIDL/Animation.swift delete mode 100644 Sources/DOMKit/WebIDL/AnimationEffect.swift delete mode 100644 Sources/DOMKit/WebIDL/AnimationFrameProvider.swift delete mode 100644 Sources/DOMKit/WebIDL/AnimationPlayState.swift delete mode 100644 Sources/DOMKit/WebIDL/AnimationReplaceState.swift delete mode 100644 Sources/DOMKit/WebIDL/AnimationTimeline.swift delete mode 100644 Sources/DOMKit/WebIDL/ArrayBuffer_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/AssignedNodesOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/Attr.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioTrack_or_TextTrack_or_VideoTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/BarProp.swift delete mode 100644 Sources/DOMKit/WebIDL/BaseComputedKeyframe.swift delete mode 100644 Sources/DOMKit/WebIDL/BaseKeyframe.swift delete mode 100644 Sources/DOMKit/WebIDL/BasePropertyIndexedKeyframe.swift delete mode 100644 Sources/DOMKit/WebIDL/BeforeUnloadEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/Blob.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobPart.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobPropertyBag.swift delete mode 100644 Sources/DOMKit/WebIDL/Body.swift delete mode 100644 Sources/DOMKit/WebIDL/BroadcastChannel.swift delete mode 100644 Sources/DOMKit/WebIDL/BufferSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ByteLengthQueuingStrategy.swift delete mode 100644 Sources/DOMKit/WebIDL/CDATASection.swift delete mode 100644 Sources/DOMKit/WebIDL/Cache.swift delete mode 100644 Sources/DOMKit/WebIDL/CacheQueryOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/CacheStorage.swift delete mode 100644 Sources/DOMKit/WebIDL/CanPlayTypeResult.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasCompositing.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasDirection.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasDrawImage.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasDrawPath.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFillRule.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFillStrokeStyles.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFilter.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFilterInput_or_seq_of_CanvasFilterInput.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFilter_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFilters.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFontKerning.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFontStretch.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasFontVariantCaps.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasGradient.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasGradient_or_CanvasPattern_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasImageData.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasImageSmoothing.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasLineCap.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasLineJoin.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasPath.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasPathDrawingStyles.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasPattern.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasRect.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasRenderingContext2D.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasRenderingContext2DSettings.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasShadowStyles.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasState.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasText.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasTextAlign.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasTextBaseline.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasTextDrawingStyles.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasTextRendering.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasTransform.swift delete mode 100644 Sources/DOMKit/WebIDL/CanvasUserInterface.swift delete mode 100644 Sources/DOMKit/WebIDL/CharacterData.swift delete mode 100644 Sources/DOMKit/WebIDL/ChildNode.swift delete mode 100644 Sources/DOMKit/WebIDL/ClientQueryOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ClientType.swift delete mode 100644 Sources/DOMKit/WebIDL/ClosureAttribute.swift delete mode 100644 Sources/DOMKit/WebIDL/ColorSpaceConversion.swift delete mode 100644 Sources/DOMKit/WebIDL/Comment.swift delete mode 100644 Sources/DOMKit/WebIDL/CompositeOperation.swift delete mode 100644 Sources/DOMKit/WebIDL/CompositeOperationOrAuto.swift delete mode 100644 Sources/DOMKit/WebIDL/CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto.swift delete mode 100644 Sources/DOMKit/WebIDL/CompositionEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/CompositionEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ComputedEffectTiming.swift delete mode 100644 Sources/DOMKit/WebIDL/CountQueuingStrategy.swift delete mode 100644 Sources/DOMKit/WebIDL/CustomElementRegistry.swift delete mode 100644 Sources/DOMKit/WebIDL/CustomEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/CustomEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMException.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMImplementation.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMMatrix.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMMatrix2DInit.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMMatrixInit.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMMatrixReadOnly.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMParser.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMParserSupportedType.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMPoint.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMPointInit.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMPointInit_or_Double.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMPointReadOnly.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMQuad.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMQuadInit.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMRect.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMRectInit.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMRectList.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMRectReadOnly.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMStringList.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMStringMap.swift delete mode 100644 Sources/DOMKit/WebIDL/DOMTokenList.swift delete mode 100644 Sources/DOMKit/WebIDL/DataTransfer.swift delete mode 100644 Sources/DOMKit/WebIDL/DataTransferItem.swift delete mode 100644 Sources/DOMKit/WebIDL/DataTransferItemList.swift delete mode 100644 Sources/DOMKit/WebIDL/Document.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentAndElementEventHandlers.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentFragment.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentOrShadowRoot.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentReadyState.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentTimeline.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentTimelineOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentType.swift delete mode 100644 Sources/DOMKit/WebIDL/DocumentVisibilityState.swift delete mode 100644 Sources/DOMKit/WebIDL/Document_or_XMLHttpRequestBodyInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Double_or_KeyframeAnimationOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/Double_or_KeyframeEffectOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/Double_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/DragEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/DragEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EffectTiming.swift delete mode 100644 Sources/DOMKit/WebIDL/Element.swift delete mode 100644 Sources/DOMKit/WebIDL/ElementContentEditable.swift delete mode 100644 Sources/DOMKit/WebIDL/ElementCreationOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ElementCreationOptions_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/ElementDefinitionOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ElementInternals.swift delete mode 100644 Sources/DOMKit/WebIDL/Element_or_HTMLCollection.swift delete mode 100644 Sources/DOMKit/WebIDL/Element_or_RadioNodeList.swift delete mode 100644 Sources/DOMKit/WebIDL/Element_or_Text.swift delete mode 100644 Sources/DOMKit/WebIDL/EndingType.swift delete mode 100644 Sources/DOMKit/WebIDL/ErrorEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/ErrorEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Event.swift delete mode 100644 Sources/DOMKit/WebIDL/EventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EventListenerOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/EventModifierInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EventSource.swift delete mode 100644 Sources/DOMKit/WebIDL/EventSourceInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EventTarget.swift delete mode 100644 Sources/DOMKit/WebIDL/Event_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/ExtendableEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/External.swift delete mode 100644 Sources/DOMKit/WebIDL/FetchEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/File.swift delete mode 100644 Sources/DOMKit/WebIDL/FileList.swift delete mode 100644 Sources/DOMKit/WebIDL/FilePropertyBag.swift delete mode 100644 Sources/DOMKit/WebIDL/FileReader.swift delete mode 100644 Sources/DOMKit/WebIDL/File_or_FormData_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/FillMode.swift delete mode 100644 Sources/DOMKit/WebIDL/FocusEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/FocusEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/FocusOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/FormData.swift delete mode 100644 Sources/DOMKit/WebIDL/FormDataEntryValue.swift delete mode 100644 Sources/DOMKit/WebIDL/FormDataEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/FormDataEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/FrameType.swift create mode 100644 Sources/DOMKit/WebIDL/Generated.swift delete mode 100644 Sources/DOMKit/WebIDL/GenericTransformStream.swift delete mode 100644 Sources/DOMKit/WebIDL/GetAnimationsOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/GetRootNodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/GlobalEventHandlers.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLAllCollection.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLAnchorElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLAreaElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLAudioElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLBRElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLBaseElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLBodyElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLButtonElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLCanvasElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLCanvasElement_or_OffscreenCanvas.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLCollection.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDListElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDataElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDataListElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDetailsElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDialogElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDirectoryElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLDivElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLElement_or_Int32.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLEmbedElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLFieldSetElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLFontElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLFormControlsCollection.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLFormElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLFrameElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLFrameSetElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLHRElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLHeadElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLHeadingElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLHtmlElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLHyperlinkElementUtils.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLIFrameElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLImageElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLInputElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLLIElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLLabelElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLLegendElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLLinkElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLMapElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLMarqueeElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLMediaElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLMenuElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLMetaElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLMeterElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLModElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOListElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLObjectElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOptGroupElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOptGroupElement_or_HTMLOptionElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOptionElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOptionsCollection.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOrSVGElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLOutputElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLParagraphElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLParamElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLPictureElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLPreElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLProgressElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLQuoteElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLScriptElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLSelectElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLSlotElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLSourceElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLSpanElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLStyleElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTableCaptionElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTableCellElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTableColElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTableElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTableRowElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTableSectionElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTemplateElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTextAreaElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTimeElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTitleElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLTrackElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLUListElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLUnknownElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HTMLVideoElement.swift delete mode 100644 Sources/DOMKit/WebIDL/HashChangeEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/HashChangeEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Headers.swift delete mode 100644 Sources/DOMKit/WebIDL/HeadersInit.swift delete mode 100644 Sources/DOMKit/WebIDL/History.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBitmap.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBitmapOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBitmapRenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBitmapRenderingContextSettings.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBitmapSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageData.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDataSettings.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageEncodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageOrientation.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageSmoothingQuality.swift delete mode 100644 Sources/DOMKit/WebIDL/InputEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/InputEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/KeyboardEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/KeyboardEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/KeyframeAnimationOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/KeyframeEffect.swift delete mode 100644 Sources/DOMKit/WebIDL/KeyframeEffectOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/Location.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaError.swift delete mode 100644 Sources/DOMKit/WebIDL/MessageChannel.swift delete mode 100644 Sources/DOMKit/WebIDL/MessageEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MessageEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MessageEventSource.swift delete mode 100644 Sources/DOMKit/WebIDL/MessagePort.swift delete mode 100644 Sources/DOMKit/WebIDL/MimeType.swift delete mode 100644 Sources/DOMKit/WebIDL/MimeTypeArray.swift delete mode 100644 Sources/DOMKit/WebIDL/MouseEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MouseEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MultiCacheQueryOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/MutationEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MutationObserver.swift delete mode 100644 Sources/DOMKit/WebIDL/MutationObserverInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MutationRecord.swift delete mode 100644 Sources/DOMKit/WebIDL/NamedNodeMap.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigationPreloadManager.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigationPreloadState.swift delete mode 100644 Sources/DOMKit/WebIDL/Navigator.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorConcurrentHardware.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorContentUtils.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorCookies.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorID.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorLanguage.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorOnLine.swift delete mode 100644 Sources/DOMKit/WebIDL/NavigatorPlugins.swift delete mode 100644 Sources/DOMKit/WebIDL/Node.swift delete mode 100644 Sources/DOMKit/WebIDL/NodeIterator.swift delete mode 100644 Sources/DOMKit/WebIDL/NodeList.swift delete mode 100644 Sources/DOMKit/WebIDL/Node_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/NonDocumentTypeChildNode.swift delete mode 100644 Sources/DOMKit/WebIDL/NonElementParentNode.swift delete mode 100644 Sources/DOMKit/WebIDL/OffscreenCanvas.swift delete mode 100644 Sources/DOMKit/WebIDL/OffscreenCanvasRenderingContext2D.swift delete mode 100644 Sources/DOMKit/WebIDL/OffscreenRenderingContextId.swift delete mode 100644 Sources/DOMKit/WebIDL/OptionalEffectTiming.swift delete mode 100644 Sources/DOMKit/WebIDL/PageTransitionEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/PageTransitionEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ParentNode.swift delete mode 100644 Sources/DOMKit/WebIDL/Path2D.swift delete mode 100644 Sources/DOMKit/WebIDL/Path2D_or_String.swift delete mode 100644 Sources/DOMKit/WebIDL/Performance.swift delete mode 100644 Sources/DOMKit/WebIDL/PlaybackDirection.swift delete mode 100644 Sources/DOMKit/WebIDL/Plugin.swift delete mode 100644 Sources/DOMKit/WebIDL/PluginArray.swift delete mode 100644 Sources/DOMKit/WebIDL/PopStateEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/PopStateEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/PredefinedColorSpace.swift delete mode 100644 Sources/DOMKit/WebIDL/PremultiplyAlpha.swift delete mode 100644 Sources/DOMKit/WebIDL/ProcessingInstruction.swift delete mode 100644 Sources/DOMKit/WebIDL/ProgressEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/ProgressEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/PromiseRejectionEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/PromiseRejectionEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/QueuingStrategy.swift delete mode 100644 Sources/DOMKit/WebIDL/QueuingStrategyInit.swift delete mode 100644 Sources/DOMKit/WebIDL/RadioNodeList.swift delete mode 100644 Sources/DOMKit/WebIDL/Range.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableByteStreamController.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStream.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamBYOBReadResult.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamBYOBReader.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamBYOBRequest.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamController.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamDefaultController.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamDefaultReadResult.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamDefaultReader.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamGenericReader.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamGetReaderOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamIteratorOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamReader.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamReaderMode.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableStreamType.swift delete mode 100644 Sources/DOMKit/WebIDL/ReadableWritablePair.swift delete mode 100644 Sources/DOMKit/WebIDL/ReferrerPolicy.swift delete mode 100644 Sources/DOMKit/WebIDL/RegistrationOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/Request.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestCache.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestCredentials.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestDestination.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestInit.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestMode.swift delete mode 100644 Sources/DOMKit/WebIDL/RequestRedirect.swift delete mode 100644 Sources/DOMKit/WebIDL/ResizeQuality.swift delete mode 100644 Sources/DOMKit/WebIDL/Response.swift delete mode 100644 Sources/DOMKit/WebIDL/ResponseInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ResponseType.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollRestoration.swift delete mode 100644 Sources/DOMKit/WebIDL/SelectionMode.swift delete mode 100644 Sources/DOMKit/WebIDL/ServiceWorker.swift delete mode 100644 Sources/DOMKit/WebIDL/ServiceWorkerContainer.swift delete mode 100644 Sources/DOMKit/WebIDL/ServiceWorkerRegistration.swift delete mode 100644 Sources/DOMKit/WebIDL/ServiceWorkerState.swift delete mode 100644 Sources/DOMKit/WebIDL/ServiceWorkerUpdateViaCache.swift delete mode 100644 Sources/DOMKit/WebIDL/ShadowRoot.swift delete mode 100644 Sources/DOMKit/WebIDL/ShadowRootInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ShadowRootMode.swift delete mode 100644 Sources/DOMKit/WebIDL/SharedWorker.swift delete mode 100644 Sources/DOMKit/WebIDL/SlotAssignmentMode.swift delete mode 100644 Sources/DOMKit/WebIDL/Slottable.swift delete mode 100644 Sources/DOMKit/WebIDL/StaticRange.swift delete mode 100644 Sources/DOMKit/WebIDL/StaticRangeInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Storage.swift delete mode 100644 Sources/DOMKit/WebIDL/StorageEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/StorageEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/StreamPipeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/String_or_WorkerOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/String_or_record_String_to_String_or_seq_of_seq_of_String.swift delete mode 100644 Sources/DOMKit/WebIDL/String_or_seq_of_Double.swift delete mode 100644 Sources/DOMKit/WebIDL/String_or_seq_of_String.swift delete mode 100644 Sources/DOMKit/WebIDL/Strings.swift delete mode 100644 Sources/DOMKit/WebIDL/StructuredSerializeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/SubmitEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/SubmitEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Text.swift delete mode 100644 Sources/DOMKit/WebIDL/TextMetrics.swift delete mode 100644 Sources/DOMKit/WebIDL/TextTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/TextTrackCue.swift delete mode 100644 Sources/DOMKit/WebIDL/TextTrackCueList.swift delete mode 100644 Sources/DOMKit/WebIDL/TextTrackKind.swift delete mode 100644 Sources/DOMKit/WebIDL/TextTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/TextTrackMode.swift delete mode 100644 Sources/DOMKit/WebIDL/TimeRanges.swift delete mode 100644 Sources/DOMKit/WebIDL/TimelinePhase.swift delete mode 100644 Sources/DOMKit/WebIDL/TimerHandler.swift delete mode 100644 Sources/DOMKit/WebIDL/TrackEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/TrackEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/TransformStream.swift delete mode 100644 Sources/DOMKit/WebIDL/TransformStreamDefaultController.swift delete mode 100644 Sources/DOMKit/WebIDL/Transformer.swift delete mode 100644 Sources/DOMKit/WebIDL/TreeWalker.swift delete mode 100644 Sources/DOMKit/WebIDL/Typedefs.swift delete mode 100644 Sources/DOMKit/WebIDL/UIEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/UIEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/URL.swift delete mode 100644 Sources/DOMKit/WebIDL/URLSearchParams.swift delete mode 100644 Sources/DOMKit/WebIDL/UnderlyingSink.swift delete mode 100644 Sources/DOMKit/WebIDL/UnderlyingSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ValidityState.swift delete mode 100644 Sources/DOMKit/WebIDL/ValidityStateFlags.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/WheelEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/WheelEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Window.swift delete mode 100644 Sources/DOMKit/WebIDL/WindowEventHandlers.swift delete mode 100644 Sources/DOMKit/WebIDL/WindowLocalStorage.swift delete mode 100644 Sources/DOMKit/WebIDL/WindowOrWorkerGlobalScope.swift delete mode 100644 Sources/DOMKit/WebIDL/WindowPostMessageOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/WindowSessionStorage.swift delete mode 100644 Sources/DOMKit/WebIDL/Worker.swift delete mode 100644 Sources/DOMKit/WebIDL/WorkerOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/WorkerType.swift delete mode 100644 Sources/DOMKit/WebIDL/Worklet.swift delete mode 100644 Sources/DOMKit/WebIDL/WorkletOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/WritableStream.swift delete mode 100644 Sources/DOMKit/WebIDL/WritableStreamDefaultController.swift delete mode 100644 Sources/DOMKit/WebIDL/WritableStreamDefaultWriter.swift delete mode 100644 Sources/DOMKit/WebIDL/XMLDocument.swift delete mode 100644 Sources/DOMKit/WebIDL/XMLHttpRequest.swift delete mode 100644 Sources/DOMKit/WebIDL/XMLHttpRequestBodyInit.swift delete mode 100644 Sources/DOMKit/WebIDL/XMLHttpRequestEventTarget.swift delete mode 100644 Sources/DOMKit/WebIDL/XMLHttpRequestResponseType.swift delete mode 100644 Sources/DOMKit/WebIDL/XMLHttpRequestUpload.swift delete mode 100644 Sources/DOMKit/WebIDL/XPathEvaluator.swift delete mode 100644 Sources/DOMKit/WebIDL/XPathEvaluatorBase.swift delete mode 100644 Sources/DOMKit/WebIDL/XPathExpression.swift delete mode 100644 Sources/DOMKit/WebIDL/XPathResult.swift delete mode 100644 Sources/DOMKit/WebIDL/XSLTProcessor.swift delete mode 100644 Sources/DOMKit/WebIDL/console.swift delete mode 100644 Sources/DOMKit/WebIDL/nullable_Double_or_seq_of_nullable_Double.swift diff --git a/Sources/DOMKit/WebIDL/ARIAMixin.swift b/Sources/DOMKit/WebIDL/ARIAMixin.swift deleted file mode 100644 index b1ec9cf9..00000000 --- a/Sources/DOMKit/WebIDL/ARIAMixin.swift +++ /dev/null @@ -1,212 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol ARIAMixin: JSBridgedClass {} -public extension ARIAMixin { - @inlinable var role: String? { - get { ReadWriteAttribute[Strings.role, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.role, in: jsObject] = newValue } - } - - @inlinable var ariaAtomic: String? { - get { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] = newValue } - } - - @inlinable var ariaAutoComplete: String? { - get { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] = newValue } - } - - @inlinable var ariaBusy: String? { - get { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] = newValue } - } - - @inlinable var ariaChecked: String? { - get { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] = newValue } - } - - @inlinable var ariaColCount: String? { - get { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] = newValue } - } - - @inlinable var ariaColIndex: String? { - get { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] = newValue } - } - - @inlinable var ariaColIndexText: String? { - get { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] = newValue } - } - - @inlinable var ariaColSpan: String? { - get { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] = newValue } - } - - @inlinable var ariaCurrent: String? { - get { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] = newValue } - } - - @inlinable var ariaDescription: String? { - get { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] = newValue } - } - - @inlinable var ariaDisabled: String? { - get { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] = newValue } - } - - @inlinable var ariaExpanded: String? { - get { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] = newValue } - } - - @inlinable var ariaHasPopup: String? { - get { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] = newValue } - } - - @inlinable var ariaHidden: String? { - get { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] = newValue } - } - - @inlinable var ariaInvalid: String? { - get { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] = newValue } - } - - @inlinable var ariaKeyShortcuts: String? { - get { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] = newValue } - } - - @inlinable var ariaLabel: String? { - get { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] = newValue } - } - - @inlinable var ariaLevel: String? { - get { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] = newValue } - } - - @inlinable var ariaLive: String? { - get { ReadWriteAttribute[Strings.ariaLive, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaLive, in: jsObject] = newValue } - } - - @inlinable var ariaModal: String? { - get { ReadWriteAttribute[Strings.ariaModal, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaModal, in: jsObject] = newValue } - } - - @inlinable var ariaMultiLine: String? { - get { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] = newValue } - } - - @inlinable var ariaMultiSelectable: String? { - get { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] = newValue } - } - - @inlinable var ariaOrientation: String? { - get { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] = newValue } - } - - @inlinable var ariaPlaceholder: String? { - get { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] = newValue } - } - - @inlinable var ariaPosInSet: String? { - get { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] = newValue } - } - - @inlinable var ariaPressed: String? { - get { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] = newValue } - } - - @inlinable var ariaReadOnly: String? { - get { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] = newValue } - } - - @inlinable var ariaRequired: String? { - get { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] = newValue } - } - - @inlinable var ariaRoleDescription: String? { - get { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] = newValue } - } - - @inlinable var ariaRowCount: String? { - get { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] = newValue } - } - - @inlinable var ariaRowIndex: String? { - get { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] = newValue } - } - - @inlinable var ariaRowIndexText: String? { - get { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] = newValue } - } - - @inlinable var ariaRowSpan: String? { - get { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] = newValue } - } - - @inlinable var ariaSelected: String? { - get { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] = newValue } - } - - @inlinable var ariaSetSize: String? { - get { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] = newValue } - } - - @inlinable var ariaSort: String? { - get { ReadWriteAttribute[Strings.ariaSort, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaSort, in: jsObject] = newValue } - } - - @inlinable var ariaValueMax: String? { - get { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] = newValue } - } - - @inlinable var ariaValueMin: String? { - get { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] = newValue } - } - - @inlinable var ariaValueNow: String? { - get { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] = newValue } - } - - @inlinable var ariaValueText: String? { - get { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/AbortController.swift b/Sources/DOMKit/WebIDL/AbortController.swift deleted file mode 100644 index 12ea808f..00000000 --- a/Sources/DOMKit/WebIDL/AbortController.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AbortController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbortController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func abort(reason: JSValue? = nil) { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/AbortSignal.swift b/Sources/DOMKit/WebIDL/AbortSignal.swift deleted file mode 100644 index 39d006f6..00000000 --- a/Sources/DOMKit/WebIDL/AbortSignal.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AbortSignal: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AbortSignal].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _aborted = ReadonlyAttribute(jsObject: jsObject, name: Strings.aborted) - _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) - _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public static func abort(reason: JSValue? = nil) -> Self { - let this = constructor - return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public static func timeout(milliseconds: UInt64) -> Self { - let this = constructor - return this[Strings.timeout].function!(this: this, arguments: [milliseconds.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var aborted: Bool - - @ReadonlyAttribute - public var reason: JSValue - - @inlinable public func throwIfAborted() { - let this = jsObject - _ = this[Strings.throwIfAborted].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onabort: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/AbstractRange.swift b/Sources/DOMKit/WebIDL/AbstractRange.swift deleted file mode 100644 index 8ef0573c..00000000 --- a/Sources/DOMKit/WebIDL/AbstractRange.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AbstractRange: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbstractRange].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _startContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.startContainer) - _startOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.startOffset) - _endContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.endContainer) - _endOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.endOffset) - _collapsed = ReadonlyAttribute(jsObject: jsObject, name: Strings.collapsed) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var startContainer: Node - - @ReadonlyAttribute - public var startOffset: UInt32 - - @ReadonlyAttribute - public var endContainer: Node - - @ReadonlyAttribute - public var endOffset: UInt32 - - @ReadonlyAttribute - public var collapsed: Bool -} diff --git a/Sources/DOMKit/WebIDL/AbstractWorker.swift b/Sources/DOMKit/WebIDL/AbstractWorker.swift deleted file mode 100644 index eba7eaf0..00000000 --- a/Sources/DOMKit/WebIDL/AbstractWorker.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol AbstractWorker: JSBridgedClass {} -public extension AbstractWorker { - @inlinable var onerror: EventHandler { - get { ClosureAttribute1Optional[Strings.onerror, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onerror, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/AddEventListenerOptions.swift b/Sources/DOMKit/WebIDL/AddEventListenerOptions.swift deleted file mode 100644 index 8cd62fd8..00000000 --- a/Sources/DOMKit/WebIDL/AddEventListenerOptions.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AddEventListenerOptions: BridgedDictionary { - public convenience init(passive: Bool, once: Bool, signal: AbortSignal) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.passive] = passive.jsValue - object[Strings.once] = once.jsValue - object[Strings.signal] = signal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _passive = ReadWriteAttribute(jsObject: object, name: Strings.passive) - _once = ReadWriteAttribute(jsObject: object, name: Strings.once) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var passive: Bool - - @ReadWriteAttribute - public var once: Bool - - @ReadWriteAttribute - public var signal: AbortSignal -} diff --git a/Sources/DOMKit/WebIDL/Animatable.swift b/Sources/DOMKit/WebIDL/Animatable.swift deleted file mode 100644 index 74890d13..00000000 --- a/Sources/DOMKit/WebIDL/Animatable.swift +++ /dev/null @@ -1,17 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Animatable: JSBridgedClass {} -public extension Animatable { - @inlinable func animate(keyframes: JSObject?, options: Double_or_KeyframeAnimationOptions? = nil) -> Animation { - let this = jsObject - return this[Strings.animate].function!(this: this, arguments: [keyframes.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func getAnimations(options: GetAnimationsOptions? = nil) -> [Animation] { - let this = jsObject - return this[Strings.getAnimations].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/Animation.swift b/Sources/DOMKit/WebIDL/Animation.swift deleted file mode 100644 index 10ac8a0b..00000000 --- a/Sources/DOMKit/WebIDL/Animation.swift +++ /dev/null @@ -1,104 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Animation: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Animation].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) - _effect = ReadWriteAttribute(jsObject: jsObject, name: Strings.effect) - _timeline = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeline) - _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) - _playState = ReadonlyAttribute(jsObject: jsObject, name: Strings.playState) - _replaceState = ReadonlyAttribute(jsObject: jsObject, name: Strings.replaceState) - _pending = ReadonlyAttribute(jsObject: jsObject, name: Strings.pending) - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _finished = ReadonlyAttribute(jsObject: jsObject, name: Strings.finished) - _onfinish = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onfinish) - _oncancel = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncancel) - _onremove = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremove) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(effect: AnimationEffect? = nil, timeline: AnimationTimeline? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [effect?.jsValue ?? .undefined, timeline?.jsValue ?? .undefined])) - } - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var effect: AnimationEffect? - - @ReadWriteAttribute - public var timeline: AnimationTimeline? - - @ReadWriteAttribute - public var playbackRate: Double - - @ReadonlyAttribute - public var playState: AnimationPlayState - - @ReadonlyAttribute - public var replaceState: AnimationReplaceState - - @ReadonlyAttribute - public var pending: Bool - - @ReadonlyAttribute - public var ready: JSPromise - - @ReadonlyAttribute - public var finished: JSPromise - - @ClosureAttribute1Optional - public var onfinish: EventHandler - - @ClosureAttribute1Optional - public var oncancel: EventHandler - - @ClosureAttribute1Optional - public var onremove: EventHandler - - @inlinable public func cancel() { - let this = jsObject - _ = this[Strings.cancel].function!(this: this, arguments: []) - } - - @inlinable public func finish() { - let this = jsObject - _ = this[Strings.finish].function!(this: this, arguments: []) - } - - @inlinable public func play() { - let this = jsObject - _ = this[Strings.play].function!(this: this, arguments: []) - } - - @inlinable public func pause() { - let this = jsObject - _ = this[Strings.pause].function!(this: this, arguments: []) - } - - @inlinable public func updatePlaybackRate(playbackRate: Double) { - let this = jsObject - _ = this[Strings.updatePlaybackRate].function!(this: this, arguments: [playbackRate.jsValue]) - } - - @inlinable public func reverse() { - let this = jsObject - _ = this[Strings.reverse].function!(this: this, arguments: []) - } - - @inlinable public func persist() { - let this = jsObject - _ = this[Strings.persist].function!(this: this, arguments: []) - } - - @inlinable public func commitStyles() { - let this = jsObject - _ = this[Strings.commitStyles].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/AnimationEffect.swift b/Sources/DOMKit/WebIDL/AnimationEffect.swift deleted file mode 100644 index 9865ddd3..00000000 --- a/Sources/DOMKit/WebIDL/AnimationEffect.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AnimationEffect: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationEffect].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func getTiming() -> EffectTiming { - let this = jsObject - return this[Strings.getTiming].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getComputedTiming() -> ComputedEffectTiming { - let this = jsObject - return this[Strings.getComputedTiming].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func updateTiming(timing: OptionalEffectTiming? = nil) { - let this = jsObject - _ = this[Strings.updateTiming].function!(this: this, arguments: [timing?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/AnimationFrameProvider.swift b/Sources/DOMKit/WebIDL/AnimationFrameProvider.swift deleted file mode 100644 index 49db0432..00000000 --- a/Sources/DOMKit/WebIDL/AnimationFrameProvider.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol AnimationFrameProvider: JSBridgedClass {} -public extension AnimationFrameProvider { - // XXX: method 'requestAnimationFrame' is ignored - - @inlinable func cancelAnimationFrame(handle: UInt32) { - let this = jsObject - _ = this[Strings.cancelAnimationFrame].function!(this: this, arguments: [handle.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/AnimationPlayState.swift b/Sources/DOMKit/WebIDL/AnimationPlayState.swift deleted file mode 100644 index 2231613f..00000000 --- a/Sources/DOMKit/WebIDL/AnimationPlayState.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AnimationPlayState: JSString, JSValueCompatible { - case idle = "idle" - case running = "running" - case paused = "paused" - case finished = "finished" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/AnimationReplaceState.swift b/Sources/DOMKit/WebIDL/AnimationReplaceState.swift deleted file mode 100644 index 02e0796c..00000000 --- a/Sources/DOMKit/WebIDL/AnimationReplaceState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AnimationReplaceState: JSString, JSValueCompatible { - case active = "active" - case removed = "removed" - case persisted = "persisted" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/AnimationTimeline.swift b/Sources/DOMKit/WebIDL/AnimationTimeline.swift deleted file mode 100644 index 96e84a17..00000000 --- a/Sources/DOMKit/WebIDL/AnimationTimeline.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AnimationTimeline: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationTimeline].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _currentTime = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTime) - _phase = ReadonlyAttribute(jsObject: jsObject, name: Strings.phase) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var currentTime: Double? - - @ReadonlyAttribute - public var phase: TimelinePhase -} diff --git a/Sources/DOMKit/WebIDL/ArrayBuffer_or_String.swift b/Sources/DOMKit/WebIDL/ArrayBuffer_or_String.swift deleted file mode 100644 index 9fc28f17..00000000 --- a/Sources/DOMKit/WebIDL/ArrayBuffer_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ArrayBuffer_or_String: ConvertibleToJSValue {} -extension ArrayBuffer: Any_ArrayBuffer_or_String {} -extension String: Any_ArrayBuffer_or_String {} - -public enum ArrayBuffer_or_String: JSValueCompatible, Any_ArrayBuffer_or_String { - case arrayBuffer(ArrayBuffer) - case string(String) - - var arrayBuffer: ArrayBuffer? { - switch self { - case let .arrayBuffer(arrayBuffer): return arrayBuffer - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let arrayBuffer: ArrayBuffer = value.fromJSValue() { - return .arrayBuffer(arrayBuffer) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .arrayBuffer(arrayBuffer): - return arrayBuffer.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/AssignedNodesOptions.swift b/Sources/DOMKit/WebIDL/AssignedNodesOptions.swift deleted file mode 100644 index 65a10d5c..00000000 --- a/Sources/DOMKit/WebIDL/AssignedNodesOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AssignedNodesOptions: BridgedDictionary { - public convenience init(flatten: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.flatten] = flatten.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _flatten = ReadWriteAttribute(jsObject: object, name: Strings.flatten) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var flatten: Bool -} diff --git a/Sources/DOMKit/WebIDL/Attr.swift b/Sources/DOMKit/WebIDL/Attr.swift deleted file mode 100644 index 226dfbea..00000000 --- a/Sources/DOMKit/WebIDL/Attr.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Attr: Node { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Attr].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) - _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) - _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _ownerElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerElement) - _specified = ReadonlyAttribute(jsObject: jsObject, name: Strings.specified) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var namespaceURI: String? - - @ReadonlyAttribute - public var prefix: String? - - @ReadonlyAttribute - public var localName: String - - @ReadonlyAttribute - public var name: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var ownerElement: Element? - - @ReadonlyAttribute - public var specified: Bool -} diff --git a/Sources/DOMKit/WebIDL/AudioTrack.swift b/Sources/DOMKit/WebIDL/AudioTrack.swift deleted file mode 100644 index 5ff80c06..00000000 --- a/Sources/DOMKit/WebIDL/AudioTrack.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var enabled: Bool -} diff --git a/Sources/DOMKit/WebIDL/AudioTrackList.swift b/Sources/DOMKit/WebIDL/AudioTrackList.swift deleted file mode 100644 index 0fd4aea7..00000000 --- a/Sources/DOMKit/WebIDL/AudioTrackList.swift +++ /dev/null @@ -1,37 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AudioTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> AudioTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> AudioTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/AudioTrack_or_TextTrack_or_VideoTrack.swift b/Sources/DOMKit/WebIDL/AudioTrack_or_TextTrack_or_VideoTrack.swift deleted file mode 100644 index 10ac922e..00000000 --- a/Sources/DOMKit/WebIDL/AudioTrack_or_TextTrack_or_VideoTrack.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_AudioTrack_or_TextTrack_or_VideoTrack: ConvertibleToJSValue {} -extension AudioTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} -extension TextTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} -extension VideoTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} - -public enum AudioTrack_or_TextTrack_or_VideoTrack: JSValueCompatible, Any_AudioTrack_or_TextTrack_or_VideoTrack { - case audioTrack(AudioTrack) - case textTrack(TextTrack) - case videoTrack(VideoTrack) - - var audioTrack: AudioTrack? { - switch self { - case let .audioTrack(audioTrack): return audioTrack - default: return nil - } - } - - var textTrack: TextTrack? { - switch self { - case let .textTrack(textTrack): return textTrack - default: return nil - } - } - - var videoTrack: VideoTrack? { - switch self { - case let .videoTrack(videoTrack): return videoTrack - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let audioTrack: AudioTrack = value.fromJSValue() { - return .audioTrack(audioTrack) - } - if let textTrack: TextTrack = value.fromJSValue() { - return .textTrack(textTrack) - } - if let videoTrack: VideoTrack = value.fromJSValue() { - return .videoTrack(videoTrack) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .audioTrack(audioTrack): - return audioTrack.jsValue - case let .textTrack(textTrack): - return textTrack.jsValue - case let .videoTrack(videoTrack): - return videoTrack.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/BarProp.swift b/Sources/DOMKit/WebIDL/BarProp.swift deleted file mode 100644 index 23a2f8ad..00000000 --- a/Sources/DOMKit/WebIDL/BarProp.swift +++ /dev/null @@ -1,18 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BarProp: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.BarProp].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _visible = ReadonlyAttribute(jsObject: jsObject, name: Strings.visible) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var visible: Bool -} diff --git a/Sources/DOMKit/WebIDL/BaseComputedKeyframe.swift b/Sources/DOMKit/WebIDL/BaseComputedKeyframe.swift deleted file mode 100644 index 3a88e7dc..00000000 --- a/Sources/DOMKit/WebIDL/BaseComputedKeyframe.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BaseComputedKeyframe: BridgedDictionary { - public convenience init(offset: Double?, computedOffset: Double, easing: String, composite: CompositeOperationOrAuto) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.computedOffset] = computedOffset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _computedOffset = ReadWriteAttribute(jsObject: object, name: Strings.computedOffset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: Double? - - @ReadWriteAttribute - public var computedOffset: Double - - @ReadWriteAttribute - public var easing: String - - @ReadWriteAttribute - public var composite: CompositeOperationOrAuto -} diff --git a/Sources/DOMKit/WebIDL/BaseKeyframe.swift b/Sources/DOMKit/WebIDL/BaseKeyframe.swift deleted file mode 100644 index 74d9634a..00000000 --- a/Sources/DOMKit/WebIDL/BaseKeyframe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BaseKeyframe: BridgedDictionary { - public convenience init(offset: Double?, easing: String, composite: CompositeOperationOrAuto) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: Double? - - @ReadWriteAttribute - public var easing: String - - @ReadWriteAttribute - public var composite: CompositeOperationOrAuto -} diff --git a/Sources/DOMKit/WebIDL/BasePropertyIndexedKeyframe.swift b/Sources/DOMKit/WebIDL/BasePropertyIndexedKeyframe.swift deleted file mode 100644 index 9e0f1e22..00000000 --- a/Sources/DOMKit/WebIDL/BasePropertyIndexedKeyframe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BasePropertyIndexedKeyframe: BridgedDictionary { - public convenience init(offset: nullable_Double_or_seq_of_nullable_Double, easing: String_or_seq_of_String, composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: nullable_Double_or_seq_of_nullable_Double - - @ReadWriteAttribute - public var easing: String_or_seq_of_String - - @ReadWriteAttribute - public var composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto -} diff --git a/Sources/DOMKit/WebIDL/BeforeUnloadEvent.swift b/Sources/DOMKit/WebIDL/BeforeUnloadEvent.swift deleted file mode 100644 index 2a0e7506..00000000 --- a/Sources/DOMKit/WebIDL/BeforeUnloadEvent.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BeforeUnloadEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BeforeUnloadEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - // XXX: member 'returnValue' is ignored -} diff --git a/Sources/DOMKit/WebIDL/Blob.swift b/Sources/DOMKit/WebIDL/Blob.swift deleted file mode 100644 index c8eb905a..00000000 --- a/Sources/DOMKit/WebIDL/Blob.swift +++ /dev/null @@ -1,57 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Blob: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - self.jsObject = jsObject - } - - @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var size: UInt64 - - @ReadonlyAttribute - public var type: String - - @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { - let this = jsObject - return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! - } - - // XXX: member 'stream' is ignored - - @inlinable public func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/BlobPart.swift b/Sources/DOMKit/WebIDL/BlobPart.swift deleted file mode 100644 index ea19e902..00000000 --- a/Sources/DOMKit/WebIDL/BlobPart.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_BlobPart: ConvertibleToJSValue {} -extension Blob: Any_BlobPart {} -extension BufferSource: Any_BlobPart {} -extension String: Any_BlobPart {} - -public enum BlobPart: JSValueCompatible, Any_BlobPart { - case blob(Blob) - case bufferSource(BufferSource) - case string(String) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/BlobPropertyBag.swift b/Sources/DOMKit/WebIDL/BlobPropertyBag.swift deleted file mode 100644 index 3db421ff..00000000 --- a/Sources/DOMKit/WebIDL/BlobPropertyBag.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BlobPropertyBag: BridgedDictionary { - public convenience init(type: String, endings: EndingType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.endings] = endings.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var endings: EndingType -} diff --git a/Sources/DOMKit/WebIDL/Body.swift b/Sources/DOMKit/WebIDL/Body.swift deleted file mode 100644 index 687e62b6..00000000 --- a/Sources/DOMKit/WebIDL/Body.swift +++ /dev/null @@ -1,71 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Body: JSBridgedClass {} -public extension Body { - // XXX: attribute 'body' is ignored - - @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } - - @inlinable func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func blob() -> JSPromise { - let this = jsObject - return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func blob() async throws -> Blob { - let this = jsObject - let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func formData() -> JSPromise { - let this = jsObject - return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func formData() async throws -> FormData { - let this = jsObject - let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func json() -> JSPromise { - let this = jsObject - return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func json() async throws -> JSValue { - let this = jsObject - let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/BroadcastChannel.swift b/Sources/DOMKit/WebIDL/BroadcastChannel.swift deleted file mode 100644 index fcec4d0d..00000000 --- a/Sources/DOMKit/WebIDL/BroadcastChannel.swift +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BroadcastChannel: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(name: String) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) - } - - @ReadonlyAttribute - public var name: String - - @inlinable public func postMessage(message: JSValue) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue]) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/BufferSource.swift b/Sources/DOMKit/WebIDL/BufferSource.swift deleted file mode 100644 index 6e6a2f33..00000000 --- a/Sources/DOMKit/WebIDL/BufferSource.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_BufferSource: ConvertibleToJSValue {} -extension ArrayBuffer: Any_BufferSource {} -extension ArrayBufferView: Any_BufferSource {} - -public enum BufferSource: JSValueCompatible, Any_BufferSource { - case arrayBuffer(ArrayBuffer) - case arrayBufferView(ArrayBufferView) - - var arrayBuffer: ArrayBuffer? { - switch self { - case let .arrayBuffer(arrayBuffer): return arrayBuffer - default: return nil - } - } - - var arrayBufferView: ArrayBufferView? { - switch self { - case let .arrayBufferView(arrayBufferView): return arrayBufferView - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let arrayBuffer: ArrayBuffer = value.fromJSValue() { - return .arrayBuffer(arrayBuffer) - } - if let arrayBufferView: ArrayBufferView = value.fromJSValue() { - return .arrayBufferView(arrayBufferView) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .arrayBuffer(arrayBuffer): - return arrayBuffer.jsValue - case let .arrayBufferView(arrayBufferView): - return arrayBufferView.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ByteLengthQueuingStrategy.swift b/Sources/DOMKit/WebIDL/ByteLengthQueuingStrategy.swift deleted file mode 100644 index 480f696d..00000000 --- a/Sources/DOMKit/WebIDL/ByteLengthQueuingStrategy.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ByteLengthQueuingStrategy: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ByteLengthQueuingStrategy].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: QueuingStrategyInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var highWaterMark: Double - - @ReadonlyAttribute - public var size: JSFunction -} diff --git a/Sources/DOMKit/WebIDL/CDATASection.swift b/Sources/DOMKit/WebIDL/CDATASection.swift deleted file mode 100644 index 99b6d27f..00000000 --- a/Sources/DOMKit/WebIDL/CDATASection.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CDATASection: Text { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CDATASection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/Cache.swift b/Sources/DOMKit/WebIDL/Cache.swift deleted file mode 100644 index 6b344dce..00000000 --- a/Sources/DOMKit/WebIDL/Cache.swift +++ /dev/null @@ -1,98 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Cache: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { - let this = jsObject - let _promise: JSPromise = this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func add(request: RequestInfo) -> JSPromise { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func add(request: RequestInfo) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { - let this = jsObject - return this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addAll(requests: [RequestInfo]) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { - let this = jsObject - return this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func put(request: RequestInfo, response: Response) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { - let this = jsObject - let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CacheQueryOptions.swift b/Sources/DOMKit/WebIDL/CacheQueryOptions.swift deleted file mode 100644 index cb0feec1..00000000 --- a/Sources/DOMKit/WebIDL/CacheQueryOptions.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CacheQueryOptions: BridgedDictionary { - public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.ignoreSearch] = ignoreSearch.jsValue - object[Strings.ignoreMethod] = ignoreMethod.jsValue - object[Strings.ignoreVary] = ignoreVary.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _ignoreSearch = ReadWriteAttribute(jsObject: object, name: Strings.ignoreSearch) - _ignoreMethod = ReadWriteAttribute(jsObject: object, name: Strings.ignoreMethod) - _ignoreVary = ReadWriteAttribute(jsObject: object, name: Strings.ignoreVary) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var ignoreSearch: Bool - - @ReadWriteAttribute - public var ignoreMethod: Bool - - @ReadWriteAttribute - public var ignoreVary: Bool -} diff --git a/Sources/DOMKit/WebIDL/CacheStorage.swift b/Sources/DOMKit/WebIDL/CacheStorage.swift deleted file mode 100644 index e03f63b1..00000000 --- a/Sources/DOMKit/WebIDL/CacheStorage.swift +++ /dev/null @@ -1,74 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CacheStorage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CacheStorage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func has(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func has(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func open(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func open(cacheName: String) async throws -> Cache { - let this = jsObject - let _promise: JSPromise = this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func delete(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func keys() -> JSPromise { - let this = jsObject - return this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys() async throws -> [String] { - let this = jsObject - let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CanPlayTypeResult.swift b/Sources/DOMKit/WebIDL/CanPlayTypeResult.swift deleted file mode 100644 index 3daa302c..00000000 --- a/Sources/DOMKit/WebIDL/CanPlayTypeResult.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanPlayTypeResult: JSString, JSValueCompatible { - case _empty = "" - case maybe = "maybe" - case probably = "probably" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasCompositing.swift b/Sources/DOMKit/WebIDL/CanvasCompositing.swift deleted file mode 100644 index 9268b4ee..00000000 --- a/Sources/DOMKit/WebIDL/CanvasCompositing.swift +++ /dev/null @@ -1,17 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasCompositing: JSBridgedClass {} -public extension CanvasCompositing { - @inlinable var globalAlpha: Double { - get { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] = newValue } - } - - @inlinable var globalCompositeOperation: String { - get { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasDirection.swift b/Sources/DOMKit/WebIDL/CanvasDirection.swift deleted file mode 100644 index d2aab51e..00000000 --- a/Sources/DOMKit/WebIDL/CanvasDirection.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasDirection: JSString, JSValueCompatible { - case ltr = "ltr" - case rtl = "rtl" - case inherit = "inherit" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasDrawImage.swift b/Sources/DOMKit/WebIDL/CanvasDrawImage.swift deleted file mode 100644 index a45379b6..00000000 --- a/Sources/DOMKit/WebIDL/CanvasDrawImage.swift +++ /dev/null @@ -1,31 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasDrawImage: JSBridgedClass {} -public extension CanvasDrawImage { - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) - } - - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) - } - - @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = dx.jsValue - let _arg6 = dy.jsValue - let _arg7 = dw.jsValue - let _arg8 = dh.jsValue - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasDrawPath.swift b/Sources/DOMKit/WebIDL/CanvasDrawPath.swift deleted file mode 100644 index 1b2986e9..00000000 --- a/Sources/DOMKit/WebIDL/CanvasDrawPath.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasDrawPath: JSBridgedClass {} -public extension CanvasDrawPath { - @inlinable func beginPath() { - let this = jsObject - _ = this[Strings.beginPath].function!(this: this, arguments: []) - } - - @inlinable func fill(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } - - @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } - - @inlinable func stroke() { - let this = jsObject - _ = this[Strings.stroke].function!(this: this, arguments: []) - } - - @inlinable func stroke(path: Path2D) { - let this = jsObject - _ = this[Strings.stroke].function!(this: this, arguments: [path.jsValue]) - } - - @inlinable func clip(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } - - @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } - - @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { - let this = jsObject - return this[Strings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { - let this = jsObject - return this[Strings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { - let this = jsObject - return this[Strings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { - let this = jsObject - return this[Strings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFillRule.swift b/Sources/DOMKit/WebIDL/CanvasFillRule.swift deleted file mode 100644 index 17694dc2..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFillRule.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasFillRule: JSString, JSValueCompatible { - case nonzero = "nonzero" - case evenodd = "evenodd" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFillStrokeStyles.swift b/Sources/DOMKit/WebIDL/CanvasFillStrokeStyles.swift deleted file mode 100644 index 1e9d0875..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFillStrokeStyles.swift +++ /dev/null @@ -1,43 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasFillStrokeStyles: JSBridgedClass {} -public extension CanvasFillStrokeStyles { - @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { - get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } - } - - @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { - get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } - } - - @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { - let this = jsObject - return this[Strings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! - } - - @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { - let _arg0 = x0.jsValue - let _arg1 = y0.jsValue - let _arg2 = r0.jsValue - let _arg3 = x1.jsValue - let _arg4 = y1.jsValue - let _arg5 = r1.jsValue - let this = jsObject - return this[Strings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { - let this = jsObject - return this[Strings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { - let this = jsObject - return this[Strings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFilter.swift b/Sources/DOMKit/WebIDL/CanvasFilter.swift deleted file mode 100644 index 322447f3..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFilter.swift +++ /dev/null @@ -1,18 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CanvasFilter: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasFilter].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFilterInput_or_seq_of_CanvasFilterInput.swift b/Sources/DOMKit/WebIDL/CanvasFilterInput_or_seq_of_CanvasFilterInput.swift deleted file mode 100644 index 2989a091..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFilterInput_or_seq_of_CanvasFilterInput.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} -extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} -extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} - -public enum CanvasFilterInput_or_seq_of_CanvasFilterInput: JSValueCompatible, Any_CanvasFilterInput_or_seq_of_CanvasFilterInput { - case canvasFilterInput(CanvasFilterInput) - case seq_of_CanvasFilterInput([CanvasFilterInput]) - - var canvasFilterInput: CanvasFilterInput? { - switch self { - case let .canvasFilterInput(canvasFilterInput): return canvasFilterInput - default: return nil - } - } - - var seq_of_CanvasFilterInput: [CanvasFilterInput]? { - switch self { - case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): return seq_of_CanvasFilterInput - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasFilterInput: CanvasFilterInput = value.fromJSValue() { - return .canvasFilterInput(canvasFilterInput) - } - if let seq_of_CanvasFilterInput: [CanvasFilterInput] = value.fromJSValue() { - return .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasFilterInput(canvasFilterInput): - return canvasFilterInput.jsValue - case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): - return seq_of_CanvasFilterInput.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFilter_or_String.swift b/Sources/DOMKit/WebIDL/CanvasFilter_or_String.swift deleted file mode 100644 index 6b4acf85..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFilter_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CanvasFilter_or_String: ConvertibleToJSValue {} -extension CanvasFilter: Any_CanvasFilter_or_String {} -extension String: Any_CanvasFilter_or_String {} - -public enum CanvasFilter_or_String: JSValueCompatible, Any_CanvasFilter_or_String { - case canvasFilter(CanvasFilter) - case string(String) - - var canvasFilter: CanvasFilter? { - switch self { - case let .canvasFilter(canvasFilter): return canvasFilter - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasFilter: CanvasFilter = value.fromJSValue() { - return .canvasFilter(canvasFilter) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasFilter(canvasFilter): - return canvasFilter.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFilters.swift b/Sources/DOMKit/WebIDL/CanvasFilters.swift deleted file mode 100644 index 071d548a..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFilters.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasFilters: JSBridgedClass {} -public extension CanvasFilters { - @inlinable var filter: CanvasFilter_or_String { - get { ReadWriteAttribute[Strings.filter, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFontKerning.swift b/Sources/DOMKit/WebIDL/CanvasFontKerning.swift deleted file mode 100644 index 08539582..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFontKerning.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasFontKerning: JSString, JSValueCompatible { - case auto = "auto" - case normal = "normal" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFontStretch.swift b/Sources/DOMKit/WebIDL/CanvasFontStretch.swift deleted file mode 100644 index 005a3b8a..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFontStretch.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasFontStretch: JSString, JSValueCompatible { - case ultraCondensed = "ultra-condensed" - case extraCondensed = "extra-condensed" - case condensed = "condensed" - case semiCondensed = "semi-condensed" - case normal = "normal" - case semiExpanded = "semi-expanded" - case expanded = "expanded" - case extraExpanded = "extra-expanded" - case ultraExpanded = "ultra-expanded" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasFontVariantCaps.swift b/Sources/DOMKit/WebIDL/CanvasFontVariantCaps.swift deleted file mode 100644 index 4d9bd07c..00000000 --- a/Sources/DOMKit/WebIDL/CanvasFontVariantCaps.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasFontVariantCaps: JSString, JSValueCompatible { - case normal = "normal" - case smallCaps = "small-caps" - case allSmallCaps = "all-small-caps" - case petiteCaps = "petite-caps" - case allPetiteCaps = "all-petite-caps" - case unicase = "unicase" - case titlingCaps = "titling-caps" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasGradient.swift b/Sources/DOMKit/WebIDL/CanvasGradient.swift deleted file mode 100644 index f968ea7f..00000000 --- a/Sources/DOMKit/WebIDL/CanvasGradient.swift +++ /dev/null @@ -1,19 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CanvasGradient: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasGradient].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func addColorStop(offset: Double, color: String) { - let this = jsObject - _ = this[Strings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasGradient_or_CanvasPattern_or_String.swift b/Sources/DOMKit/WebIDL/CanvasGradient_or_CanvasPattern_or_String.swift deleted file mode 100644 index 77e1d93d..00000000 --- a/Sources/DOMKit/WebIDL/CanvasGradient_or_CanvasPattern_or_String.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CanvasGradient_or_CanvasPattern_or_String: ConvertibleToJSValue {} -extension CanvasGradient: Any_CanvasGradient_or_CanvasPattern_or_String {} -extension CanvasPattern: Any_CanvasGradient_or_CanvasPattern_or_String {} -extension String: Any_CanvasGradient_or_CanvasPattern_or_String {} - -public enum CanvasGradient_or_CanvasPattern_or_String: JSValueCompatible, Any_CanvasGradient_or_CanvasPattern_or_String { - case canvasGradient(CanvasGradient) - case canvasPattern(CanvasPattern) - case string(String) - - var canvasGradient: CanvasGradient? { - switch self { - case let .canvasGradient(canvasGradient): return canvasGradient - default: return nil - } - } - - var canvasPattern: CanvasPattern? { - switch self { - case let .canvasPattern(canvasPattern): return canvasPattern - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasGradient: CanvasGradient = value.fromJSValue() { - return .canvasGradient(canvasGradient) - } - if let canvasPattern: CanvasPattern = value.fromJSValue() { - return .canvasPattern(canvasPattern) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasGradient(canvasGradient): - return canvasGradient.jsValue - case let .canvasPattern(canvasPattern): - return canvasPattern.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasImageData.swift b/Sources/DOMKit/WebIDL/CanvasImageData.swift deleted file mode 100644 index d3318b0b..00000000 --- a/Sources/DOMKit/WebIDL/CanvasImageData.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasImageData: JSBridgedClass {} -public extension CanvasImageData { - @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { - let this = jsObject - return this[Strings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func createImageData(imagedata: ImageData) -> ImageData { - let this = jsObject - return this[Strings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! - } - - @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { - let this = jsObject - return this[Strings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { - let this = jsObject - _ = this[Strings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) - } - - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { - let _arg0 = imagedata.jsValue - let _arg1 = dx.jsValue - let _arg2 = dy.jsValue - let _arg3 = dirtyX.jsValue - let _arg4 = dirtyY.jsValue - let _arg5 = dirtyWidth.jsValue - let _arg6 = dirtyHeight.jsValue - let this = jsObject - _ = this[Strings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasImageSmoothing.swift b/Sources/DOMKit/WebIDL/CanvasImageSmoothing.swift deleted file mode 100644 index 37b13cf5..00000000 --- a/Sources/DOMKit/WebIDL/CanvasImageSmoothing.swift +++ /dev/null @@ -1,17 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasImageSmoothing: JSBridgedClass {} -public extension CanvasImageSmoothing { - @inlinable var imageSmoothingEnabled: Bool { - get { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] = newValue } - } - - @inlinable var imageSmoothingQuality: ImageSmoothingQuality { - get { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasLineCap.swift b/Sources/DOMKit/WebIDL/CanvasLineCap.swift deleted file mode 100644 index abc5b1b9..00000000 --- a/Sources/DOMKit/WebIDL/CanvasLineCap.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasLineCap: JSString, JSValueCompatible { - case butt = "butt" - case round = "round" - case square = "square" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasLineJoin.swift b/Sources/DOMKit/WebIDL/CanvasLineJoin.swift deleted file mode 100644 index 4bfc3d9e..00000000 --- a/Sources/DOMKit/WebIDL/CanvasLineJoin.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasLineJoin: JSString, JSValueCompatible { - case round = "round" - case bevel = "bevel" - case miter = "miter" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasPath.swift b/Sources/DOMKit/WebIDL/CanvasPath.swift deleted file mode 100644 index 618d84ae..00000000 --- a/Sources/DOMKit/WebIDL/CanvasPath.swift +++ /dev/null @@ -1,77 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasPath: JSBridgedClass {} -public extension CanvasPath { - @inlinable func closePath() { - let this = jsObject - _ = this[Strings.closePath].function!(this: this, arguments: []) - } - - @inlinable func moveTo(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func lineTo(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { - let this = jsObject - _ = this[Strings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { - let _arg0 = cp1x.jsValue - let _arg1 = cp1y.jsValue - let _arg2 = cp2x.jsValue - let _arg3 = cp2y.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue - let this = jsObject - _ = this[Strings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { - let this = jsObject - _ = this[Strings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) - } - - @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { - let this = jsObject - _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) - } - - @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radius.jsValue - let _arg3 = startAngle.jsValue - let _arg4 = endAngle.jsValue - let _arg5 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radiusX.jsValue - let _arg3 = radiusY.jsValue - let _arg4 = rotation.jsValue - let _arg5 = startAngle.jsValue - let _arg6 = endAngle.jsValue - let _arg7 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasPathDrawingStyles.swift b/Sources/DOMKit/WebIDL/CanvasPathDrawingStyles.swift deleted file mode 100644 index fa980115..00000000 --- a/Sources/DOMKit/WebIDL/CanvasPathDrawingStyles.swift +++ /dev/null @@ -1,42 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasPathDrawingStyles: JSBridgedClass {} -public extension CanvasPathDrawingStyles { - @inlinable var lineWidth: Double { - get { ReadWriteAttribute[Strings.lineWidth, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineWidth, in: jsObject] = newValue } - } - - @inlinable var lineCap: CanvasLineCap { - get { ReadWriteAttribute[Strings.lineCap, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineCap, in: jsObject] = newValue } - } - - @inlinable var lineJoin: CanvasLineJoin { - get { ReadWriteAttribute[Strings.lineJoin, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineJoin, in: jsObject] = newValue } - } - - @inlinable var miterLimit: Double { - get { ReadWriteAttribute[Strings.miterLimit, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.miterLimit, in: jsObject] = newValue } - } - - @inlinable func setLineDash(segments: [Double]) { - let this = jsObject - _ = this[Strings.setLineDash].function!(this: this, arguments: [segments.jsValue]) - } - - @inlinable func getLineDash() -> [Double] { - let this = jsObject - return this[Strings.getLineDash].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var lineDashOffset: Double { - get { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasPattern.swift b/Sources/DOMKit/WebIDL/CanvasPattern.swift deleted file mode 100644 index 0c5b037d..00000000 --- a/Sources/DOMKit/WebIDL/CanvasPattern.swift +++ /dev/null @@ -1,19 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CanvasPattern: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasPattern].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasRect.swift b/Sources/DOMKit/WebIDL/CanvasRect.swift deleted file mode 100644 index 97ae72d1..00000000 --- a/Sources/DOMKit/WebIDL/CanvasRect.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasRect: JSBridgedClass {} -public extension CanvasRect { - @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasRenderingContext2D.swift b/Sources/DOMKit/WebIDL/CanvasRenderingContext2D.swift deleted file mode 100644 index 0c962e81..00000000 --- a/Sources/DOMKit/WebIDL/CanvasRenderingContext2D.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasRenderingContext2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var canvas: HTMLCanvasElement - - @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { - let this = jsObject - return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasRenderingContext2DSettings.swift b/Sources/DOMKit/WebIDL/CanvasRenderingContext2DSettings.swift deleted file mode 100644 index 9dc2ceb0..00000000 --- a/Sources/DOMKit/WebIDL/CanvasRenderingContext2DSettings.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CanvasRenderingContext2DSettings: BridgedDictionary { - public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - object[Strings.desynchronized] = desynchronized.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - object[Strings.willReadFrequently] = willReadFrequently.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - _willReadFrequently = ReadWriteAttribute(jsObject: object, name: Strings.willReadFrequently) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool - - @ReadWriteAttribute - public var desynchronized: Bool - - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace - - @ReadWriteAttribute - public var willReadFrequently: Bool -} diff --git a/Sources/DOMKit/WebIDL/CanvasShadowStyles.swift b/Sources/DOMKit/WebIDL/CanvasShadowStyles.swift deleted file mode 100644 index 6d009735..00000000 --- a/Sources/DOMKit/WebIDL/CanvasShadowStyles.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasShadowStyles: JSBridgedClass {} -public extension CanvasShadowStyles { - @inlinable var shadowOffsetX: Double { - get { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] = newValue } - } - - @inlinable var shadowOffsetY: Double { - get { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] = newValue } - } - - @inlinable var shadowBlur: Double { - get { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] = newValue } - } - - @inlinable var shadowColor: String { - get { ReadWriteAttribute[Strings.shadowColor, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowColor, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasState.swift b/Sources/DOMKit/WebIDL/CanvasState.swift deleted file mode 100644 index f8e914dc..00000000 --- a/Sources/DOMKit/WebIDL/CanvasState.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasState: JSBridgedClass {} -public extension CanvasState { - @inlinable func save() { - let this = jsObject - _ = this[Strings.save].function!(this: this, arguments: []) - } - - @inlinable func restore() { - let this = jsObject - _ = this[Strings.restore].function!(this: this, arguments: []) - } - - @inlinable func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable func isContextLost() -> Bool { - let this = jsObject - return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasText.swift b/Sources/DOMKit/WebIDL/CanvasText.swift deleted file mode 100644 index 9e48702d..00000000 --- a/Sources/DOMKit/WebIDL/CanvasText.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasText: JSBridgedClass {} -public extension CanvasText { - @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { - let this = jsObject - _ = this[Strings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) - } - - @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { - let this = jsObject - _ = this[Strings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) - } - - @inlinable func measureText(text: String) -> TextMetrics { - let this = jsObject - return this[Strings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasTextAlign.swift b/Sources/DOMKit/WebIDL/CanvasTextAlign.swift deleted file mode 100644 index 40992b7d..00000000 --- a/Sources/DOMKit/WebIDL/CanvasTextAlign.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasTextAlign: JSString, JSValueCompatible { - case start = "start" - case end = "end" - case left = "left" - case right = "right" - case center = "center" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasTextBaseline.swift b/Sources/DOMKit/WebIDL/CanvasTextBaseline.swift deleted file mode 100644 index 4fc1c759..00000000 --- a/Sources/DOMKit/WebIDL/CanvasTextBaseline.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasTextBaseline: JSString, JSValueCompatible { - case top = "top" - case hanging = "hanging" - case middle = "middle" - case alphabetic = "alphabetic" - case ideographic = "ideographic" - case bottom = "bottom" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasTextDrawingStyles.swift b/Sources/DOMKit/WebIDL/CanvasTextDrawingStyles.swift deleted file mode 100644 index c5c9af38..00000000 --- a/Sources/DOMKit/WebIDL/CanvasTextDrawingStyles.swift +++ /dev/null @@ -1,57 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasTextDrawingStyles: JSBridgedClass {} -public extension CanvasTextDrawingStyles { - @inlinable var font: String { - get { ReadWriteAttribute[Strings.font, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.font, in: jsObject] = newValue } - } - - @inlinable var textAlign: CanvasTextAlign { - get { ReadWriteAttribute[Strings.textAlign, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textAlign, in: jsObject] = newValue } - } - - @inlinable var textBaseline: CanvasTextBaseline { - get { ReadWriteAttribute[Strings.textBaseline, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textBaseline, in: jsObject] = newValue } - } - - @inlinable var direction: CanvasDirection { - get { ReadWriteAttribute[Strings.direction, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.direction, in: jsObject] = newValue } - } - - @inlinable var letterSpacing: String { - get { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] = newValue } - } - - @inlinable var fontKerning: CanvasFontKerning { - get { ReadWriteAttribute[Strings.fontKerning, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontKerning, in: jsObject] = newValue } - } - - @inlinable var fontStretch: CanvasFontStretch { - get { ReadWriteAttribute[Strings.fontStretch, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontStretch, in: jsObject] = newValue } - } - - @inlinable var fontVariantCaps: CanvasFontVariantCaps { - get { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] = newValue } - } - - @inlinable var textRendering: CanvasTextRendering { - get { ReadWriteAttribute[Strings.textRendering, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textRendering, in: jsObject] = newValue } - } - - @inlinable var wordSpacing: String { - get { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasTextRendering.swift b/Sources/DOMKit/WebIDL/CanvasTextRendering.swift deleted file mode 100644 index e529cf10..00000000 --- a/Sources/DOMKit/WebIDL/CanvasTextRendering.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CanvasTextRendering: JSString, JSValueCompatible { - case auto = "auto" - case optimizeSpeed = "optimizeSpeed" - case optimizeLegibility = "optimizeLegibility" - case geometricPrecision = "geometricPrecision" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CanvasTransform.swift b/Sources/DOMKit/WebIDL/CanvasTransform.swift deleted file mode 100644 index 83337e04..00000000 --- a/Sources/DOMKit/WebIDL/CanvasTransform.swift +++ /dev/null @@ -1,59 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasTransform: JSBridgedClass {} -public extension CanvasTransform { - @inlinable func scale(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func rotate(angle: Double) { - let this = jsObject - _ = this[Strings.rotate].function!(this: this, arguments: [angle.jsValue]) - } - - @inlinable func translate(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[Strings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func getTransform() -> DOMMatrix { - let this = jsObject - return this[Strings.getTransform].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } - - @inlinable func resetTransform() { - let this = jsObject - _ = this[Strings.resetTransform].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/CanvasUserInterface.swift b/Sources/DOMKit/WebIDL/CanvasUserInterface.swift deleted file mode 100644 index 74673ac0..00000000 --- a/Sources/DOMKit/WebIDL/CanvasUserInterface.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol CanvasUserInterface: JSBridgedClass {} -public extension CanvasUserInterface { - @inlinable func drawFocusIfNeeded(element: Element) { - let this = jsObject - _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) - } - - @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { - let this = jsObject - _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) - } - - @inlinable func scrollPathIntoView() { - let this = jsObject - _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: []) - } - - @inlinable func scrollPathIntoView(path: Path2D) { - let this = jsObject - _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/CharacterData.swift b/Sources/DOMKit/WebIDL/CharacterData.swift deleted file mode 100644 index dcfe0231..00000000 --- a/Sources/DOMKit/WebIDL/CharacterData.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var data: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { - let this = jsObject - return this[Strings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! - } - - @inlinable public func appendData(data: String) { - let this = jsObject - _ = this[Strings.appendData].function!(this: this, arguments: [data.jsValue]) - } - - @inlinable public func insertData(offset: UInt32, data: String) { - let this = jsObject - _ = this[Strings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) - } - - @inlinable public func deleteData(offset: UInt32, count: UInt32) { - let this = jsObject - _ = this[Strings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) - } - - @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { - let this = jsObject - _ = this[Strings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/ChildNode.swift b/Sources/DOMKit/WebIDL/ChildNode.swift deleted file mode 100644 index e2377621..00000000 --- a/Sources/DOMKit/WebIDL/ChildNode.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol ChildNode: JSBridgedClass {} -public extension ChildNode { - @inlinable func before(nodes: Node_or_String...) { - let this = jsObject - _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func after(nodes: Node_or_String...) { - let this = jsObject - _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func replaceWith(nodes: Node_or_String...) { - let this = jsObject - _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func remove() { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/ClientQueryOptions.swift b/Sources/DOMKit/WebIDL/ClientQueryOptions.swift deleted file mode 100644 index 3b4a2778..00000000 --- a/Sources/DOMKit/WebIDL/ClientQueryOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ClientQueryOptions: BridgedDictionary { - public convenience init(includeUncontrolled: Bool, type: ClientType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.includeUncontrolled] = includeUncontrolled.jsValue - object[Strings.type] = type.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: Strings.includeUncontrolled) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var includeUncontrolled: Bool - - @ReadWriteAttribute - public var type: ClientType -} diff --git a/Sources/DOMKit/WebIDL/ClientType.swift b/Sources/DOMKit/WebIDL/ClientType.swift deleted file mode 100644 index 91197c8f..00000000 --- a/Sources/DOMKit/WebIDL/ClientType.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ClientType: JSString, JSValueCompatible { - case window = "window" - case worker = "worker" - case sharedworker = "sharedworker" - case all = "all" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ClosureAttribute.swift b/Sources/DOMKit/WebIDL/ClosureAttribute.swift deleted file mode 100644 index 5bb26ecc..00000000 --- a/Sources/DOMKit/WebIDL/ClosureAttribute.swift +++ /dev/null @@ -1,455 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -/* variadic generics please */ -@propertyWrapper public final class ClosureAttribute0 - where ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: () -> ReturnType { - get { ClosureAttribute0[name, in: jsObject] } - set { ClosureAttribute0[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> ReturnType { - get { - let function = jsObject[name].function! - return { function().fromJSValue()! } - } - set { - jsObject[name] = JSClosure { _ in - newValue().jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute0Optional - where ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (() -> ReturnType)? { - get { ClosureAttribute0Optional[name, in: jsObject] } - set { ClosureAttribute0Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function().fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { _ in - newValue().jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute0OptionalVoid { - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (() -> Void)? { - get { ClosureAttribute0OptionalVoid[name, in: jsObject] } - set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function() } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { _ in - newValue() - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute0Void { - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: () -> Void { - get { ClosureAttribute0Void[name, in: jsObject] } - set { ClosureAttribute0Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { - get { - let function = jsObject[name].function! - return { function() } - } - set { - jsObject[name] = JSClosure { _ in - newValue() - return .undefined - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute1 - where A0: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0) -> ReturnType { - get { ClosureAttribute1[name, in: jsObject] } - set { ClosureAttribute1[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!).jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute1Optional - where A0: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0) -> ReturnType)? { - get { ClosureAttribute1Optional[name, in: jsObject] } - set { ClosureAttribute1Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute1OptionalVoid - where A0: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0) -> Void)? { - get { ClosureAttribute1OptionalVoid[name, in: jsObject] } - set { ClosureAttribute1OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue) } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!) - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute1Void - where A0: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0) -> Void { - get { ClosureAttribute1Void[name, in: jsObject] } - set { ClosureAttribute1Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> Void { - get { - let function = jsObject[name].function! - return { function($0.jsValue) } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!) - return .undefined - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute2 - where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0, A1) -> ReturnType { - get { ClosureAttribute2[name, in: jsObject] } - set { ClosureAttribute2[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute2Optional - where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0, A1) -> ReturnType)? { - get { ClosureAttribute2Optional[name, in: jsObject] } - set { ClosureAttribute2Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute2OptionalVoid - where A0: JSValueCompatible, A1: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0, A1) -> Void)? { - get { ClosureAttribute2OptionalVoid[name, in: jsObject] } - set { ClosureAttribute2OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue) } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute2Void - where A0: JSValueCompatible, A1: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0, A1) -> Void { - get { ClosureAttribute2Void[name, in: jsObject] } - set { ClosureAttribute2Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> Void { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue) } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) - return .undefined - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute5 - where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0, A1, A2, A3, A4) -> ReturnType { - get { ClosureAttribute5[name, in: jsObject] } - set { ClosureAttribute5[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1, A2, A3, A4) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute5Optional - where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0, A1, A2, A3, A4) -> ReturnType)? { - get { ClosureAttribute5Optional[name, in: jsObject] } - set { ClosureAttribute5Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1, A2, A3, A4) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} diff --git a/Sources/DOMKit/WebIDL/ColorSpaceConversion.swift b/Sources/DOMKit/WebIDL/ColorSpaceConversion.swift deleted file mode 100644 index 862682ed..00000000 --- a/Sources/DOMKit/WebIDL/ColorSpaceConversion.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ColorSpaceConversion: JSString, JSValueCompatible { - case none = "none" - case `default` = "default" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Comment.swift b/Sources/DOMKit/WebIDL/Comment.swift deleted file mode 100644 index 50ca3b54..00000000 --- a/Sources/DOMKit/WebIDL/Comment.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Comment: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Comment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) - } -} diff --git a/Sources/DOMKit/WebIDL/CompositeOperation.swift b/Sources/DOMKit/WebIDL/CompositeOperation.swift deleted file mode 100644 index 5dd32127..00000000 --- a/Sources/DOMKit/WebIDL/CompositeOperation.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CompositeOperation: JSString, JSValueCompatible { - case replace = "replace" - case add = "add" - case accumulate = "accumulate" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CompositeOperationOrAuto.swift b/Sources/DOMKit/WebIDL/CompositeOperationOrAuto.swift deleted file mode 100644 index 7099d596..00000000 --- a/Sources/DOMKit/WebIDL/CompositeOperationOrAuto.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CompositeOperationOrAuto: JSString, JSValueCompatible { - case replace = "replace" - case add = "add" - case accumulate = "accumulate" - case auto = "auto" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto.swift b/Sources/DOMKit/WebIDL/CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto.swift deleted file mode 100644 index ff36a42d..00000000 --- a/Sources/DOMKit/WebIDL/CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: ConvertibleToJSValue {} -extension CompositeOperationOrAuto: Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto {} -extension Array: Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto where Element == CompositeOperationOrAuto {} - -public enum CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: JSValueCompatible, Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto { - case compositeOperationOrAuto(CompositeOperationOrAuto) - case seq_of_CompositeOperationOrAuto([CompositeOperationOrAuto]) - - var compositeOperationOrAuto: CompositeOperationOrAuto? { - switch self { - case let .compositeOperationOrAuto(compositeOperationOrAuto): return compositeOperationOrAuto - default: return nil - } - } - - var seq_of_CompositeOperationOrAuto: [CompositeOperationOrAuto]? { - switch self { - case let .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto): return seq_of_CompositeOperationOrAuto - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let compositeOperationOrAuto: CompositeOperationOrAuto = value.fromJSValue() { - return .compositeOperationOrAuto(compositeOperationOrAuto) - } - if let seq_of_CompositeOperationOrAuto: [CompositeOperationOrAuto] = value.fromJSValue() { - return .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .compositeOperationOrAuto(compositeOperationOrAuto): - return compositeOperationOrAuto.jsValue - case let .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto): - return seq_of_CompositeOperationOrAuto.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/CompositionEvent.swift b/Sources/DOMKit/WebIDL/CompositionEvent.swift deleted file mode 100644 index f5426676..00000000 --- a/Sources/DOMKit/WebIDL/CompositionEvent.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CompositionEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CompositionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: CompositionEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: String - - @inlinable public func initCompositionEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: WindowProxy? = nil, dataArg: String? = nil) { - let this = jsObject - _ = this[Strings.initCompositionEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, dataArg?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/CompositionEventInit.swift b/Sources/DOMKit/WebIDL/CompositionEventInit.swift deleted file mode 100644 index f3fa15f7..00000000 --- a/Sources/DOMKit/WebIDL/CompositionEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CompositionEventInit: BridgedDictionary { - public convenience init(data: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: String -} diff --git a/Sources/DOMKit/WebIDL/ComputedEffectTiming.swift b/Sources/DOMKit/WebIDL/ComputedEffectTiming.swift deleted file mode 100644 index b95ffc91..00000000 --- a/Sources/DOMKit/WebIDL/ComputedEffectTiming.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ComputedEffectTiming: BridgedDictionary { - public convenience init(progress: Double?, currentIteration: Double?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.progress] = progress.jsValue - object[Strings.currentIteration] = currentIteration.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _progress = ReadWriteAttribute(jsObject: object, name: Strings.progress) - _currentIteration = ReadWriteAttribute(jsObject: object, name: Strings.currentIteration) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var progress: Double? - - @ReadWriteAttribute - public var currentIteration: Double? -} diff --git a/Sources/DOMKit/WebIDL/CountQueuingStrategy.swift b/Sources/DOMKit/WebIDL/CountQueuingStrategy.swift deleted file mode 100644 index 5362a092..00000000 --- a/Sources/DOMKit/WebIDL/CountQueuingStrategy.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CountQueuingStrategy: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: QueuingStrategyInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var highWaterMark: Double - - @ReadonlyAttribute - public var size: JSFunction -} diff --git a/Sources/DOMKit/WebIDL/CustomElementRegistry.swift b/Sources/DOMKit/WebIDL/CustomElementRegistry.swift deleted file mode 100644 index 18c39967..00000000 --- a/Sources/DOMKit/WebIDL/CustomElementRegistry.swift +++ /dev/null @@ -1,41 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CustomElementRegistry: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CustomElementRegistry].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { - let this = jsObject - _ = this[Strings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func get(name: String) -> CustomElementConstructor? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func whenDefined(name: String) -> JSPromise { - let this = jsObject - return this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { - let this = jsObject - let _promise: JSPromise = this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func upgrade(root: Node) { - let this = jsObject - _ = this[Strings.upgrade].function!(this: this, arguments: [root.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/CustomEvent.swift b/Sources/DOMKit/WebIDL/CustomEvent.swift deleted file mode 100644 index cb6978e7..00000000 --- a/Sources/DOMKit/WebIDL/CustomEvent.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CustomEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CustomEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var detail: JSValue - - @inlinable public func initCustomEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, detail: JSValue? = nil) { - let this = jsObject - _ = this[Strings.initCustomEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined, detail?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/CustomEventInit.swift b/Sources/DOMKit/WebIDL/CustomEventInit.swift deleted file mode 100644 index 7447c406..00000000 --- a/Sources/DOMKit/WebIDL/CustomEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CustomEventInit: BridgedDictionary { - public convenience init(detail: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.detail] = detail.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var detail: JSValue -} diff --git a/Sources/DOMKit/WebIDL/DOMException.swift b/Sources/DOMKit/WebIDL/DOMException.swift deleted file mode 100644 index 9dc26feb..00000000 --- a/Sources/DOMKit/WebIDL/DOMException.swift +++ /dev/null @@ -1,80 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMException: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - self.jsObject = jsObject - } - - @inlinable public convenience init(message: String? = nil, name: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var message: String - - @ReadonlyAttribute - public var code: UInt16 - - public static let INDEX_SIZE_ERR: UInt16 = 1 - - public static let DOMSTRING_SIZE_ERR: UInt16 = 2 - - public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 - - public static let WRONG_DOCUMENT_ERR: UInt16 = 4 - - public static let INVALID_CHARACTER_ERR: UInt16 = 5 - - public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 - - public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 - - public static let NOT_FOUND_ERR: UInt16 = 8 - - public static let NOT_SUPPORTED_ERR: UInt16 = 9 - - public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 - - public static let INVALID_STATE_ERR: UInt16 = 11 - - public static let SYNTAX_ERR: UInt16 = 12 - - public static let INVALID_MODIFICATION_ERR: UInt16 = 13 - - public static let NAMESPACE_ERR: UInt16 = 14 - - public static let INVALID_ACCESS_ERR: UInt16 = 15 - - public static let VALIDATION_ERR: UInt16 = 16 - - public static let TYPE_MISMATCH_ERR: UInt16 = 17 - - public static let SECURITY_ERR: UInt16 = 18 - - public static let NETWORK_ERR: UInt16 = 19 - - public static let ABORT_ERR: UInt16 = 20 - - public static let URL_MISMATCH_ERR: UInt16 = 21 - - public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 - - public static let TIMEOUT_ERR: UInt16 = 23 - - public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 - - public static let DATA_CLONE_ERR: UInt16 = 25 -} diff --git a/Sources/DOMKit/WebIDL/DOMImplementation.swift b/Sources/DOMKit/WebIDL/DOMImplementation.swift deleted file mode 100644 index c4a0457b..00000000 --- a/Sources/DOMKit/WebIDL/DOMImplementation.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMImplementation: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMImplementation].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func createDocumentType(qualifiedName: String, publicId: String, systemId: String) -> DocumentType { - let this = jsObject - return this[Strings.createDocumentType].function!(this: this, arguments: [qualifiedName.jsValue, publicId.jsValue, systemId.jsValue]).fromJSValue()! - } - - @inlinable public func createDocument(namespace: String?, qualifiedName: String, doctype: DocumentType? = nil) -> XMLDocument { - let this = jsObject - return this[Strings.createDocument].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, doctype?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createHTMLDocument(title: String? = nil) -> Document { - let this = jsObject - return this[Strings.createHTMLDocument].function!(this: this, arguments: [title?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func hasFeature() -> Bool { - let this = jsObject - return this[Strings.hasFeature].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMMatrix.swift b/Sources/DOMKit/WebIDL/DOMMatrix.swift deleted file mode 100644 index 18cf4dd3..00000000 --- a/Sources/DOMKit/WebIDL/DOMMatrix.swift +++ /dev/null @@ -1,245 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMMatrix: DOMMatrixReadOnly { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrix].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _a = ReadWriteAttribute(jsObject: jsObject, name: Strings.a) - _b = ReadWriteAttribute(jsObject: jsObject, name: Strings.b) - _c = ReadWriteAttribute(jsObject: jsObject, name: Strings.c) - _d = ReadWriteAttribute(jsObject: jsObject, name: Strings.d) - _e = ReadWriteAttribute(jsObject: jsObject, name: Strings.e) - _f = ReadWriteAttribute(jsObject: jsObject, name: Strings.f) - _m11 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m11) - _m12 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m12) - _m13 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m13) - _m14 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m14) - _m21 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m21) - _m22 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m22) - _m23 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m23) - _m24 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m24) - _m31 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m31) - _m32 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m32) - _m33 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m33) - _m34 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m34) - _m41 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m41) - _m42 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m42) - _m43 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m43) - _m44 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m44) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(init: String_or_seq_of_Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - // XXX: illegal static override - // override public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self - - // XXX: illegal static override - // override public static func fromFloat32Array(array32: Float32Array) -> Self - - // XXX: illegal static override - // override public static func fromFloat64Array(array64: Float64Array) -> Self - - @usableFromInline let _a: ReadWriteAttribute - @inlinable override public var a: Double { - get { _a.wrappedValue } - set { _a.wrappedValue = newValue } - } - - @usableFromInline let _b: ReadWriteAttribute - @inlinable override public var b: Double { - get { _b.wrappedValue } - set { _b.wrappedValue = newValue } - } - - @usableFromInline let _c: ReadWriteAttribute - @inlinable override public var c: Double { - get { _c.wrappedValue } - set { _c.wrappedValue = newValue } - } - - @usableFromInline let _d: ReadWriteAttribute - @inlinable override public var d: Double { - get { _d.wrappedValue } - set { _d.wrappedValue = newValue } - } - - @usableFromInline let _e: ReadWriteAttribute - @inlinable override public var e: Double { - get { _e.wrappedValue } - set { _e.wrappedValue = newValue } - } - - @usableFromInline let _f: ReadWriteAttribute - @inlinable override public var f: Double { - get { _f.wrappedValue } - set { _f.wrappedValue = newValue } - } - - @usableFromInline let _m11: ReadWriteAttribute - @inlinable override public var m11: Double { - get { _m11.wrappedValue } - set { _m11.wrappedValue = newValue } - } - - @usableFromInline let _m12: ReadWriteAttribute - @inlinable override public var m12: Double { - get { _m12.wrappedValue } - set { _m12.wrappedValue = newValue } - } - - @usableFromInline let _m13: ReadWriteAttribute - @inlinable override public var m13: Double { - get { _m13.wrappedValue } - set { _m13.wrappedValue = newValue } - } - - @usableFromInline let _m14: ReadWriteAttribute - @inlinable override public var m14: Double { - get { _m14.wrappedValue } - set { _m14.wrappedValue = newValue } - } - - @usableFromInline let _m21: ReadWriteAttribute - @inlinable override public var m21: Double { - get { _m21.wrappedValue } - set { _m21.wrappedValue = newValue } - } - - @usableFromInline let _m22: ReadWriteAttribute - @inlinable override public var m22: Double { - get { _m22.wrappedValue } - set { _m22.wrappedValue = newValue } - } - - @usableFromInline let _m23: ReadWriteAttribute - @inlinable override public var m23: Double { - get { _m23.wrappedValue } - set { _m23.wrappedValue = newValue } - } - - @usableFromInline let _m24: ReadWriteAttribute - @inlinable override public var m24: Double { - get { _m24.wrappedValue } - set { _m24.wrappedValue = newValue } - } - - @usableFromInline let _m31: ReadWriteAttribute - @inlinable override public var m31: Double { - get { _m31.wrappedValue } - set { _m31.wrappedValue = newValue } - } - - @usableFromInline let _m32: ReadWriteAttribute - @inlinable override public var m32: Double { - get { _m32.wrappedValue } - set { _m32.wrappedValue = newValue } - } - - @usableFromInline let _m33: ReadWriteAttribute - @inlinable override public var m33: Double { - get { _m33.wrappedValue } - set { _m33.wrappedValue = newValue } - } - - @usableFromInline let _m34: ReadWriteAttribute - @inlinable override public var m34: Double { - get { _m34.wrappedValue } - set { _m34.wrappedValue = newValue } - } - - @usableFromInline let _m41: ReadWriteAttribute - @inlinable override public var m41: Double { - get { _m41.wrappedValue } - set { _m41.wrappedValue = newValue } - } - - @usableFromInline let _m42: ReadWriteAttribute - @inlinable override public var m42: Double { - get { _m42.wrappedValue } - set { _m42.wrappedValue = newValue } - } - - @usableFromInline let _m43: ReadWriteAttribute - @inlinable override public var m43: Double { - get { _m43.wrappedValue } - set { _m43.wrappedValue = newValue } - } - - @usableFromInline let _m44: ReadWriteAttribute - @inlinable override public var m44: Double { - get { _m44.wrappedValue } - set { _m44.wrappedValue = newValue } - } - - @inlinable public func multiplySelf(other: DOMMatrixInit? = nil) -> Self { - let this = jsObject - return this[Strings.multiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func preMultiplySelf(other: DOMMatrixInit? = nil) -> Self { - let this = jsObject - return this[Strings.preMultiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func translateSelf(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> Self { - let this = jsObject - return this[Strings.translateSelf].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scaleSelf(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { - let _arg0 = scaleX?.jsValue ?? .undefined - let _arg1 = scaleY?.jsValue ?? .undefined - let _arg2 = scaleZ?.jsValue ?? .undefined - let _arg3 = originX?.jsValue ?? .undefined - let _arg4 = originY?.jsValue ?? .undefined - let _arg5 = originZ?.jsValue ?? .undefined - let this = jsObject - return this[Strings.scaleSelf].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable public func scale3dSelf(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { - let this = jsObject - return this[Strings.scale3dSelf].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateSelf(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> Self { - let this = jsObject - return this[Strings.rotateSelf].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateFromVectorSelf(x: Double? = nil, y: Double? = nil) -> Self { - let this = jsObject - return this[Strings.rotateFromVectorSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateAxisAngleSelf(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> Self { - let this = jsObject - return this[Strings.rotateAxisAngleSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewXSelf(sx: Double? = nil) -> Self { - let this = jsObject - return this[Strings.skewXSelf].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewYSelf(sy: Double? = nil) -> Self { - let this = jsObject - return this[Strings.skewYSelf].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func invertSelf() -> Self { - let this = jsObject - return this[Strings.invertSelf].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setMatrixValue(transformList: String) -> Self { - let this = jsObject - return this[Strings.setMatrixValue].function!(this: this, arguments: [transformList.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMMatrix2DInit.swift b/Sources/DOMKit/WebIDL/DOMMatrix2DInit.swift deleted file mode 100644 index 06a3d09e..00000000 --- a/Sources/DOMKit/WebIDL/DOMMatrix2DInit.swift +++ /dev/null @@ -1,75 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMMatrix2DInit: BridgedDictionary { - public convenience init(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double, m11: Double, m12: Double, m21: Double, m22: Double, m41: Double, m42: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.a] = a.jsValue - object[Strings.b] = b.jsValue - object[Strings.c] = c.jsValue - object[Strings.d] = d.jsValue - object[Strings.e] = e.jsValue - object[Strings.f] = f.jsValue - object[Strings.m11] = m11.jsValue - object[Strings.m12] = m12.jsValue - object[Strings.m21] = m21.jsValue - object[Strings.m22] = m22.jsValue - object[Strings.m41] = m41.jsValue - object[Strings.m42] = m42.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _a = ReadWriteAttribute(jsObject: object, name: Strings.a) - _b = ReadWriteAttribute(jsObject: object, name: Strings.b) - _c = ReadWriteAttribute(jsObject: object, name: Strings.c) - _d = ReadWriteAttribute(jsObject: object, name: Strings.d) - _e = ReadWriteAttribute(jsObject: object, name: Strings.e) - _f = ReadWriteAttribute(jsObject: object, name: Strings.f) - _m11 = ReadWriteAttribute(jsObject: object, name: Strings.m11) - _m12 = ReadWriteAttribute(jsObject: object, name: Strings.m12) - _m21 = ReadWriteAttribute(jsObject: object, name: Strings.m21) - _m22 = ReadWriteAttribute(jsObject: object, name: Strings.m22) - _m41 = ReadWriteAttribute(jsObject: object, name: Strings.m41) - _m42 = ReadWriteAttribute(jsObject: object, name: Strings.m42) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var a: Double - - @ReadWriteAttribute - public var b: Double - - @ReadWriteAttribute - public var c: Double - - @ReadWriteAttribute - public var d: Double - - @ReadWriteAttribute - public var e: Double - - @ReadWriteAttribute - public var f: Double - - @ReadWriteAttribute - public var m11: Double - - @ReadWriteAttribute - public var m12: Double - - @ReadWriteAttribute - public var m21: Double - - @ReadWriteAttribute - public var m22: Double - - @ReadWriteAttribute - public var m41: Double - - @ReadWriteAttribute - public var m42: Double -} diff --git a/Sources/DOMKit/WebIDL/DOMMatrixInit.swift b/Sources/DOMKit/WebIDL/DOMMatrixInit.swift deleted file mode 100644 index ad1d2d1d..00000000 --- a/Sources/DOMKit/WebIDL/DOMMatrixInit.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMMatrixInit: BridgedDictionary { - public convenience init(m13: Double, m14: Double, m23: Double, m24: Double, m31: Double, m32: Double, m33: Double, m34: Double, m43: Double, m44: Double, is2D: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.m13] = m13.jsValue - object[Strings.m14] = m14.jsValue - object[Strings.m23] = m23.jsValue - object[Strings.m24] = m24.jsValue - object[Strings.m31] = m31.jsValue - object[Strings.m32] = m32.jsValue - object[Strings.m33] = m33.jsValue - object[Strings.m34] = m34.jsValue - object[Strings.m43] = m43.jsValue - object[Strings.m44] = m44.jsValue - object[Strings.is2D] = is2D.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _m13 = ReadWriteAttribute(jsObject: object, name: Strings.m13) - _m14 = ReadWriteAttribute(jsObject: object, name: Strings.m14) - _m23 = ReadWriteAttribute(jsObject: object, name: Strings.m23) - _m24 = ReadWriteAttribute(jsObject: object, name: Strings.m24) - _m31 = ReadWriteAttribute(jsObject: object, name: Strings.m31) - _m32 = ReadWriteAttribute(jsObject: object, name: Strings.m32) - _m33 = ReadWriteAttribute(jsObject: object, name: Strings.m33) - _m34 = ReadWriteAttribute(jsObject: object, name: Strings.m34) - _m43 = ReadWriteAttribute(jsObject: object, name: Strings.m43) - _m44 = ReadWriteAttribute(jsObject: object, name: Strings.m44) - _is2D = ReadWriteAttribute(jsObject: object, name: Strings.is2D) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var m13: Double - - @ReadWriteAttribute - public var m14: Double - - @ReadWriteAttribute - public var m23: Double - - @ReadWriteAttribute - public var m24: Double - - @ReadWriteAttribute - public var m31: Double - - @ReadWriteAttribute - public var m32: Double - - @ReadWriteAttribute - public var m33: Double - - @ReadWriteAttribute - public var m34: Double - - @ReadWriteAttribute - public var m43: Double - - @ReadWriteAttribute - public var m44: Double - - @ReadWriteAttribute - public var is2D: Bool -} diff --git a/Sources/DOMKit/WebIDL/DOMMatrixReadOnly.swift b/Sources/DOMKit/WebIDL/DOMMatrixReadOnly.swift deleted file mode 100644 index beec4a60..00000000 --- a/Sources/DOMKit/WebIDL/DOMMatrixReadOnly.swift +++ /dev/null @@ -1,224 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMMatrixReadOnly: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrixReadOnly].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _a = ReadonlyAttribute(jsObject: jsObject, name: Strings.a) - _b = ReadonlyAttribute(jsObject: jsObject, name: Strings.b) - _c = ReadonlyAttribute(jsObject: jsObject, name: Strings.c) - _d = ReadonlyAttribute(jsObject: jsObject, name: Strings.d) - _e = ReadonlyAttribute(jsObject: jsObject, name: Strings.e) - _f = ReadonlyAttribute(jsObject: jsObject, name: Strings.f) - _m11 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m11) - _m12 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m12) - _m13 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m13) - _m14 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m14) - _m21 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m21) - _m22 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m22) - _m23 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m23) - _m24 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m24) - _m31 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m31) - _m32 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m32) - _m33 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m33) - _m34 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m34) - _m41 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m41) - _m42 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m42) - _m43 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m43) - _m44 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m44) - _is2D = ReadonlyAttribute(jsObject: jsObject, name: Strings.is2D) - _isIdentity = ReadonlyAttribute(jsObject: jsObject, name: Strings.isIdentity) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: String_or_seq_of_Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self { - let this = constructor - return this[Strings.fromMatrix].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public static func fromFloat32Array(array32: Float32Array) -> Self { - let this = constructor - return this[Strings.fromFloat32Array].function!(this: this, arguments: [array32.jsValue]).fromJSValue()! - } - - @inlinable public static func fromFloat64Array(array64: Float64Array) -> Self { - let this = constructor - return this[Strings.fromFloat64Array].function!(this: this, arguments: [array64.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var a: Double - - @ReadonlyAttribute - public var b: Double - - @ReadonlyAttribute - public var c: Double - - @ReadonlyAttribute - public var d: Double - - @ReadonlyAttribute - public var e: Double - - @ReadonlyAttribute - public var f: Double - - @ReadonlyAttribute - public var m11: Double - - @ReadonlyAttribute - public var m12: Double - - @ReadonlyAttribute - public var m13: Double - - @ReadonlyAttribute - public var m14: Double - - @ReadonlyAttribute - public var m21: Double - - @ReadonlyAttribute - public var m22: Double - - @ReadonlyAttribute - public var m23: Double - - @ReadonlyAttribute - public var m24: Double - - @ReadonlyAttribute - public var m31: Double - - @ReadonlyAttribute - public var m32: Double - - @ReadonlyAttribute - public var m33: Double - - @ReadonlyAttribute - public var m34: Double - - @ReadonlyAttribute - public var m41: Double - - @ReadonlyAttribute - public var m42: Double - - @ReadonlyAttribute - public var m43: Double - - @ReadonlyAttribute - public var m44: Double - - @ReadonlyAttribute - public var is2D: Bool - - @ReadonlyAttribute - public var isIdentity: Bool - - @inlinable public func translate(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.translate].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scale(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { - let _arg0 = scaleX?.jsValue ?? .undefined - let _arg1 = scaleY?.jsValue ?? .undefined - let _arg2 = scaleZ?.jsValue ?? .undefined - let _arg3 = originX?.jsValue ?? .undefined - let _arg4 = originY?.jsValue ?? .undefined - let _arg5 = originZ?.jsValue ?? .undefined - let this = jsObject - return this[Strings.scale].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable public func scaleNonUniform(scaleX: Double? = nil, scaleY: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.scaleNonUniform].function!(this: this, arguments: [scaleX?.jsValue ?? .undefined, scaleY?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scale3d(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.scale3d].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotate(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.rotate].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateFromVector(x: Double? = nil, y: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.rotateFromVector].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateAxisAngle(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.rotateAxisAngle].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewX(sx: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.skewX].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewY(sy: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.skewY].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func multiply(other: DOMMatrixInit? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.multiply].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func flipX() -> DOMMatrix { - let this = jsObject - return this[Strings.flipX].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func flipY() -> DOMMatrix { - let this = jsObject - return this[Strings.flipY].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func inverse() -> DOMMatrix { - let this = jsObject - return this[Strings.inverse].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func transformPoint(point: DOMPointInit? = nil) -> DOMPoint { - let this = jsObject - return this[Strings.transformPoint].function!(this: this, arguments: [point?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toFloat32Array() -> Float32Array { - let this = jsObject - return this[Strings.toFloat32Array].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func toFloat64Array() -> Float64Array { - let this = jsObject - return this[Strings.toFloat64Array].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMParser.swift b/Sources/DOMKit/WebIDL/DOMParser.swift deleted file mode 100644 index 05ae1ed7..00000000 --- a/Sources/DOMKit/WebIDL/DOMParser.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMParser: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMParser].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func parseFromString(string: String, type: DOMParserSupportedType) -> Document { - let this = jsObject - return this[Strings.parseFromString].function!(this: this, arguments: [string.jsValue, type.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMParserSupportedType.swift b/Sources/DOMKit/WebIDL/DOMParserSupportedType.swift deleted file mode 100644 index 273ffda3..00000000 --- a/Sources/DOMKit/WebIDL/DOMParserSupportedType.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum DOMParserSupportedType: JSString, JSValueCompatible { - case textHtml = "text/html" - case textXml = "text/xml" - case applicationXml = "application/xml" - case applicationXhtmlXml = "application/xhtml+xml" - case imageSvgXml = "image/svg+xml" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/DOMPoint.swift b/Sources/DOMKit/WebIDL/DOMPoint.swift deleted file mode 100644 index a6a4c7af..00000000 --- a/Sources/DOMKit/WebIDL/DOMPoint.swift +++ /dev/null @@ -1,47 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMPoint: DOMPointReadOnly { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMPoint].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) - _z = ReadWriteAttribute(jsObject: jsObject, name: Strings.z) - _w = ReadWriteAttribute(jsObject: jsObject, name: Strings.w) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) - } - - // XXX: illegal static override - // override public static func fromPoint(other: DOMPointInit? = nil) -> Self - - @usableFromInline let _x: ReadWriteAttribute - @inlinable override public var x: Double { - get { _x.wrappedValue } - set { _x.wrappedValue = newValue } - } - - @usableFromInline let _y: ReadWriteAttribute - @inlinable override public var y: Double { - get { _y.wrappedValue } - set { _y.wrappedValue = newValue } - } - - @usableFromInline let _z: ReadWriteAttribute - @inlinable override public var z: Double { - get { _z.wrappedValue } - set { _z.wrappedValue = newValue } - } - - @usableFromInline let _w: ReadWriteAttribute - @inlinable override public var w: Double { - get { _w.wrappedValue } - set { _w.wrappedValue = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/DOMPointInit.swift b/Sources/DOMKit/WebIDL/DOMPointInit.swift deleted file mode 100644 index 375d2f33..00000000 --- a/Sources/DOMKit/WebIDL/DOMPointInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMPointInit: BridgedDictionary { - public convenience init(x: Double, y: Double, z: Double, w: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.x] = x.jsValue - object[Strings.y] = y.jsValue - object[Strings.z] = z.jsValue - object[Strings.w] = w.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _x = ReadWriteAttribute(jsObject: object, name: Strings.x) - _y = ReadWriteAttribute(jsObject: object, name: Strings.y) - _z = ReadWriteAttribute(jsObject: object, name: Strings.z) - _w = ReadWriteAttribute(jsObject: object, name: Strings.w) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var x: Double - - @ReadWriteAttribute - public var y: Double - - @ReadWriteAttribute - public var z: Double - - @ReadWriteAttribute - public var w: Double -} diff --git a/Sources/DOMKit/WebIDL/DOMPointInit_or_Double.swift b/Sources/DOMKit/WebIDL/DOMPointInit_or_Double.swift deleted file mode 100644 index 8fdec85e..00000000 --- a/Sources/DOMKit/WebIDL/DOMPointInit_or_Double.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_DOMPointInit_or_Double: ConvertibleToJSValue {} -extension DOMPointInit: Any_DOMPointInit_or_Double {} -extension Double: Any_DOMPointInit_or_Double {} - -public enum DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double { - case domPointInit(DOMPointInit) - case double(Double) - - var domPointInit: DOMPointInit? { - switch self { - case let .domPointInit(domPointInit): return domPointInit - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let domPointInit: DOMPointInit = value.fromJSValue() { - return .domPointInit(domPointInit) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double.swift b/Sources/DOMKit/WebIDL/DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double.swift deleted file mode 100644 index e8a88b4d..00000000 --- a/Sources/DOMKit/WebIDL/DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: ConvertibleToJSValue {} -extension DOMPointInit: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} -extension Double: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} -extension Array: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double where Element == DOMPointInit_or_Double {} - -public enum DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double { - case domPointInit(DOMPointInit) - case double(Double) - case seq_of_DOMPointInit_or_Double([DOMPointInit_or_Double]) - - var domPointInit: DOMPointInit? { - switch self { - case let .domPointInit(domPointInit): return domPointInit - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double]? { - switch self { - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): return seq_of_DOMPointInit_or_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let domPointInit: DOMPointInit = value.fromJSValue() { - return .domPointInit(domPointInit) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { - return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): - return seq_of_DOMPointInit_or_Double.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/DOMPointReadOnly.swift b/Sources/DOMKit/WebIDL/DOMPointReadOnly.swift deleted file mode 100644 index 40a34293..00000000 --- a/Sources/DOMKit/WebIDL/DOMPointReadOnly.swift +++ /dev/null @@ -1,49 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMPointReadOnly: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMPointReadOnly].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) - _z = ReadonlyAttribute(jsObject: jsObject, name: Strings.z) - _w = ReadonlyAttribute(jsObject: jsObject, name: Strings.w) - self.jsObject = jsObject - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) - } - - @inlinable public static func fromPoint(other: DOMPointInit? = nil) -> Self { - let this = constructor - return this[Strings.fromPoint].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var x: Double - - @ReadonlyAttribute - public var y: Double - - @ReadonlyAttribute - public var z: Double - - @ReadonlyAttribute - public var w: Double - - @inlinable public func matrixTransform(matrix: DOMMatrixInit? = nil) -> DOMPoint { - let this = jsObject - return this[Strings.matrixTransform].function!(this: this, arguments: [matrix?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMQuad.swift b/Sources/DOMKit/WebIDL/DOMQuad.swift deleted file mode 100644 index 258b0fd5..00000000 --- a/Sources/DOMKit/WebIDL/DOMQuad.swift +++ /dev/null @@ -1,54 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMQuad: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMQuad].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _p1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p1) - _p2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p2) - _p3 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p3) - _p4 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p4) - self.jsObject = jsObject - } - - @inlinable public convenience init(p1: DOMPointInit? = nil, p2: DOMPointInit? = nil, p3: DOMPointInit? = nil, p4: DOMPointInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [p1?.jsValue ?? .undefined, p2?.jsValue ?? .undefined, p3?.jsValue ?? .undefined, p4?.jsValue ?? .undefined])) - } - - @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { - let this = constructor - return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public static func fromQuad(other: DOMQuadInit? = nil) -> Self { - let this = constructor - return this[Strings.fromQuad].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var p1: DOMPoint - - @ReadonlyAttribute - public var p2: DOMPoint - - @ReadonlyAttribute - public var p3: DOMPoint - - @ReadonlyAttribute - public var p4: DOMPoint - - @inlinable public func getBounds() -> DOMRect { - let this = jsObject - return this[Strings.getBounds].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMQuadInit.swift b/Sources/DOMKit/WebIDL/DOMQuadInit.swift deleted file mode 100644 index 19faf473..00000000 --- a/Sources/DOMKit/WebIDL/DOMQuadInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMQuadInit: BridgedDictionary { - public convenience init(p1: DOMPointInit, p2: DOMPointInit, p3: DOMPointInit, p4: DOMPointInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.p1] = p1.jsValue - object[Strings.p2] = p2.jsValue - object[Strings.p3] = p3.jsValue - object[Strings.p4] = p4.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _p1 = ReadWriteAttribute(jsObject: object, name: Strings.p1) - _p2 = ReadWriteAttribute(jsObject: object, name: Strings.p2) - _p3 = ReadWriteAttribute(jsObject: object, name: Strings.p3) - _p4 = ReadWriteAttribute(jsObject: object, name: Strings.p4) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var p1: DOMPointInit - - @ReadWriteAttribute - public var p2: DOMPointInit - - @ReadWriteAttribute - public var p3: DOMPointInit - - @ReadWriteAttribute - public var p4: DOMPointInit -} diff --git a/Sources/DOMKit/WebIDL/DOMRect.swift b/Sources/DOMKit/WebIDL/DOMRect.swift deleted file mode 100644 index 8214b20d..00000000 --- a/Sources/DOMKit/WebIDL/DOMRect.swift +++ /dev/null @@ -1,47 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMRect: DOMRectReadOnly { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMRect].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) - } - - // XXX: illegal static override - // override public static func fromRect(other: DOMRectInit? = nil) -> Self - - @usableFromInline let _x: ReadWriteAttribute - @inlinable override public var x: Double { - get { _x.wrappedValue } - set { _x.wrappedValue = newValue } - } - - @usableFromInline let _y: ReadWriteAttribute - @inlinable override public var y: Double { - get { _y.wrappedValue } - set { _y.wrappedValue = newValue } - } - - @usableFromInline let _width: ReadWriteAttribute - @inlinable override public var width: Double { - get { _width.wrappedValue } - set { _width.wrappedValue = newValue } - } - - @usableFromInline let _height: ReadWriteAttribute - @inlinable override public var height: Double { - get { _height.wrappedValue } - set { _height.wrappedValue = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/DOMRectInit.swift b/Sources/DOMKit/WebIDL/DOMRectInit.swift deleted file mode 100644 index 0c6ec947..00000000 --- a/Sources/DOMKit/WebIDL/DOMRectInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMRectInit: BridgedDictionary { - public convenience init(x: Double, y: Double, width: Double, height: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.x] = x.jsValue - object[Strings.y] = y.jsValue - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _x = ReadWriteAttribute(jsObject: object, name: Strings.x) - _y = ReadWriteAttribute(jsObject: object, name: Strings.y) - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var x: Double - - @ReadWriteAttribute - public var y: Double - - @ReadWriteAttribute - public var width: Double - - @ReadWriteAttribute - public var height: Double -} diff --git a/Sources/DOMKit/WebIDL/DOMRectList.swift b/Sources/DOMKit/WebIDL/DOMRectList.swift deleted file mode 100644 index 8884a007..00000000 --- a/Sources/DOMKit/WebIDL/DOMRectList.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMRectList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> DOMRect? { - jsObject[key].fromJSValue() - } -} diff --git a/Sources/DOMKit/WebIDL/DOMRectReadOnly.swift b/Sources/DOMKit/WebIDL/DOMRectReadOnly.swift deleted file mode 100644 index c4d49955..00000000 --- a/Sources/DOMKit/WebIDL/DOMRectReadOnly.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMRectReadOnly: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectReadOnly].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) - _right = ReadonlyAttribute(jsObject: jsObject, name: Strings.right) - _bottom = ReadonlyAttribute(jsObject: jsObject, name: Strings.bottom) - _left = ReadonlyAttribute(jsObject: jsObject, name: Strings.left) - self.jsObject = jsObject - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) - } - - @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { - let this = constructor - return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var x: Double - - @ReadonlyAttribute - public var y: Double - - @ReadonlyAttribute - public var width: Double - - @ReadonlyAttribute - public var height: Double - - @ReadonlyAttribute - public var top: Double - - @ReadonlyAttribute - public var right: Double - - @ReadonlyAttribute - public var bottom: Double - - @ReadonlyAttribute - public var left: Double - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMStringList.swift b/Sources/DOMKit/WebIDL/DOMStringList.swift deleted file mode 100644 index 78686c50..00000000 --- a/Sources/DOMKit/WebIDL/DOMStringList.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMStringList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> String? { - jsObject[key].fromJSValue() - } - - @inlinable public func contains(string: String) -> Bool { - let this = jsObject - return this[Strings.contains].function!(this: this, arguments: [string.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DOMStringMap.swift b/Sources/DOMKit/WebIDL/DOMStringMap.swift deleted file mode 100644 index ce5c6ab5..00000000 --- a/Sources/DOMKit/WebIDL/DOMStringMap.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMStringMap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringMap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public subscript(key: String) -> String { - jsObject[key].fromJSValue()! - } - - // XXX: unsupported setter for keys of type String - - // XXX: unsupported deleter for keys of type String -} diff --git a/Sources/DOMKit/WebIDL/DOMTokenList.swift b/Sources/DOMKit/WebIDL/DOMTokenList.swift deleted file mode 100644 index 4cc9cd76..00000000 --- a/Sources/DOMKit/WebIDL/DOMTokenList.swift +++ /dev/null @@ -1,61 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMTokenList: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMTokenList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> String? { - jsObject[key].fromJSValue() - } - - @inlinable public func contains(token: String) -> Bool { - let this = jsObject - return this[Strings.contains].function!(this: this, arguments: [token.jsValue]).fromJSValue()! - } - - @inlinable public func add(tokens: String...) { - let this = jsObject - _ = this[Strings.add].function!(this: this, arguments: tokens.map(\.jsValue)) - } - - @inlinable public func remove(tokens: String...) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: tokens.map(\.jsValue)) - } - - @inlinable public func toggle(token: String, force: Bool? = nil) -> Bool { - let this = jsObject - return this[Strings.toggle].function!(this: this, arguments: [token.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func replace(token: String, newToken: String) -> Bool { - let this = jsObject - return this[Strings.replace].function!(this: this, arguments: [token.jsValue, newToken.jsValue]).fromJSValue()! - } - - @inlinable public func supports(token: String) -> Bool { - let this = jsObject - return this[Strings.supports].function!(this: this, arguments: [token.jsValue]).fromJSValue()! - } - - @ReadWriteAttribute - public var value: String - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} diff --git a/Sources/DOMKit/WebIDL/DataTransfer.swift b/Sources/DOMKit/WebIDL/DataTransfer.swift deleted file mode 100644 index a96259e9..00000000 --- a/Sources/DOMKit/WebIDL/DataTransfer.swift +++ /dev/null @@ -1,58 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DataTransfer: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransfer].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _dropEffect = ReadWriteAttribute(jsObject: jsObject, name: Strings.dropEffect) - _effectAllowed = ReadWriteAttribute(jsObject: jsObject, name: Strings.effectAllowed) - _items = ReadonlyAttribute(jsObject: jsObject, name: Strings.items) - _types = ReadonlyAttribute(jsObject: jsObject, name: Strings.types) - _files = ReadonlyAttribute(jsObject: jsObject, name: Strings.files) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var dropEffect: String - - @ReadWriteAttribute - public var effectAllowed: String - - @ReadonlyAttribute - public var items: DataTransferItemList - - @inlinable public func setDragImage(image: Element, x: Int32, y: Int32) { - let this = jsObject - _ = this[Strings.setDragImage].function!(this: this, arguments: [image.jsValue, x.jsValue, y.jsValue]) - } - - @ReadonlyAttribute - public var types: [String] - - @inlinable public func getData(format: String) -> String { - let this = jsObject - return this[Strings.getData].function!(this: this, arguments: [format.jsValue]).fromJSValue()! - } - - @inlinable public func setData(format: String, data: String) { - let this = jsObject - _ = this[Strings.setData].function!(this: this, arguments: [format.jsValue, data.jsValue]) - } - - @inlinable public func clearData(format: String? = nil) { - let this = jsObject - _ = this[Strings.clearData].function!(this: this, arguments: [format?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var files: FileList -} diff --git a/Sources/DOMKit/WebIDL/DataTransferItem.swift b/Sources/DOMKit/WebIDL/DataTransferItem.swift deleted file mode 100644 index efe475e0..00000000 --- a/Sources/DOMKit/WebIDL/DataTransferItem.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DataTransferItem: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItem].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var type: String - - // XXX: member 'getAsString' is ignored - - @inlinable public func getAsFile() -> File? { - let this = jsObject - return this[Strings.getAsFile].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DataTransferItemList.swift b/Sources/DOMKit/WebIDL/DataTransferItemList.swift deleted file mode 100644 index 0e00f762..00000000 --- a/Sources/DOMKit/WebIDL/DataTransferItemList.swift +++ /dev/null @@ -1,42 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DataTransferItemList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItemList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> DataTransferItem { - jsObject[key].fromJSValue()! - } - - @inlinable public func add(data: String, type: String) -> DataTransferItem? { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [data.jsValue, type.jsValue]).fromJSValue()! - } - - @inlinable public func add(data: File) -> DataTransferItem? { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func remove(index: UInt32) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable public func clear() { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/Document.swift b/Sources/DOMKit/WebIDL/Document.swift deleted file mode 100644 index e4c2ae73..00000000 --- a/Sources/DOMKit/WebIDL/Document.swift +++ /dev/null @@ -1,352 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _implementation = ReadonlyAttribute(jsObject: jsObject, name: Strings.implementation) - _URL = ReadonlyAttribute(jsObject: jsObject, name: Strings.URL) - _documentURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentURI) - _compatMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.compatMode) - _characterSet = ReadonlyAttribute(jsObject: jsObject, name: Strings.characterSet) - _charset = ReadonlyAttribute(jsObject: jsObject, name: Strings.charset) - _inputEncoding = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputEncoding) - _contentType = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentType) - _doctype = ReadonlyAttribute(jsObject: jsObject, name: Strings.doctype) - _documentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentElement) - _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) - _domain = ReadWriteAttribute(jsObject: jsObject, name: Strings.domain) - _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) - _cookie = ReadWriteAttribute(jsObject: jsObject, name: Strings.cookie) - _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) - _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) - _body = ReadWriteAttribute(jsObject: jsObject, name: Strings.body) - _head = ReadonlyAttribute(jsObject: jsObject, name: Strings.head) - _images = ReadonlyAttribute(jsObject: jsObject, name: Strings.images) - _embeds = ReadonlyAttribute(jsObject: jsObject, name: Strings.embeds) - _plugins = ReadonlyAttribute(jsObject: jsObject, name: Strings.plugins) - _links = ReadonlyAttribute(jsObject: jsObject, name: Strings.links) - _forms = ReadonlyAttribute(jsObject: jsObject, name: Strings.forms) - _scripts = ReadonlyAttribute(jsObject: jsObject, name: Strings.scripts) - _currentScript = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentScript) - _defaultView = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultView) - _designMode = ReadWriteAttribute(jsObject: jsObject, name: Strings.designMode) - _hidden = ReadonlyAttribute(jsObject: jsObject, name: Strings.hidden) - _visibilityState = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibilityState) - _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) - _onvisibilitychange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onvisibilitychange) - _fgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.fgColor) - _linkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.linkColor) - _vlinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.vlinkColor) - _alinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.alinkColor) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _anchors = ReadonlyAttribute(jsObject: jsObject, name: Strings.anchors) - _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) - _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) - _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var implementation: DOMImplementation - - @ReadonlyAttribute - public var URL: String - - @ReadonlyAttribute - public var documentURI: String - - @ReadonlyAttribute - public var compatMode: String - - @ReadonlyAttribute - public var characterSet: String - - @ReadonlyAttribute - public var charset: String - - @ReadonlyAttribute - public var inputEncoding: String - - @ReadonlyAttribute - public var contentType: String - - @ReadonlyAttribute - public var doctype: DocumentType? - - @ReadonlyAttribute - public var documentElement: Element? - - @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! - } - - @inlinable public func createElement(localName: String, options: ElementCreationOptions_or_String? = nil) -> Element { - let this = jsObject - return this[Strings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: ElementCreationOptions_or_String? = nil) -> Element { - let this = jsObject - return this[Strings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createDocumentFragment() -> DocumentFragment { - let this = jsObject - return this[Strings.createDocumentFragment].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func createTextNode(data: String) -> Text { - let this = jsObject - return this[Strings.createTextNode].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createCDATASection(data: String) -> CDATASection { - let this = jsObject - return this[Strings.createCDATASection].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createComment(data: String) -> Comment { - let this = jsObject - return this[Strings.createComment].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createProcessingInstruction(target: String, data: String) -> ProcessingInstruction { - let this = jsObject - return this[Strings.createProcessingInstruction].function!(this: this, arguments: [target.jsValue, data.jsValue]).fromJSValue()! - } - - @inlinable public func importNode(node: Node, deep: Bool? = nil) -> Node { - let this = jsObject - return this[Strings.importNode].function!(this: this, arguments: [node.jsValue, deep?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func adoptNode(node: Node) -> Node { - let this = jsObject - return this[Strings.adoptNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public func createAttribute(localName: String) -> Attr { - let this = jsObject - return this[Strings.createAttribute].function!(this: this, arguments: [localName.jsValue]).fromJSValue()! - } - - @inlinable public func createAttributeNS(namespace: String?, qualifiedName: String) -> Attr { - let this = jsObject - return this[Strings.createAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func createEvent(interface: String) -> Event { - let this = jsObject - return this[Strings.createEvent].function!(this: this, arguments: [interface.jsValue]).fromJSValue()! - } - - @inlinable public func createRange() -> Range { - let this = jsObject - return this[Strings.createRange].function!(this: this, arguments: []).fromJSValue()! - } - - // XXX: member 'createNodeIterator' is ignored - - // XXX: member 'createTreeWalker' is ignored - - @ReadonlyAttribute - public var location: Location? - - @ReadWriteAttribute - public var domain: String - - @ReadonlyAttribute - public var referrer: String - - @ReadWriteAttribute - public var cookie: String - - @ReadonlyAttribute - public var lastModified: String - - @ReadonlyAttribute - public var readyState: DocumentReadyState - - @inlinable public subscript(key: String) -> JSObject { - jsObject[key].fromJSValue()! - } - - @ReadWriteAttribute - public var title: String - - @ReadWriteAttribute - public var dir: String - - @ReadWriteAttribute - public var body: HTMLElement? - - @ReadonlyAttribute - public var head: HTMLHeadElement? - - @ReadonlyAttribute - public var images: HTMLCollection - - @ReadonlyAttribute - public var embeds: HTMLCollection - - @ReadonlyAttribute - public var plugins: HTMLCollection - - @ReadonlyAttribute - public var links: HTMLCollection - - @ReadonlyAttribute - public var forms: HTMLCollection - - @ReadonlyAttribute - public var scripts: HTMLCollection - - @inlinable public func getElementsByName(elementName: String) -> NodeList { - let this = jsObject - return this[Strings.getElementsByName].function!(this: this, arguments: [elementName.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var currentScript: HTMLOrSVGScriptElement? - - @inlinable public func open(unused1: String? = nil, unused2: String? = nil) -> Self { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [unused1?.jsValue ?? .undefined, unused2?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func open(url: String, name: String, features: String) -> WindowProxy? { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [url.jsValue, name.jsValue, features.jsValue]).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public func write(text: String...) { - let this = jsObject - _ = this[Strings.write].function!(this: this, arguments: text.map(\.jsValue)) - } - - @inlinable public func writeln(text: String...) { - let this = jsObject - _ = this[Strings.writeln].function!(this: this, arguments: text.map(\.jsValue)) - } - - @ReadonlyAttribute - public var defaultView: WindowProxy? - - @inlinable public func hasFocus() -> Bool { - let this = jsObject - return this[Strings.hasFocus].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var designMode: String - - @inlinable public func execCommand(commandId: String, showUI: Bool? = nil, value: String? = nil) -> Bool { - let this = jsObject - return this[Strings.execCommand].function!(this: this, arguments: [commandId.jsValue, showUI?.jsValue ?? .undefined, value?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func queryCommandEnabled(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandEnabled].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandIndeterm(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandIndeterm].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandState(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandState].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandSupported(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandSupported].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandValue(commandId: String) -> String { - let this = jsObject - return this[Strings.queryCommandValue].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var hidden: Bool - - @ReadonlyAttribute - public var visibilityState: DocumentVisibilityState - - @ClosureAttribute1Optional - public var onreadystatechange: EventHandler - - @ClosureAttribute1Optional - public var onvisibilitychange: EventHandler - - @ReadWriteAttribute - public var fgColor: String - - @ReadWriteAttribute - public var linkColor: String - - @ReadWriteAttribute - public var vlinkColor: String - - @ReadWriteAttribute - public var alinkColor: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadonlyAttribute - public var anchors: HTMLCollection - - @ReadonlyAttribute - public var applets: HTMLCollection - - @inlinable public func clear() { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public func captureEvents() { - let this = jsObject - _ = this[Strings.captureEvents].function!(this: this, arguments: []) - } - - @inlinable public func releaseEvents() { - let this = jsObject - _ = this[Strings.releaseEvents].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var all: HTMLAllCollection - - @ReadonlyAttribute - public var timeline: DocumentTimeline -} diff --git a/Sources/DOMKit/WebIDL/DocumentAndElementEventHandlers.swift b/Sources/DOMKit/WebIDL/DocumentAndElementEventHandlers.swift deleted file mode 100644 index c9e9b57e..00000000 --- a/Sources/DOMKit/WebIDL/DocumentAndElementEventHandlers.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol DocumentAndElementEventHandlers: JSBridgedClass {} -public extension DocumentAndElementEventHandlers { - @inlinable var oncopy: EventHandler { - get { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] = newValue } - } - - @inlinable var oncut: EventHandler { - get { ClosureAttribute1Optional[Strings.oncut, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncut, in: jsObject] = newValue } - } - - @inlinable var onpaste: EventHandler { - get { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/DocumentFragment.swift b/Sources/DOMKit/WebIDL/DocumentFragment.swift deleted file mode 100644 index f8155865..00000000 --- a/Sources/DOMKit/WebIDL/DocumentFragment.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DocumentFragment: Node, NonElementParentNode, ParentNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentFragment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} diff --git a/Sources/DOMKit/WebIDL/DocumentOrShadowRoot.swift b/Sources/DOMKit/WebIDL/DocumentOrShadowRoot.swift deleted file mode 100644 index 2eaba575..00000000 --- a/Sources/DOMKit/WebIDL/DocumentOrShadowRoot.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol DocumentOrShadowRoot: JSBridgedClass {} -public extension DocumentOrShadowRoot { - @inlinable var activeElement: Element? { ReadonlyAttribute[Strings.activeElement, in: jsObject] } - - @inlinable func getAnimations() -> [Animation] { - let this = jsObject - return this[Strings.getAnimations].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/DocumentReadyState.swift b/Sources/DOMKit/WebIDL/DocumentReadyState.swift deleted file mode 100644 index ae8f31c1..00000000 --- a/Sources/DOMKit/WebIDL/DocumentReadyState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum DocumentReadyState: JSString, JSValueCompatible { - case loading = "loading" - case interactive = "interactive" - case complete = "complete" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/DocumentTimeline.swift b/Sources/DOMKit/WebIDL/DocumentTimeline.swift deleted file mode 100644 index e12a8aa8..00000000 --- a/Sources/DOMKit/WebIDL/DocumentTimeline.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DocumentTimeline: AnimationTimeline { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentTimeline].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(options: DocumentTimelineOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [options?.jsValue ?? .undefined])) - } -} diff --git a/Sources/DOMKit/WebIDL/DocumentTimelineOptions.swift b/Sources/DOMKit/WebIDL/DocumentTimelineOptions.swift deleted file mode 100644 index e45f94da..00000000 --- a/Sources/DOMKit/WebIDL/DocumentTimelineOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DocumentTimelineOptions: BridgedDictionary { - public convenience init(originTime: DOMHighResTimeStamp) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.originTime] = originTime.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _originTime = ReadWriteAttribute(jsObject: object, name: Strings.originTime) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var originTime: DOMHighResTimeStamp -} diff --git a/Sources/DOMKit/WebIDL/DocumentType.swift b/Sources/DOMKit/WebIDL/DocumentType.swift deleted file mode 100644 index c8969178..00000000 --- a/Sources/DOMKit/WebIDL/DocumentType.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DocumentType: Node, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentType].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _publicId = ReadonlyAttribute(jsObject: jsObject, name: Strings.publicId) - _systemId = ReadonlyAttribute(jsObject: jsObject, name: Strings.systemId) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var publicId: String - - @ReadonlyAttribute - public var systemId: String -} diff --git a/Sources/DOMKit/WebIDL/DocumentVisibilityState.swift b/Sources/DOMKit/WebIDL/DocumentVisibilityState.swift deleted file mode 100644 index a9d2497f..00000000 --- a/Sources/DOMKit/WebIDL/DocumentVisibilityState.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum DocumentVisibilityState: JSString, JSValueCompatible { - case visible = "visible" - case hidden = "hidden" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Document_or_XMLHttpRequestBodyInit.swift b/Sources/DOMKit/WebIDL/Document_or_XMLHttpRequestBodyInit.swift deleted file mode 100644 index 73264860..00000000 --- a/Sources/DOMKit/WebIDL/Document_or_XMLHttpRequestBodyInit.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Document_or_XMLHttpRequestBodyInit: ConvertibleToJSValue {} -extension Document: Any_Document_or_XMLHttpRequestBodyInit {} -extension XMLHttpRequestBodyInit: Any_Document_or_XMLHttpRequestBodyInit {} - -public enum Document_or_XMLHttpRequestBodyInit: JSValueCompatible, Any_Document_or_XMLHttpRequestBodyInit { - case document(Document) - case xmlHttpRequestBodyInit(XMLHttpRequestBodyInit) - - var document: Document? { - switch self { - case let .document(document): return document - default: return nil - } - } - - var xmlHttpRequestBodyInit: XMLHttpRequestBodyInit? { - switch self { - case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): return xmlHttpRequestBodyInit - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let document: Document = value.fromJSValue() { - return .document(document) - } - if let xmlHttpRequestBodyInit: XMLHttpRequestBodyInit = value.fromJSValue() { - return .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .document(document): - return document.jsValue - case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): - return xmlHttpRequestBodyInit.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Double_or_KeyframeAnimationOptions.swift b/Sources/DOMKit/WebIDL/Double_or_KeyframeAnimationOptions.swift deleted file mode 100644 index 41f4906b..00000000 --- a/Sources/DOMKit/WebIDL/Double_or_KeyframeAnimationOptions.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Double_or_KeyframeAnimationOptions: ConvertibleToJSValue {} -extension Double: Any_Double_or_KeyframeAnimationOptions {} -extension KeyframeAnimationOptions: Any_Double_or_KeyframeAnimationOptions {} - -public enum Double_or_KeyframeAnimationOptions: JSValueCompatible, Any_Double_or_KeyframeAnimationOptions { - case double(Double) - case keyframeAnimationOptions(KeyframeAnimationOptions) - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var keyframeAnimationOptions: KeyframeAnimationOptions? { - switch self { - case let .keyframeAnimationOptions(keyframeAnimationOptions): return keyframeAnimationOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let keyframeAnimationOptions: KeyframeAnimationOptions = value.fromJSValue() { - return .keyframeAnimationOptions(keyframeAnimationOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .double(double): - return double.jsValue - case let .keyframeAnimationOptions(keyframeAnimationOptions): - return keyframeAnimationOptions.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Double_or_KeyframeEffectOptions.swift b/Sources/DOMKit/WebIDL/Double_or_KeyframeEffectOptions.swift deleted file mode 100644 index 67a79f8d..00000000 --- a/Sources/DOMKit/WebIDL/Double_or_KeyframeEffectOptions.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Double_or_KeyframeEffectOptions: ConvertibleToJSValue {} -extension Double: Any_Double_or_KeyframeEffectOptions {} -extension KeyframeEffectOptions: Any_Double_or_KeyframeEffectOptions {} - -public enum Double_or_KeyframeEffectOptions: JSValueCompatible, Any_Double_or_KeyframeEffectOptions { - case double(Double) - case keyframeEffectOptions(KeyframeEffectOptions) - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var keyframeEffectOptions: KeyframeEffectOptions? { - switch self { - case let .keyframeEffectOptions(keyframeEffectOptions): return keyframeEffectOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let keyframeEffectOptions: KeyframeEffectOptions = value.fromJSValue() { - return .keyframeEffectOptions(keyframeEffectOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .double(double): - return double.jsValue - case let .keyframeEffectOptions(keyframeEffectOptions): - return keyframeEffectOptions.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Double_or_String.swift b/Sources/DOMKit/WebIDL/Double_or_String.swift deleted file mode 100644 index b74a49c8..00000000 --- a/Sources/DOMKit/WebIDL/Double_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Double_or_String: ConvertibleToJSValue {} -extension Double: Any_Double_or_String {} -extension String: Any_Double_or_String {} - -public enum Double_or_String: JSValueCompatible, Any_Double_or_String { - case double(Double) - case string(String) - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .double(double): - return double.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/DragEvent.swift b/Sources/DOMKit/WebIDL/DragEvent.swift deleted file mode 100644 index feeb3434..00000000 --- a/Sources/DOMKit/WebIDL/DragEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DragEvent: MouseEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DragEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _dataTransfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.dataTransfer) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: DragEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var dataTransfer: DataTransfer? -} diff --git a/Sources/DOMKit/WebIDL/DragEventInit.swift b/Sources/DOMKit/WebIDL/DragEventInit.swift deleted file mode 100644 index e7afb2e3..00000000 --- a/Sources/DOMKit/WebIDL/DragEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DragEventInit: BridgedDictionary { - public convenience init(dataTransfer: DataTransfer?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.dataTransfer] = dataTransfer.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _dataTransfer = ReadWriteAttribute(jsObject: object, name: Strings.dataTransfer) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var dataTransfer: DataTransfer? -} diff --git a/Sources/DOMKit/WebIDL/EffectTiming.swift b/Sources/DOMKit/WebIDL/EffectTiming.swift deleted file mode 100644 index af69722e..00000000 --- a/Sources/DOMKit/WebIDL/EffectTiming.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EffectTiming: BridgedDictionary { - public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, direction: PlaybackDirection, easing: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.delay] = delay.jsValue - object[Strings.endDelay] = endDelay.jsValue - object[Strings.fill] = fill.jsValue - object[Strings.iterationStart] = iterationStart.jsValue - object[Strings.iterations] = iterations.jsValue - object[Strings.direction] = direction.jsValue - object[Strings.easing] = easing.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) - _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) - _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) - _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) - _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) - _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var delay: Double - - @ReadWriteAttribute - public var endDelay: Double - - @ReadWriteAttribute - public var fill: FillMode - - @ReadWriteAttribute - public var iterationStart: Double - - @ReadWriteAttribute - public var iterations: Double - - @ReadWriteAttribute - public var direction: PlaybackDirection - - @ReadWriteAttribute - public var easing: String -} diff --git a/Sources/DOMKit/WebIDL/Element.swift b/Sources/DOMKit/WebIDL/Element.swift deleted file mode 100644 index 6e400022..00000000 --- a/Sources/DOMKit/WebIDL/Element.swift +++ /dev/null @@ -1,177 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) - _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) - _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) - _tagName = ReadonlyAttribute(jsObject: jsObject, name: Strings.tagName) - _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) - _className = ReadWriteAttribute(jsObject: jsObject, name: Strings.className) - _classList = ReadonlyAttribute(jsObject: jsObject, name: Strings.classList) - _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) - _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var namespaceURI: String? - - @ReadonlyAttribute - public var prefix: String? - - @ReadonlyAttribute - public var localName: String - - @ReadonlyAttribute - public var tagName: String - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var className: String - - @ReadonlyAttribute - public var classList: DOMTokenList - - @ReadWriteAttribute - public var slot: String - - @inlinable public func hasAttributes() -> Bool { - let this = jsObject - return this[Strings.hasAttributes].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var attributes: NamedNodeMap - - @inlinable public func getAttributeNames() -> [String] { - let this = jsObject - return this[Strings.getAttributeNames].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getAttribute(qualifiedName: String) -> String? { - let this = jsObject - return this[Strings.getAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNS(namespace: String?, localName: String) -> String? { - let this = jsObject - return this[Strings.getAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setAttribute(qualifiedName: String, value: String) { - let this = jsObject - _ = this[Strings.setAttribute].function!(this: this, arguments: [qualifiedName.jsValue, value.jsValue]) - } - - @inlinable public func setAttributeNS(namespace: String?, qualifiedName: String, value: String) { - let this = jsObject - _ = this[Strings.setAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, value.jsValue]) - } - - @inlinable public func removeAttribute(qualifiedName: String) { - let this = jsObject - _ = this[Strings.removeAttribute].function!(this: this, arguments: [qualifiedName.jsValue]) - } - - @inlinable public func removeAttributeNS(namespace: String?, localName: String) { - let this = jsObject - _ = this[Strings.removeAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]) - } - - @inlinable public func toggleAttribute(qualifiedName: String, force: Bool? = nil) -> Bool { - let this = jsObject - return this[Strings.toggleAttribute].function!(this: this, arguments: [qualifiedName.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func hasAttribute(qualifiedName: String) -> Bool { - let this = jsObject - return this[Strings.hasAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func hasAttributeNS(namespace: String?, localName: String) -> Bool { - let this = jsObject - return this[Strings.hasAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNode(qualifiedName: String) -> Attr? { - let this = jsObject - return this[Strings.getAttributeNode].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNodeNS(namespace: String?, localName: String) -> Attr? { - let this = jsObject - return this[Strings.getAttributeNodeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setAttributeNode(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func setAttributeNodeNS(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setAttributeNodeNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func removeAttributeNode(attr: Attr) -> Attr { - let this = jsObject - return this[Strings.removeAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func attachShadow(init: ShadowRootInit) -> ShadowRoot { - let this = jsObject - return this[Strings.attachShadow].function!(this: this, arguments: [`init`.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func closest(selectors: String) -> Element? { - let this = jsObject - return this[Strings.closest].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func matches(selectors: String) -> Bool { - let this = jsObject - return this[Strings.matches].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func webkitMatchesSelector(selectors: String) -> Bool { - let this = jsObject - return this[Strings.webkitMatchesSelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! - } - - @inlinable public func insertAdjacentElement(where: String, element: Element) -> Element? { - let this = jsObject - return this[Strings.insertAdjacentElement].function!(this: this, arguments: [`where`.jsValue, element.jsValue]).fromJSValue()! - } - - @inlinable public func insertAdjacentText(where: String, data: String) { - let this = jsObject - _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/ElementContentEditable.swift b/Sources/DOMKit/WebIDL/ElementContentEditable.swift deleted file mode 100644 index 8687472c..00000000 --- a/Sources/DOMKit/WebIDL/ElementContentEditable.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol ElementContentEditable: JSBridgedClass {} -public extension ElementContentEditable { - @inlinable var contentEditable: String { - get { ReadWriteAttribute[Strings.contentEditable, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.contentEditable, in: jsObject] = newValue } - } - - @inlinable var enterKeyHint: String { - get { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] = newValue } - } - - @inlinable var isContentEditable: Bool { ReadonlyAttribute[Strings.isContentEditable, in: jsObject] } - - @inlinable var inputMode: String { - get { ReadWriteAttribute[Strings.inputMode, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.inputMode, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/ElementCreationOptions.swift b/Sources/DOMKit/WebIDL/ElementCreationOptions.swift deleted file mode 100644 index 0ef2f4b9..00000000 --- a/Sources/DOMKit/WebIDL/ElementCreationOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ElementCreationOptions: BridgedDictionary { - public convenience init(is: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.is] = `is`.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _is = ReadWriteAttribute(jsObject: object, name: Strings.is) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var `is`: String -} diff --git a/Sources/DOMKit/WebIDL/ElementCreationOptions_or_String.swift b/Sources/DOMKit/WebIDL/ElementCreationOptions_or_String.swift deleted file mode 100644 index 72a7769f..00000000 --- a/Sources/DOMKit/WebIDL/ElementCreationOptions_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} -extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} -extension String: Any_ElementCreationOptions_or_String {} - -public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { - case elementCreationOptions(ElementCreationOptions) - case string(String) - - var elementCreationOptions: ElementCreationOptions? { - switch self { - case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { - return .elementCreationOptions(elementCreationOptions) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .elementCreationOptions(elementCreationOptions): - return elementCreationOptions.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ElementDefinitionOptions.swift b/Sources/DOMKit/WebIDL/ElementDefinitionOptions.swift deleted file mode 100644 index c6bb95d5..00000000 --- a/Sources/DOMKit/WebIDL/ElementDefinitionOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ElementDefinitionOptions: BridgedDictionary { - public convenience init(extends: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.extends] = extends.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _extends = ReadWriteAttribute(jsObject: object, name: Strings.extends) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var extends: String -} diff --git a/Sources/DOMKit/WebIDL/ElementInternals.swift b/Sources/DOMKit/WebIDL/ElementInternals.swift deleted file mode 100644 index 397bcc09..00000000 --- a/Sources/DOMKit/WebIDL/ElementInternals.swift +++ /dev/null @@ -1,58 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ElementInternals: JSBridgedClass, ARIAMixin { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ElementInternals].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { - let this = jsObject - _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { - let this = jsObject - _ = this[Strings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var labels: NodeList -} diff --git a/Sources/DOMKit/WebIDL/Element_or_HTMLCollection.swift b/Sources/DOMKit/WebIDL/Element_or_HTMLCollection.swift deleted file mode 100644 index eb92bcd6..00000000 --- a/Sources/DOMKit/WebIDL/Element_or_HTMLCollection.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} -extension Element: Any_Element_or_HTMLCollection {} -extension HTMLCollection: Any_Element_or_HTMLCollection {} - -public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { - case element(Element) - case htmlCollection(HTMLCollection) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var htmlCollection: HTMLCollection? { - switch self { - case let .htmlCollection(htmlCollection): return htmlCollection - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let htmlCollection: HTMLCollection = value.fromJSValue() { - return .htmlCollection(htmlCollection) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .htmlCollection(htmlCollection): - return htmlCollection.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Element_or_RadioNodeList.swift b/Sources/DOMKit/WebIDL/Element_or_RadioNodeList.swift deleted file mode 100644 index 1b9a126d..00000000 --- a/Sources/DOMKit/WebIDL/Element_or_RadioNodeList.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} -extension Element: Any_Element_or_RadioNodeList {} -extension RadioNodeList: Any_Element_or_RadioNodeList {} - -public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { - case element(Element) - case radioNodeList(RadioNodeList) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var radioNodeList: RadioNodeList? { - switch self { - case let .radioNodeList(radioNodeList): return radioNodeList - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let radioNodeList: RadioNodeList = value.fromJSValue() { - return .radioNodeList(radioNodeList) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .radioNodeList(radioNodeList): - return radioNodeList.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Element_or_Text.swift b/Sources/DOMKit/WebIDL/Element_or_Text.swift deleted file mode 100644 index 1f9dc971..00000000 --- a/Sources/DOMKit/WebIDL/Element_or_Text.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Element_or_Text: ConvertibleToJSValue {} -extension Element: Any_Element_or_Text {} -extension Text: Any_Element_or_Text {} - -public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { - case element(Element) - case text(Text) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var text: Text? { - switch self { - case let .text(text): return text - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let text: Text = value.fromJSValue() { - return .text(text) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .text(text): - return text.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/EndingType.swift b/Sources/DOMKit/WebIDL/EndingType.swift deleted file mode 100644 index 247cc899..00000000 --- a/Sources/DOMKit/WebIDL/EndingType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EndingType: JSString, JSValueCompatible { - case transparent = "transparent" - case native = "native" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ErrorEvent.swift b/Sources/DOMKit/WebIDL/ErrorEvent.swift deleted file mode 100644 index 44547d64..00000000 --- a/Sources/DOMKit/WebIDL/ErrorEvent.swift +++ /dev/null @@ -1,36 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ErrorEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ErrorEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) - _lineno = ReadonlyAttribute(jsObject: jsObject, name: Strings.lineno) - _colno = ReadonlyAttribute(jsObject: jsObject, name: Strings.colno) - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: ErrorEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var message: String - - @ReadonlyAttribute - public var filename: String - - @ReadonlyAttribute - public var lineno: UInt32 - - @ReadonlyAttribute - public var colno: UInt32 - - @ReadonlyAttribute - public var error: JSValue -} diff --git a/Sources/DOMKit/WebIDL/ErrorEventInit.swift b/Sources/DOMKit/WebIDL/ErrorEventInit.swift deleted file mode 100644 index b558e880..00000000 --- a/Sources/DOMKit/WebIDL/ErrorEventInit.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ErrorEventInit: BridgedDictionary { - public convenience init(message: String, filename: String, lineno: UInt32, colno: UInt32, error: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.message] = message.jsValue - object[Strings.filename] = filename.jsValue - object[Strings.lineno] = lineno.jsValue - object[Strings.colno] = colno.jsValue - object[Strings.error] = error.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _message = ReadWriteAttribute(jsObject: object, name: Strings.message) - _filename = ReadWriteAttribute(jsObject: object, name: Strings.filename) - _lineno = ReadWriteAttribute(jsObject: object, name: Strings.lineno) - _colno = ReadWriteAttribute(jsObject: object, name: Strings.colno) - _error = ReadWriteAttribute(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var message: String - - @ReadWriteAttribute - public var filename: String - - @ReadWriteAttribute - public var lineno: UInt32 - - @ReadWriteAttribute - public var colno: UInt32 - - @ReadWriteAttribute - public var error: JSValue -} diff --git a/Sources/DOMKit/WebIDL/Event.swift b/Sources/DOMKit/WebIDL/Event.swift deleted file mode 100644 index 41015cf6..00000000 --- a/Sources/DOMKit/WebIDL/Event.swift +++ /dev/null @@ -1,103 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Event: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Event].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) - _srcElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.srcElement) - _currentTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTarget) - _eventPhase = ReadonlyAttribute(jsObject: jsObject, name: Strings.eventPhase) - _cancelBubble = ReadWriteAttribute(jsObject: jsObject, name: Strings.cancelBubble) - _bubbles = ReadonlyAttribute(jsObject: jsObject, name: Strings.bubbles) - _cancelable = ReadonlyAttribute(jsObject: jsObject, name: Strings.cancelable) - _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) - _defaultPrevented = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultPrevented) - _composed = ReadonlyAttribute(jsObject: jsObject, name: Strings.composed) - _isTrusted = ReadonlyAttribute(jsObject: jsObject, name: Strings.isTrusted) - _timeStamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeStamp) - self.jsObject = jsObject - } - - @inlinable public convenience init(type: String, eventInitDict: EventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var target: EventTarget? - - @ReadonlyAttribute - public var srcElement: EventTarget? - - @ReadonlyAttribute - public var currentTarget: EventTarget? - - @inlinable public func composedPath() -> [EventTarget] { - let this = jsObject - return this[Strings.composedPath].function!(this: this, arguments: []).fromJSValue()! - } - - public static let NONE: UInt16 = 0 - - public static let CAPTURING_PHASE: UInt16 = 1 - - public static let AT_TARGET: UInt16 = 2 - - public static let BUBBLING_PHASE: UInt16 = 3 - - @ReadonlyAttribute - public var eventPhase: UInt16 - - @inlinable public func stopPropagation() { - let this = jsObject - _ = this[Strings.stopPropagation].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var cancelBubble: Bool - - @inlinable public func stopImmediatePropagation() { - let this = jsObject - _ = this[Strings.stopImmediatePropagation].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var bubbles: Bool - - @ReadonlyAttribute - public var cancelable: Bool - - @ReadWriteAttribute - public var returnValue: Bool - - @inlinable public func preventDefault() { - let this = jsObject - _ = this[Strings.preventDefault].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var defaultPrevented: Bool - - @ReadonlyAttribute - public var composed: Bool - - @ReadonlyAttribute - public var isTrusted: Bool - - @ReadonlyAttribute - public var timeStamp: DOMHighResTimeStamp - - @inlinable public func initEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil) { - let this = jsObject - _ = this[Strings.initEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/EventInit.swift b/Sources/DOMKit/WebIDL/EventInit.swift deleted file mode 100644 index ac6bfe1f..00000000 --- a/Sources/DOMKit/WebIDL/EventInit.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EventInit: BridgedDictionary { - public convenience init(bubbles: Bool, cancelable: Bool, composed: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.bubbles] = bubbles.jsValue - object[Strings.cancelable] = cancelable.jsValue - object[Strings.composed] = composed.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _bubbles = ReadWriteAttribute(jsObject: object, name: Strings.bubbles) - _cancelable = ReadWriteAttribute(jsObject: object, name: Strings.cancelable) - _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var bubbles: Bool - - @ReadWriteAttribute - public var cancelable: Bool - - @ReadWriteAttribute - public var composed: Bool -} diff --git a/Sources/DOMKit/WebIDL/EventListenerOptions.swift b/Sources/DOMKit/WebIDL/EventListenerOptions.swift deleted file mode 100644 index b4f9d1c3..00000000 --- a/Sources/DOMKit/WebIDL/EventListenerOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EventListenerOptions: BridgedDictionary { - public convenience init(capture: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.capture] = capture.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _capture = ReadWriteAttribute(jsObject: object, name: Strings.capture) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var capture: Bool -} diff --git a/Sources/DOMKit/WebIDL/EventModifierInit.swift b/Sources/DOMKit/WebIDL/EventModifierInit.swift deleted file mode 100644 index 8139f6f0..00000000 --- a/Sources/DOMKit/WebIDL/EventModifierInit.swift +++ /dev/null @@ -1,85 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EventModifierInit: BridgedDictionary { - public convenience init(ctrlKey: Bool, shiftKey: Bool, altKey: Bool, metaKey: Bool, modifierAltGraph: Bool, modifierCapsLock: Bool, modifierFn: Bool, modifierFnLock: Bool, modifierHyper: Bool, modifierNumLock: Bool, modifierScrollLock: Bool, modifierSuper: Bool, modifierSymbol: Bool, modifierSymbolLock: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.ctrlKey] = ctrlKey.jsValue - object[Strings.shiftKey] = shiftKey.jsValue - object[Strings.altKey] = altKey.jsValue - object[Strings.metaKey] = metaKey.jsValue - object[Strings.modifierAltGraph] = modifierAltGraph.jsValue - object[Strings.modifierCapsLock] = modifierCapsLock.jsValue - object[Strings.modifierFn] = modifierFn.jsValue - object[Strings.modifierFnLock] = modifierFnLock.jsValue - object[Strings.modifierHyper] = modifierHyper.jsValue - object[Strings.modifierNumLock] = modifierNumLock.jsValue - object[Strings.modifierScrollLock] = modifierScrollLock.jsValue - object[Strings.modifierSuper] = modifierSuper.jsValue - object[Strings.modifierSymbol] = modifierSymbol.jsValue - object[Strings.modifierSymbolLock] = modifierSymbolLock.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _ctrlKey = ReadWriteAttribute(jsObject: object, name: Strings.ctrlKey) - _shiftKey = ReadWriteAttribute(jsObject: object, name: Strings.shiftKey) - _altKey = ReadWriteAttribute(jsObject: object, name: Strings.altKey) - _metaKey = ReadWriteAttribute(jsObject: object, name: Strings.metaKey) - _modifierAltGraph = ReadWriteAttribute(jsObject: object, name: Strings.modifierAltGraph) - _modifierCapsLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierCapsLock) - _modifierFn = ReadWriteAttribute(jsObject: object, name: Strings.modifierFn) - _modifierFnLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierFnLock) - _modifierHyper = ReadWriteAttribute(jsObject: object, name: Strings.modifierHyper) - _modifierNumLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierNumLock) - _modifierScrollLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierScrollLock) - _modifierSuper = ReadWriteAttribute(jsObject: object, name: Strings.modifierSuper) - _modifierSymbol = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbol) - _modifierSymbolLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbolLock) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var ctrlKey: Bool - - @ReadWriteAttribute - public var shiftKey: Bool - - @ReadWriteAttribute - public var altKey: Bool - - @ReadWriteAttribute - public var metaKey: Bool - - @ReadWriteAttribute - public var modifierAltGraph: Bool - - @ReadWriteAttribute - public var modifierCapsLock: Bool - - @ReadWriteAttribute - public var modifierFn: Bool - - @ReadWriteAttribute - public var modifierFnLock: Bool - - @ReadWriteAttribute - public var modifierHyper: Bool - - @ReadWriteAttribute - public var modifierNumLock: Bool - - @ReadWriteAttribute - public var modifierScrollLock: Bool - - @ReadWriteAttribute - public var modifierSuper: Bool - - @ReadWriteAttribute - public var modifierSymbol: Bool - - @ReadWriteAttribute - public var modifierSymbolLock: Bool -} diff --git a/Sources/DOMKit/WebIDL/EventSource.swift b/Sources/DOMKit/WebIDL/EventSource.swift deleted file mode 100644 index 9a95df8a..00000000 --- a/Sources/DOMKit/WebIDL/EventSource.swift +++ /dev/null @@ -1,51 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EventSource: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.EventSource].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _withCredentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.withCredentials) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _onopen = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onopen) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, eventSourceInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var withCredentials: Bool - - public static let CONNECTING: UInt16 = 0 - - public static let OPEN: UInt16 = 1 - - public static let CLOSED: UInt16 = 2 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ClosureAttribute1Optional - public var onopen: EventHandler - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/EventSourceInit.swift b/Sources/DOMKit/WebIDL/EventSourceInit.swift deleted file mode 100644 index c44cc13c..00000000 --- a/Sources/DOMKit/WebIDL/EventSourceInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EventSourceInit: BridgedDictionary { - public convenience init(withCredentials: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.withCredentials] = withCredentials.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _withCredentials = ReadWriteAttribute(jsObject: object, name: Strings.withCredentials) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var withCredentials: Bool -} diff --git a/Sources/DOMKit/WebIDL/EventTarget.swift b/Sources/DOMKit/WebIDL/EventTarget.swift deleted file mode 100644 index 9848b2cb..00000000 --- a/Sources/DOMKit/WebIDL/EventTarget.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EventTarget: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EventTarget].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - // XXX: member 'addEventListener' is ignored - - // XXX: member 'removeEventListener' is ignored - - @inlinable public func dispatchEvent(event: Event) -> Bool { - let this = jsObject - return this[Strings.dispatchEvent].function!(this: this, arguments: [event.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/Event_or_String.swift b/Sources/DOMKit/WebIDL/Event_or_String.swift deleted file mode 100644 index 24c91293..00000000 --- a/Sources/DOMKit/WebIDL/Event_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Event_or_String: ConvertibleToJSValue {} -extension Event: Any_Event_or_String {} -extension String: Any_Event_or_String {} - -public enum Event_or_String: JSValueCompatible, Any_Event_or_String { - case event(Event) - case string(String) - - var event: Event? { - switch self { - case let .event(event): return event - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let event: Event = value.fromJSValue() { - return .event(event) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .event(event): - return event.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ExtendableEventInit.swift b/Sources/DOMKit/WebIDL/ExtendableEventInit.swift deleted file mode 100644 index efb5d334..00000000 --- a/Sources/DOMKit/WebIDL/ExtendableEventInit.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ExtendableEventInit: BridgedDictionary { - public convenience init() { - let object = JSObject.global[Strings.Object].function!.new() - - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - super.init(unsafelyWrapping: object) - } -} diff --git a/Sources/DOMKit/WebIDL/External.swift b/Sources/DOMKit/WebIDL/External.swift deleted file mode 100644 index 302e99da..00000000 --- a/Sources/DOMKit/WebIDL/External.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class External: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.External].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func AddSearchProvider() { - let this = jsObject - _ = this[Strings.AddSearchProvider].function!(this: this, arguments: []) - } - - @inlinable public func IsSearchProviderInstalled() { - let this = jsObject - _ = this[Strings.IsSearchProviderInstalled].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/FetchEventInit.swift b/Sources/DOMKit/WebIDL/FetchEventInit.swift deleted file mode 100644 index 065f527a..00000000 --- a/Sources/DOMKit/WebIDL/FetchEventInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FetchEventInit: BridgedDictionary { - public convenience init(request: Request, preloadResponse: JSPromise, clientId: String, resultingClientId: String, replacesClientId: String, handled: JSPromise) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.request] = request.jsValue - object[Strings.preloadResponse] = preloadResponse.jsValue - object[Strings.clientId] = clientId.jsValue - object[Strings.resultingClientId] = resultingClientId.jsValue - object[Strings.replacesClientId] = replacesClientId.jsValue - object[Strings.handled] = handled.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _request = ReadWriteAttribute(jsObject: object, name: Strings.request) - _preloadResponse = ReadWriteAttribute(jsObject: object, name: Strings.preloadResponse) - _clientId = ReadWriteAttribute(jsObject: object, name: Strings.clientId) - _resultingClientId = ReadWriteAttribute(jsObject: object, name: Strings.resultingClientId) - _replacesClientId = ReadWriteAttribute(jsObject: object, name: Strings.replacesClientId) - _handled = ReadWriteAttribute(jsObject: object, name: Strings.handled) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var request: Request - - @ReadWriteAttribute - public var preloadResponse: JSPromise - - @ReadWriteAttribute - public var clientId: String - - @ReadWriteAttribute - public var resultingClientId: String - - @ReadWriteAttribute - public var replacesClientId: String - - @ReadWriteAttribute - public var handled: JSPromise -} diff --git a/Sources/DOMKit/WebIDL/File.swift b/Sources/DOMKit/WebIDL/File.swift deleted file mode 100644 index 7489440b..00000000 --- a/Sources/DOMKit/WebIDL/File.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class File: Blob { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var lastModified: Int64 -} diff --git a/Sources/DOMKit/WebIDL/FileList.swift b/Sources/DOMKit/WebIDL/FileList.swift deleted file mode 100644 index 6cab3da3..00000000 --- a/Sources/DOMKit/WebIDL/FileList.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FileList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> File? { - jsObject[key].fromJSValue() - } - - @ReadonlyAttribute - public var length: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/FilePropertyBag.swift b/Sources/DOMKit/WebIDL/FilePropertyBag.swift deleted file mode 100644 index d1c97803..00000000 --- a/Sources/DOMKit/WebIDL/FilePropertyBag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FilePropertyBag: BridgedDictionary { - public convenience init(lastModified: Int64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.lastModified] = lastModified.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var lastModified: Int64 -} diff --git a/Sources/DOMKit/WebIDL/FileReader.swift b/Sources/DOMKit/WebIDL/FileReader.swift deleted file mode 100644 index 90cbd578..00000000 --- a/Sources/DOMKit/WebIDL/FileReader.swift +++ /dev/null @@ -1,83 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FileReader: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) - _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) - _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) - _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func readAsArrayBuffer(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func readAsBinaryString(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { - let this = jsObject - _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) - } - - @inlinable public func readAsDataURL(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func abort() { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: []) - } - - public static let EMPTY: UInt16 = 0 - - public static let LOADING: UInt16 = 1 - - public static let DONE: UInt16 = 2 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var result: ArrayBuffer_or_String? - - @ReadonlyAttribute - public var error: DOMException? - - @ClosureAttribute1Optional - public var onloadstart: EventHandler - - @ClosureAttribute1Optional - public var onprogress: EventHandler - - @ClosureAttribute1Optional - public var onload: EventHandler - - @ClosureAttribute1Optional - public var onabort: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @ClosureAttribute1Optional - public var onloadend: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/File_or_FormData_or_String.swift b/Sources/DOMKit/WebIDL/File_or_FormData_or_String.swift deleted file mode 100644 index c420970c..00000000 --- a/Sources/DOMKit/WebIDL/File_or_FormData_or_String.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} -extension File: Any_File_or_FormData_or_String {} -extension FormData: Any_File_or_FormData_or_String {} -extension String: Any_File_or_FormData_or_String {} - -public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { - case file(File) - case formData(FormData) - case string(String) - - var file: File? { - switch self { - case let .file(file): return file - default: return nil - } - } - - var formData: FormData? { - switch self { - case let .formData(formData): return formData - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .file(file): - return file.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/FillMode.swift b/Sources/DOMKit/WebIDL/FillMode.swift deleted file mode 100644 index b1063c23..00000000 --- a/Sources/DOMKit/WebIDL/FillMode.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum FillMode: JSString, JSValueCompatible { - case none = "none" - case forwards = "forwards" - case backwards = "backwards" - case both = "both" - case auto = "auto" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/FocusEvent.swift b/Sources/DOMKit/WebIDL/FocusEvent.swift deleted file mode 100644 index 8fc35205..00000000 --- a/Sources/DOMKit/WebIDL/FocusEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FocusEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FocusEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: FocusEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var relatedTarget: EventTarget? -} diff --git a/Sources/DOMKit/WebIDL/FocusEventInit.swift b/Sources/DOMKit/WebIDL/FocusEventInit.swift deleted file mode 100644 index d2a1efb8..00000000 --- a/Sources/DOMKit/WebIDL/FocusEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FocusEventInit: BridgedDictionary { - public convenience init(relatedTarget: EventTarget?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.relatedTarget] = relatedTarget.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var relatedTarget: EventTarget? -} diff --git a/Sources/DOMKit/WebIDL/FocusOptions.swift b/Sources/DOMKit/WebIDL/FocusOptions.swift deleted file mode 100644 index ce7b2385..00000000 --- a/Sources/DOMKit/WebIDL/FocusOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FocusOptions: BridgedDictionary { - public convenience init(preventScroll: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.preventScroll] = preventScroll.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventScroll = ReadWriteAttribute(jsObject: object, name: Strings.preventScroll) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventScroll: Bool -} diff --git a/Sources/DOMKit/WebIDL/FormData.swift b/Sources/DOMKit/WebIDL/FormData.swift deleted file mode 100644 index ff3d1973..00000000 --- a/Sources/DOMKit/WebIDL/FormData.swift +++ /dev/null @@ -1,63 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FormData: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FormData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(form: HTMLFormElement? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [form?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func append(name: String, blobValue: Blob, filename: String? = nil) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> FormDataEntryValue? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAll(name: String) -> [FormDataEntryValue] { - let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func set(name: String, blobValue: Blob, filename: String? = nil) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} diff --git a/Sources/DOMKit/WebIDL/FormDataEntryValue.swift b/Sources/DOMKit/WebIDL/FormDataEntryValue.swift deleted file mode 100644 index 14b0433d..00000000 --- a/Sources/DOMKit/WebIDL/FormDataEntryValue.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_FormDataEntryValue: ConvertibleToJSValue {} -extension File: Any_FormDataEntryValue {} -extension String: Any_FormDataEntryValue {} - -public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { - case file(File) - case string(String) - - var file: File? { - switch self { - case let .file(file): return file - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .file(file): - return file.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/FormDataEvent.swift b/Sources/DOMKit/WebIDL/FormDataEvent.swift deleted file mode 100644 index d5ae7f7f..00000000 --- a/Sources/DOMKit/WebIDL/FormDataEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FormDataEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FormDataEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _formData = ReadonlyAttribute(jsObject: jsObject, name: Strings.formData) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: FormDataEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var formData: FormData -} diff --git a/Sources/DOMKit/WebIDL/FormDataEventInit.swift b/Sources/DOMKit/WebIDL/FormDataEventInit.swift deleted file mode 100644 index 183075f9..00000000 --- a/Sources/DOMKit/WebIDL/FormDataEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class FormDataEventInit: BridgedDictionary { - public convenience init(formData: FormData) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.formData] = formData.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _formData = ReadWriteAttribute(jsObject: object, name: Strings.formData) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var formData: FormData -} diff --git a/Sources/DOMKit/WebIDL/FrameType.swift b/Sources/DOMKit/WebIDL/FrameType.swift deleted file mode 100644 index d9f5fe35..00000000 --- a/Sources/DOMKit/WebIDL/FrameType.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum FrameType: JSString, JSValueCompatible { - case auxiliary = "auxiliary" - case topLevel = "top-level" - case nested = "nested" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Generated.swift b/Sources/DOMKit/WebIDL/Generated.swift new file mode 100644 index 00000000..f2a075f0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Generated.swift @@ -0,0 +1,18510 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol ARIAMixin: JSBridgedClass {} +public extension ARIAMixin { + @inlinable var role: String? { + get { ReadWriteAttribute[Strings.role, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.role, in: jsObject] = newValue } + } + + @inlinable var ariaAtomic: String? { + get { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] = newValue } + } + + @inlinable var ariaAutoComplete: String? { + get { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] = newValue } + } + + @inlinable var ariaBusy: String? { + get { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] = newValue } + } + + @inlinable var ariaChecked: String? { + get { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] = newValue } + } + + @inlinable var ariaColCount: String? { + get { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] = newValue } + } + + @inlinable var ariaColIndex: String? { + get { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] = newValue } + } + + @inlinable var ariaColIndexText: String? { + get { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] = newValue } + } + + @inlinable var ariaColSpan: String? { + get { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] = newValue } + } + + @inlinable var ariaCurrent: String? { + get { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] = newValue } + } + + @inlinable var ariaDescription: String? { + get { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] = newValue } + } + + @inlinable var ariaDisabled: String? { + get { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] = newValue } + } + + @inlinable var ariaExpanded: String? { + get { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] = newValue } + } + + @inlinable var ariaHasPopup: String? { + get { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] = newValue } + } + + @inlinable var ariaHidden: String? { + get { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] = newValue } + } + + @inlinable var ariaInvalid: String? { + get { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] = newValue } + } + + @inlinable var ariaKeyShortcuts: String? { + get { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] = newValue } + } + + @inlinable var ariaLabel: String? { + get { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] = newValue } + } + + @inlinable var ariaLevel: String? { + get { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] = newValue } + } + + @inlinable var ariaLive: String? { + get { ReadWriteAttribute[Strings.ariaLive, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaLive, in: jsObject] = newValue } + } + + @inlinable var ariaModal: String? { + get { ReadWriteAttribute[Strings.ariaModal, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaModal, in: jsObject] = newValue } + } + + @inlinable var ariaMultiLine: String? { + get { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] = newValue } + } + + @inlinable var ariaMultiSelectable: String? { + get { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] = newValue } + } + + @inlinable var ariaOrientation: String? { + get { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] = newValue } + } + + @inlinable var ariaPlaceholder: String? { + get { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] = newValue } + } + + @inlinable var ariaPosInSet: String? { + get { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] = newValue } + } + + @inlinable var ariaPressed: String? { + get { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] = newValue } + } + + @inlinable var ariaReadOnly: String? { + get { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] = newValue } + } + + @inlinable var ariaRequired: String? { + get { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] = newValue } + } + + @inlinable var ariaRoleDescription: String? { + get { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] = newValue } + } + + @inlinable var ariaRowCount: String? { + get { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] = newValue } + } + + @inlinable var ariaRowIndex: String? { + get { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] = newValue } + } + + @inlinable var ariaRowIndexText: String? { + get { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] = newValue } + } + + @inlinable var ariaRowSpan: String? { + get { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] = newValue } + } + + @inlinable var ariaSelected: String? { + get { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] = newValue } + } + + @inlinable var ariaSetSize: String? { + get { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] = newValue } + } + + @inlinable var ariaSort: String? { + get { ReadWriteAttribute[Strings.ariaSort, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaSort, in: jsObject] = newValue } + } + + @inlinable var ariaValueMax: String? { + get { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] = newValue } + } + + @inlinable var ariaValueMin: String? { + get { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] = newValue } + } + + @inlinable var ariaValueNow: String? { + get { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] = newValue } + } + + @inlinable var ariaValueText: String? { + get { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] = newValue } + } +} + +public class AbortController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbortController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func abort(reason: JSValue? = nil) { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + } +} + +public class AbortSignal: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AbortSignal].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _aborted = ReadonlyAttribute(jsObject: jsObject, name: Strings.aborted) + _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) + _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public static func abort(reason: JSValue? = nil) -> Self { + let this = constructor + return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func timeout(milliseconds: UInt64) -> Self { + let this = constructor + return this[Strings.timeout].function!(this: this, arguments: [milliseconds.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var aborted: Bool + + @ReadonlyAttribute + public var reason: JSValue + + @inlinable public func throwIfAborted() { + let this = jsObject + _ = this[Strings.throwIfAborted].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onabort: EventHandler +} + +public class AbstractRange: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbstractRange].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _startContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.startContainer) + _startOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.startOffset) + _endContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.endContainer) + _endOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.endOffset) + _collapsed = ReadonlyAttribute(jsObject: jsObject, name: Strings.collapsed) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var startContainer: Node + + @ReadonlyAttribute + public var startOffset: UInt32 + + @ReadonlyAttribute + public var endContainer: Node + + @ReadonlyAttribute + public var endOffset: UInt32 + + @ReadonlyAttribute + public var collapsed: Bool +} + +public protocol AbstractWorker: JSBridgedClass {} +public extension AbstractWorker { + @inlinable var onerror: EventHandler { + get { ClosureAttribute1Optional[Strings.onerror, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onerror, in: jsObject] = newValue } + } +} + +public class AddEventListenerOptions: BridgedDictionary { + public convenience init(passive: Bool, once: Bool, signal: AbortSignal) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.passive] = passive.jsValue + object[Strings.once] = once.jsValue + object[Strings.signal] = signal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _passive = ReadWriteAttribute(jsObject: object, name: Strings.passive) + _once = ReadWriteAttribute(jsObject: object, name: Strings.once) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var passive: Bool + + @ReadWriteAttribute + public var once: Bool + + @ReadWriteAttribute + public var signal: AbortSignal +} + +public protocol Animatable: JSBridgedClass {} +public extension Animatable { + @inlinable func animate(keyframes: JSObject?, options: Double_or_KeyframeAnimationOptions? = nil) -> Animation { + let this = jsObject + return this[Strings.animate].function!(this: this, arguments: [keyframes.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func getAnimations(options: GetAnimationsOptions? = nil) -> [Animation] { + let this = jsObject + return this[Strings.getAnimations].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class Animation: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Animation].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) + _effect = ReadWriteAttribute(jsObject: jsObject, name: Strings.effect) + _timeline = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeline) + _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) + _playState = ReadonlyAttribute(jsObject: jsObject, name: Strings.playState) + _replaceState = ReadonlyAttribute(jsObject: jsObject, name: Strings.replaceState) + _pending = ReadonlyAttribute(jsObject: jsObject, name: Strings.pending) + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _finished = ReadonlyAttribute(jsObject: jsObject, name: Strings.finished) + _onfinish = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onfinish) + _oncancel = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncancel) + _onremove = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremove) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(effect: AnimationEffect? = nil, timeline: AnimationTimeline? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [effect?.jsValue ?? .undefined, timeline?.jsValue ?? .undefined])) + } + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var effect: AnimationEffect? + + @ReadWriteAttribute + public var timeline: AnimationTimeline? + + @ReadWriteAttribute + public var playbackRate: Double + + @ReadonlyAttribute + public var playState: AnimationPlayState + + @ReadonlyAttribute + public var replaceState: AnimationReplaceState + + @ReadonlyAttribute + public var pending: Bool + + @ReadonlyAttribute + public var ready: JSPromise + + @ReadonlyAttribute + public var finished: JSPromise + + @ClosureAttribute1Optional + public var onfinish: EventHandler + + @ClosureAttribute1Optional + public var oncancel: EventHandler + + @ClosureAttribute1Optional + public var onremove: EventHandler + + @inlinable public func cancel() { + let this = jsObject + _ = this[Strings.cancel].function!(this: this, arguments: []) + } + + @inlinable public func finish() { + let this = jsObject + _ = this[Strings.finish].function!(this: this, arguments: []) + } + + @inlinable public func play() { + let this = jsObject + _ = this[Strings.play].function!(this: this, arguments: []) + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @inlinable public func updatePlaybackRate(playbackRate: Double) { + let this = jsObject + _ = this[Strings.updatePlaybackRate].function!(this: this, arguments: [playbackRate.jsValue]) + } + + @inlinable public func reverse() { + let this = jsObject + _ = this[Strings.reverse].function!(this: this, arguments: []) + } + + @inlinable public func persist() { + let this = jsObject + _ = this[Strings.persist].function!(this: this, arguments: []) + } + + @inlinable public func commitStyles() { + let this = jsObject + _ = this[Strings.commitStyles].function!(this: this, arguments: []) + } +} + +public class AnimationEffect: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationEffect].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func getTiming() -> EffectTiming { + let this = jsObject + return this[Strings.getTiming].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getComputedTiming() -> ComputedEffectTiming { + let this = jsObject + return this[Strings.getComputedTiming].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func updateTiming(timing: OptionalEffectTiming? = nil) { + let this = jsObject + _ = this[Strings.updateTiming].function!(this: this, arguments: [timing?.jsValue ?? .undefined]) + } +} + +public protocol AnimationFrameProvider: JSBridgedClass {} +public extension AnimationFrameProvider { + // XXX: method 'requestAnimationFrame' is ignored + + @inlinable func cancelAnimationFrame(handle: UInt32) { + let this = jsObject + _ = this[Strings.cancelAnimationFrame].function!(this: this, arguments: [handle.jsValue]) + } +} + +public enum AnimationPlayState: JSString, JSValueCompatible { + case idle = "idle" + case running = "running" + case paused = "paused" + case finished = "finished" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum AnimationReplaceState: JSString, JSValueCompatible { + case active = "active" + case removed = "removed" + case persisted = "persisted" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class AnimationTimeline: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationTimeline].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _currentTime = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTime) + _phase = ReadonlyAttribute(jsObject: jsObject, name: Strings.phase) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var currentTime: Double? + + @ReadonlyAttribute + public var phase: TimelinePhase +} + +public class AssignedNodesOptions: BridgedDictionary { + public convenience init(flatten: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.flatten] = flatten.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _flatten = ReadWriteAttribute(jsObject: object, name: Strings.flatten) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var flatten: Bool +} + +public class Attr: Node { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Attr].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) + _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) + _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _ownerElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerElement) + _specified = ReadonlyAttribute(jsObject: jsObject, name: Strings.specified) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var namespaceURI: String? + + @ReadonlyAttribute + public var prefix: String? + + @ReadonlyAttribute + public var localName: String + + @ReadonlyAttribute + public var name: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var ownerElement: Element? + + @ReadonlyAttribute + public var specified: Bool +} + +public class AudioTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var enabled: Bool +} + +public class AudioTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AudioTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> AudioTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> AudioTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public class BarProp: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.BarProp].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _visible = ReadonlyAttribute(jsObject: jsObject, name: Strings.visible) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var visible: Bool +} + +public class BaseComputedKeyframe: BridgedDictionary { + public convenience init(offset: Double?, computedOffset: Double, easing: String, composite: CompositeOperationOrAuto) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.computedOffset] = computedOffset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _computedOffset = ReadWriteAttribute(jsObject: object, name: Strings.computedOffset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: Double? + + @ReadWriteAttribute + public var computedOffset: Double + + @ReadWriteAttribute + public var easing: String + + @ReadWriteAttribute + public var composite: CompositeOperationOrAuto +} + +public class BaseKeyframe: BridgedDictionary { + public convenience init(offset: Double?, easing: String, composite: CompositeOperationOrAuto) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: Double? + + @ReadWriteAttribute + public var easing: String + + @ReadWriteAttribute + public var composite: CompositeOperationOrAuto +} + +public class BasePropertyIndexedKeyframe: BridgedDictionary { + public convenience init(offset: nullable_Double_or_seq_of_nullable_Double, easing: String_or_seq_of_String, composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: nullable_Double_or_seq_of_nullable_Double + + @ReadWriteAttribute + public var easing: String_or_seq_of_String + + @ReadWriteAttribute + public var composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto +} + +public class BeforeUnloadEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BeforeUnloadEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + // XXX: member 'returnValue' is ignored +} + +public class Blob: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + self.jsObject = jsObject + } + + @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var size: UInt64 + + @ReadonlyAttribute + public var type: String + + @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { + let this = jsObject + return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! + } + + // XXX: member 'stream' is ignored + + @inlinable public func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class BlobPropertyBag: BridgedDictionary { + public convenience init(type: String, endings: EndingType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.endings] = endings.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var endings: EndingType +} + +public protocol Body: JSBridgedClass {} +public extension Body { + // XXX: attribute 'body' is ignored + + @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } + + @inlinable func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func blob() -> JSPromise { + let this = jsObject + return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func blob() async throws -> Blob { + let this = jsObject + let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func formData() -> JSPromise { + let this = jsObject + return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func formData() async throws -> FormData { + let this = jsObject + let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func json() -> JSPromise { + let this = jsObject + return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func json() async throws -> JSValue { + let this = jsObject + let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class BroadcastChannel: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(name: String) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) + } + + @ReadonlyAttribute + public var name: String + + @inlinable public func postMessage(message: JSValue) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue]) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class ByteLengthQueuingStrategy: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ByteLengthQueuingStrategy].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: QueuingStrategyInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var highWaterMark: Double + + @ReadonlyAttribute + public var size: JSFunction +} + +public class CDATASection: Text { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CDATASection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class Cache: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { + let this = jsObject + let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { + let this = jsObject + let _promise: JSPromise = this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func add(request: RequestInfo) -> JSPromise { + let this = jsObject + return this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func add(request: RequestInfo) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { + let this = jsObject + return this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addAll(requests: [RequestInfo]) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { + let this = jsObject + return this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func put(request: RequestInfo, response: Response) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { + let this = jsObject + let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class CacheQueryOptions: BridgedDictionary { + public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.ignoreSearch] = ignoreSearch.jsValue + object[Strings.ignoreMethod] = ignoreMethod.jsValue + object[Strings.ignoreVary] = ignoreVary.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _ignoreSearch = ReadWriteAttribute(jsObject: object, name: Strings.ignoreSearch) + _ignoreMethod = ReadWriteAttribute(jsObject: object, name: Strings.ignoreMethod) + _ignoreVary = ReadWriteAttribute(jsObject: object, name: Strings.ignoreVary) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var ignoreSearch: Bool + + @ReadWriteAttribute + public var ignoreMethod: Bool + + @ReadWriteAttribute + public var ignoreVary: Bool +} + +public class CacheStorage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CacheStorage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { + let this = jsObject + let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func has(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func has(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func open(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func open(cacheName: String) async throws -> Cache { + let this = jsObject + let _promise: JSPromise = this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func delete(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func keys() -> JSPromise { + let this = jsObject + return this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys() async throws -> [String] { + let this = jsObject + let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public enum CanPlayTypeResult: JSString, JSValueCompatible { + case _empty = "" + case maybe = "maybe" + case probably = "probably" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasCompositing: JSBridgedClass {} +public extension CanvasCompositing { + @inlinable var globalAlpha: Double { + get { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] = newValue } + } + + @inlinable var globalCompositeOperation: String { + get { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] = newValue } + } +} + +public enum CanvasDirection: JSString, JSValueCompatible { + case ltr = "ltr" + case rtl = "rtl" + case inherit = "inherit" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasDrawImage: JSBridgedClass {} +public extension CanvasDrawImage { + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { + let this = jsObject + _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) + } + + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { + let this = jsObject + _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) + } + + @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = dx.jsValue + let _arg6 = dy.jsValue + let _arg7 = dw.jsValue + let _arg8 = dh.jsValue + let this = jsObject + _ = this[Strings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } +} + +public protocol CanvasDrawPath: JSBridgedClass {} +public extension CanvasDrawPath { + @inlinable func beginPath() { + let this = jsObject + _ = this[Strings.beginPath].function!(this: this, arguments: []) + } + + @inlinable func fill(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + } + + @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + } + + @inlinable func stroke() { + let this = jsObject + _ = this[Strings.stroke].function!(this: this, arguments: []) + } + + @inlinable func stroke(path: Path2D) { + let this = jsObject + _ = this[Strings.stroke].function!(this: this, arguments: [path.jsValue]) + } + + @inlinable func clip(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + } + + @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + } + + @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[Strings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[Strings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { + let this = jsObject + return this[Strings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { + let this = jsObject + return this[Strings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } +} + +public enum CanvasFillRule: JSString, JSValueCompatible { + case nonzero = "nonzero" + case evenodd = "evenodd" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasFillStrokeStyles: JSBridgedClass {} +public extension CanvasFillStrokeStyles { + @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { + get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } + } + + @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { + get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } + } + + @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { + let this = jsObject + return this[Strings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! + } + + @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { + let _arg0 = x0.jsValue + let _arg1 = y0.jsValue + let _arg2 = r0.jsValue + let _arg3 = x1.jsValue + let _arg4 = y1.jsValue + let _arg5 = r1.jsValue + let this = jsObject + return this[Strings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { + let this = jsObject + return this[Strings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { + let this = jsObject + return this[Strings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! + } +} + +public class CanvasFilter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasFilter].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) + } +} + +public protocol CanvasFilters: JSBridgedClass {} +public extension CanvasFilters { + @inlinable var filter: CanvasFilter_or_String { + get { ReadWriteAttribute[Strings.filter, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } + } +} + +public enum CanvasFontKerning: JSString, JSValueCompatible { + case auto = "auto" + case normal = "normal" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasFontStretch: JSString, JSValueCompatible { + case ultraCondensed = "ultra-condensed" + case extraCondensed = "extra-condensed" + case condensed = "condensed" + case semiCondensed = "semi-condensed" + case normal = "normal" + case semiExpanded = "semi-expanded" + case expanded = "expanded" + case extraExpanded = "extra-expanded" + case ultraExpanded = "ultra-expanded" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasFontVariantCaps: JSString, JSValueCompatible { + case normal = "normal" + case smallCaps = "small-caps" + case allSmallCaps = "all-small-caps" + case petiteCaps = "petite-caps" + case allPetiteCaps = "all-petite-caps" + case unicase = "unicase" + case titlingCaps = "titling-caps" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CanvasGradient: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasGradient].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func addColorStop(offset: Double, color: String) { + let this = jsObject + _ = this[Strings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) + } +} + +public protocol CanvasImageData: JSBridgedClass {} +public extension CanvasImageData { + @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + let this = jsObject + return this[Strings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func createImageData(imagedata: ImageData) -> ImageData { + let this = jsObject + return this[Strings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! + } + + @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + let this = jsObject + return this[Strings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { + let this = jsObject + _ = this[Strings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) + } + + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { + let _arg0 = imagedata.jsValue + let _arg1 = dx.jsValue + let _arg2 = dy.jsValue + let _arg3 = dirtyX.jsValue + let _arg4 = dirtyY.jsValue + let _arg5 = dirtyWidth.jsValue + let _arg6 = dirtyHeight.jsValue + let this = jsObject + _ = this[Strings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } +} + +public protocol CanvasImageSmoothing: JSBridgedClass {} +public extension CanvasImageSmoothing { + @inlinable var imageSmoothingEnabled: Bool { + get { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] = newValue } + } + + @inlinable var imageSmoothingQuality: ImageSmoothingQuality { + get { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] = newValue } + } +} + +public enum CanvasLineCap: JSString, JSValueCompatible { + case butt = "butt" + case round = "round" + case square = "square" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasLineJoin: JSString, JSValueCompatible { + case round = "round" + case bevel = "bevel" + case miter = "miter" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasPath: JSBridgedClass {} +public extension CanvasPath { + @inlinable func closePath() { + let this = jsObject + _ = this[Strings.closePath].function!(this: this, arguments: []) + } + + @inlinable func moveTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func lineTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { + let this = jsObject + _ = this[Strings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { + let _arg0 = cp1x.jsValue + let _arg1 = cp1y.jsValue + let _arg2 = cp2x.jsValue + let _arg3 = cp2y.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let this = jsObject + _ = this[Strings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { + let this = jsObject + _ = this[Strings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) + } + + @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { + let this = jsObject + _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) + } + + @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radius.jsValue + let _arg3 = startAngle.jsValue + let _arg4 = endAngle.jsValue + let _arg5 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radiusX.jsValue + let _arg3 = radiusY.jsValue + let _arg4 = rotation.jsValue + let _arg5 = startAngle.jsValue + let _arg6 = endAngle.jsValue + let _arg7 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public protocol CanvasPathDrawingStyles: JSBridgedClass {} +public extension CanvasPathDrawingStyles { + @inlinable var lineWidth: Double { + get { ReadWriteAttribute[Strings.lineWidth, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineWidth, in: jsObject] = newValue } + } + + @inlinable var lineCap: CanvasLineCap { + get { ReadWriteAttribute[Strings.lineCap, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineCap, in: jsObject] = newValue } + } + + @inlinable var lineJoin: CanvasLineJoin { + get { ReadWriteAttribute[Strings.lineJoin, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineJoin, in: jsObject] = newValue } + } + + @inlinable var miterLimit: Double { + get { ReadWriteAttribute[Strings.miterLimit, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.miterLimit, in: jsObject] = newValue } + } + + @inlinable func setLineDash(segments: [Double]) { + let this = jsObject + _ = this[Strings.setLineDash].function!(this: this, arguments: [segments.jsValue]) + } + + @inlinable func getLineDash() -> [Double] { + let this = jsObject + return this[Strings.getLineDash].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var lineDashOffset: Double { + get { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] = newValue } + } +} + +public class CanvasPattern: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasPattern].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } +} + +public protocol CanvasRect: JSBridgedClass {} +public extension CanvasRect { + @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } +} + +public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasRenderingContext2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: HTMLCanvasElement + + @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { + let this = jsObject + return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class CanvasRenderingContext2DSettings: BridgedDictionary { + public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + object[Strings.desynchronized] = desynchronized.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.willReadFrequently] = willReadFrequently.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _willReadFrequently = ReadWriteAttribute(jsObject: object, name: Strings.willReadFrequently) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool + + @ReadWriteAttribute + public var desynchronized: Bool + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace + + @ReadWriteAttribute + public var willReadFrequently: Bool +} + +public protocol CanvasShadowStyles: JSBridgedClass {} +public extension CanvasShadowStyles { + @inlinable var shadowOffsetX: Double { + get { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] = newValue } + } + + @inlinable var shadowOffsetY: Double { + get { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] = newValue } + } + + @inlinable var shadowBlur: Double { + get { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] = newValue } + } + + @inlinable var shadowColor: String { + get { ReadWriteAttribute[Strings.shadowColor, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowColor, in: jsObject] = newValue } + } +} + +public protocol CanvasState: JSBridgedClass {} +public extension CanvasState { + @inlinable func save() { + let this = jsObject + _ = this[Strings.save].function!(this: this, arguments: []) + } + + @inlinable func restore() { + let this = jsObject + _ = this[Strings.restore].function!(this: this, arguments: []) + } + + @inlinable func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable func isContextLost() -> Bool { + let this = jsObject + return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + } +} + +public protocol CanvasText: JSBridgedClass {} +public extension CanvasText { + @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + let this = jsObject + _ = this[Strings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + } + + @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + let this = jsObject + _ = this[Strings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + } + + @inlinable func measureText(text: String) -> TextMetrics { + let this = jsObject + return this[Strings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! + } +} + +public enum CanvasTextAlign: JSString, JSValueCompatible { + case start = "start" + case end = "end" + case left = "left" + case right = "right" + case center = "center" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasTextBaseline: JSString, JSValueCompatible { + case top = "top" + case hanging = "hanging" + case middle = "middle" + case alphabetic = "alphabetic" + case ideographic = "ideographic" + case bottom = "bottom" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTextDrawingStyles: JSBridgedClass {} +public extension CanvasTextDrawingStyles { + @inlinable var font: String { + get { ReadWriteAttribute[Strings.font, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.font, in: jsObject] = newValue } + } + + @inlinable var textAlign: CanvasTextAlign { + get { ReadWriteAttribute[Strings.textAlign, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textAlign, in: jsObject] = newValue } + } + + @inlinable var textBaseline: CanvasTextBaseline { + get { ReadWriteAttribute[Strings.textBaseline, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textBaseline, in: jsObject] = newValue } + } + + @inlinable var direction: CanvasDirection { + get { ReadWriteAttribute[Strings.direction, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.direction, in: jsObject] = newValue } + } + + @inlinable var letterSpacing: String { + get { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] = newValue } + } + + @inlinable var fontKerning: CanvasFontKerning { + get { ReadWriteAttribute[Strings.fontKerning, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontKerning, in: jsObject] = newValue } + } + + @inlinable var fontStretch: CanvasFontStretch { + get { ReadWriteAttribute[Strings.fontStretch, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontStretch, in: jsObject] = newValue } + } + + @inlinable var fontVariantCaps: CanvasFontVariantCaps { + get { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] = newValue } + } + + @inlinable var textRendering: CanvasTextRendering { + get { ReadWriteAttribute[Strings.textRendering, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textRendering, in: jsObject] = newValue } + } + + @inlinable var wordSpacing: String { + get { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] = newValue } + } +} + +public enum CanvasTextRendering: JSString, JSValueCompatible { + case auto = "auto" + case optimizeSpeed = "optimizeSpeed" + case optimizeLegibility = "optimizeLegibility" + case geometricPrecision = "geometricPrecision" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTransform: JSBridgedClass {} +public extension CanvasTransform { + @inlinable func scale(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func rotate(angle: Double) { + let this = jsObject + _ = this[Strings.rotate].function!(this: this, arguments: [angle.jsValue]) + } + + @inlinable func translate(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[Strings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func getTransform() -> DOMMatrix { + let this = jsObject + return this[Strings.getTransform].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } + + @inlinable func resetTransform() { + let this = jsObject + _ = this[Strings.resetTransform].function!(this: this, arguments: []) + } +} + +public protocol CanvasUserInterface: JSBridgedClass {} +public extension CanvasUserInterface { + @inlinable func drawFocusIfNeeded(element: Element) { + let this = jsObject + _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) + } + + @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { + let this = jsObject + _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) + } + + @inlinable func scrollPathIntoView() { + let this = jsObject + _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: []) + } + + @inlinable func scrollPathIntoView(path: Path2D) { + let this = jsObject + _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) + } +} + +public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var data: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { + let this = jsObject + return this[Strings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! + } + + @inlinable public func appendData(data: String) { + let this = jsObject + _ = this[Strings.appendData].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func insertData(offset: UInt32, data: String) { + let this = jsObject + _ = this[Strings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) + } + + @inlinable public func deleteData(offset: UInt32, count: UInt32) { + let this = jsObject + _ = this[Strings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) + } + + @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { + let this = jsObject + _ = this[Strings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) + } +} + +public protocol ChildNode: JSBridgedClass {} +public extension ChildNode { + @inlinable func before(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func after(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceWith(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func remove() { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: []) + } +} + +public class ClientQueryOptions: BridgedDictionary { + public convenience init(includeUncontrolled: Bool, type: ClientType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.includeUncontrolled] = includeUncontrolled.jsValue + object[Strings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: Strings.includeUncontrolled) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var includeUncontrolled: Bool + + @ReadWriteAttribute + public var type: ClientType +} + +public enum ClientType: JSString, JSValueCompatible { + case window = "window" + case worker = "worker" + case sharedworker = "sharedworker" + case all = "all" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ColorSpaceConversion: JSString, JSValueCompatible { + case none = "none" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Comment: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Comment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } +} + +public enum CompositeOperation: JSString, JSValueCompatible { + case replace = "replace" + case add = "add" + case accumulate = "accumulate" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CompositeOperationOrAuto: JSString, JSValueCompatible { + case replace = "replace" + case add = "add" + case accumulate = "accumulate" + case auto = "auto" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CompositionEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CompositionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: CompositionEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: String + + @inlinable public func initCompositionEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: WindowProxy? = nil, dataArg: String? = nil) { + let this = jsObject + _ = this[Strings.initCompositionEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, dataArg?.jsValue ?? .undefined]) + } +} + +public class CompositionEventInit: BridgedDictionary { + public convenience init(data: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: String +} + +public class ComputedEffectTiming: BridgedDictionary { + public convenience init(progress: Double?, currentIteration: Double?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.progress] = progress.jsValue + object[Strings.currentIteration] = currentIteration.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _progress = ReadWriteAttribute(jsObject: object, name: Strings.progress) + _currentIteration = ReadWriteAttribute(jsObject: object, name: Strings.currentIteration) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var progress: Double? + + @ReadWriteAttribute + public var currentIteration: Double? +} + +public class CountQueuingStrategy: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: QueuingStrategyInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var highWaterMark: Double + + @ReadonlyAttribute + public var size: JSFunction +} + +public class CustomElementRegistry: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CustomElementRegistry].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { + let this = jsObject + _ = this[Strings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func get(name: String) -> CustomElementConstructor? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func whenDefined(name: String) -> JSPromise { + let this = jsObject + return this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { + let this = jsObject + let _promise: JSPromise = this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func upgrade(root: Node) { + let this = jsObject + _ = this[Strings.upgrade].function!(this: this, arguments: [root.jsValue]) + } +} + +public class CustomEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CustomEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var detail: JSValue + + @inlinable public func initCustomEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, detail: JSValue? = nil) { + let this = jsObject + _ = this[Strings.initCustomEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined, detail?.jsValue ?? .undefined]) + } +} + +public class CustomEventInit: BridgedDictionary { + public convenience init(detail: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.detail] = detail.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var detail: JSValue +} + +public class DOMException: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + self.jsObject = jsObject + } + + @inlinable public convenience init(message: String? = nil, name: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var code: UInt16 + + public static let INDEX_SIZE_ERR: UInt16 = 1 + + public static let DOMSTRING_SIZE_ERR: UInt16 = 2 + + public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 + + public static let WRONG_DOCUMENT_ERR: UInt16 = 4 + + public static let INVALID_CHARACTER_ERR: UInt16 = 5 + + public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 + + public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 + + public static let NOT_FOUND_ERR: UInt16 = 8 + + public static let NOT_SUPPORTED_ERR: UInt16 = 9 + + public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 + + public static let INVALID_STATE_ERR: UInt16 = 11 + + public static let SYNTAX_ERR: UInt16 = 12 + + public static let INVALID_MODIFICATION_ERR: UInt16 = 13 + + public static let NAMESPACE_ERR: UInt16 = 14 + + public static let INVALID_ACCESS_ERR: UInt16 = 15 + + public static let VALIDATION_ERR: UInt16 = 16 + + public static let TYPE_MISMATCH_ERR: UInt16 = 17 + + public static let SECURITY_ERR: UInt16 = 18 + + public static let NETWORK_ERR: UInt16 = 19 + + public static let ABORT_ERR: UInt16 = 20 + + public static let URL_MISMATCH_ERR: UInt16 = 21 + + public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 + + public static let TIMEOUT_ERR: UInt16 = 23 + + public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 + + public static let DATA_CLONE_ERR: UInt16 = 25 +} + +public class DOMImplementation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMImplementation].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func createDocumentType(qualifiedName: String, publicId: String, systemId: String) -> DocumentType { + let this = jsObject + return this[Strings.createDocumentType].function!(this: this, arguments: [qualifiedName.jsValue, publicId.jsValue, systemId.jsValue]).fromJSValue()! + } + + @inlinable public func createDocument(namespace: String?, qualifiedName: String, doctype: DocumentType? = nil) -> XMLDocument { + let this = jsObject + return this[Strings.createDocument].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, doctype?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createHTMLDocument(title: String? = nil) -> Document { + let this = jsObject + return this[Strings.createHTMLDocument].function!(this: this, arguments: [title?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func hasFeature() -> Bool { + let this = jsObject + return this[Strings.hasFeature].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMMatrix: DOMMatrixReadOnly { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrix].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _a = ReadWriteAttribute(jsObject: jsObject, name: Strings.a) + _b = ReadWriteAttribute(jsObject: jsObject, name: Strings.b) + _c = ReadWriteAttribute(jsObject: jsObject, name: Strings.c) + _d = ReadWriteAttribute(jsObject: jsObject, name: Strings.d) + _e = ReadWriteAttribute(jsObject: jsObject, name: Strings.e) + _f = ReadWriteAttribute(jsObject: jsObject, name: Strings.f) + _m11 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m11) + _m12 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m12) + _m13 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m13) + _m14 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m14) + _m21 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m21) + _m22 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m22) + _m23 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m23) + _m24 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m24) + _m31 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m31) + _m32 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m32) + _m33 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m33) + _m34 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m34) + _m41 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m41) + _m42 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m42) + _m43 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m43) + _m44 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m44) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(init: String_or_seq_of_Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + // XXX: illegal static override + // override public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self + + // XXX: illegal static override + // override public static func fromFloat32Array(array32: Float32Array) -> Self + + // XXX: illegal static override + // override public static func fromFloat64Array(array64: Float64Array) -> Self + + @usableFromInline let _a: ReadWriteAttribute + @inlinable override public var a: Double { + get { _a.wrappedValue } + set { _a.wrappedValue = newValue } + } + + @usableFromInline let _b: ReadWriteAttribute + @inlinable override public var b: Double { + get { _b.wrappedValue } + set { _b.wrappedValue = newValue } + } + + @usableFromInline let _c: ReadWriteAttribute + @inlinable override public var c: Double { + get { _c.wrappedValue } + set { _c.wrappedValue = newValue } + } + + @usableFromInline let _d: ReadWriteAttribute + @inlinable override public var d: Double { + get { _d.wrappedValue } + set { _d.wrappedValue = newValue } + } + + @usableFromInline let _e: ReadWriteAttribute + @inlinable override public var e: Double { + get { _e.wrappedValue } + set { _e.wrappedValue = newValue } + } + + @usableFromInline let _f: ReadWriteAttribute + @inlinable override public var f: Double { + get { _f.wrappedValue } + set { _f.wrappedValue = newValue } + } + + @usableFromInline let _m11: ReadWriteAttribute + @inlinable override public var m11: Double { + get { _m11.wrappedValue } + set { _m11.wrappedValue = newValue } + } + + @usableFromInline let _m12: ReadWriteAttribute + @inlinable override public var m12: Double { + get { _m12.wrappedValue } + set { _m12.wrappedValue = newValue } + } + + @usableFromInline let _m13: ReadWriteAttribute + @inlinable override public var m13: Double { + get { _m13.wrappedValue } + set { _m13.wrappedValue = newValue } + } + + @usableFromInline let _m14: ReadWriteAttribute + @inlinable override public var m14: Double { + get { _m14.wrappedValue } + set { _m14.wrappedValue = newValue } + } + + @usableFromInline let _m21: ReadWriteAttribute + @inlinable override public var m21: Double { + get { _m21.wrappedValue } + set { _m21.wrappedValue = newValue } + } + + @usableFromInline let _m22: ReadWriteAttribute + @inlinable override public var m22: Double { + get { _m22.wrappedValue } + set { _m22.wrappedValue = newValue } + } + + @usableFromInline let _m23: ReadWriteAttribute + @inlinable override public var m23: Double { + get { _m23.wrappedValue } + set { _m23.wrappedValue = newValue } + } + + @usableFromInline let _m24: ReadWriteAttribute + @inlinable override public var m24: Double { + get { _m24.wrappedValue } + set { _m24.wrappedValue = newValue } + } + + @usableFromInline let _m31: ReadWriteAttribute + @inlinable override public var m31: Double { + get { _m31.wrappedValue } + set { _m31.wrappedValue = newValue } + } + + @usableFromInline let _m32: ReadWriteAttribute + @inlinable override public var m32: Double { + get { _m32.wrappedValue } + set { _m32.wrappedValue = newValue } + } + + @usableFromInline let _m33: ReadWriteAttribute + @inlinable override public var m33: Double { + get { _m33.wrappedValue } + set { _m33.wrappedValue = newValue } + } + + @usableFromInline let _m34: ReadWriteAttribute + @inlinable override public var m34: Double { + get { _m34.wrappedValue } + set { _m34.wrappedValue = newValue } + } + + @usableFromInline let _m41: ReadWriteAttribute + @inlinable override public var m41: Double { + get { _m41.wrappedValue } + set { _m41.wrappedValue = newValue } + } + + @usableFromInline let _m42: ReadWriteAttribute + @inlinable override public var m42: Double { + get { _m42.wrappedValue } + set { _m42.wrappedValue = newValue } + } + + @usableFromInline let _m43: ReadWriteAttribute + @inlinable override public var m43: Double { + get { _m43.wrappedValue } + set { _m43.wrappedValue = newValue } + } + + @usableFromInline let _m44: ReadWriteAttribute + @inlinable override public var m44: Double { + get { _m44.wrappedValue } + set { _m44.wrappedValue = newValue } + } + + @inlinable public func multiplySelf(other: DOMMatrixInit? = nil) -> Self { + let this = jsObject + return this[Strings.multiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func preMultiplySelf(other: DOMMatrixInit? = nil) -> Self { + let this = jsObject + return this[Strings.preMultiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func translateSelf(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> Self { + let this = jsObject + return this[Strings.translateSelf].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scaleSelf(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { + let _arg0 = scaleX?.jsValue ?? .undefined + let _arg1 = scaleY?.jsValue ?? .undefined + let _arg2 = scaleZ?.jsValue ?? .undefined + let _arg3 = originX?.jsValue ?? .undefined + let _arg4 = originY?.jsValue ?? .undefined + let _arg5 = originZ?.jsValue ?? .undefined + let this = jsObject + return this[Strings.scaleSelf].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable public func scale3dSelf(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { + let this = jsObject + return this[Strings.scale3dSelf].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateSelf(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> Self { + let this = jsObject + return this[Strings.rotateSelf].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateFromVectorSelf(x: Double? = nil, y: Double? = nil) -> Self { + let this = jsObject + return this[Strings.rotateFromVectorSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateAxisAngleSelf(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> Self { + let this = jsObject + return this[Strings.rotateAxisAngleSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewXSelf(sx: Double? = nil) -> Self { + let this = jsObject + return this[Strings.skewXSelf].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewYSelf(sy: Double? = nil) -> Self { + let this = jsObject + return this[Strings.skewYSelf].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func invertSelf() -> Self { + let this = jsObject + return this[Strings.invertSelf].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setMatrixValue(transformList: String) -> Self { + let this = jsObject + return this[Strings.setMatrixValue].function!(this: this, arguments: [transformList.jsValue]).fromJSValue()! + } +} + +public class DOMMatrix2DInit: BridgedDictionary { + public convenience init(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double, m11: Double, m12: Double, m21: Double, m22: Double, m41: Double, m42: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.a] = a.jsValue + object[Strings.b] = b.jsValue + object[Strings.c] = c.jsValue + object[Strings.d] = d.jsValue + object[Strings.e] = e.jsValue + object[Strings.f] = f.jsValue + object[Strings.m11] = m11.jsValue + object[Strings.m12] = m12.jsValue + object[Strings.m21] = m21.jsValue + object[Strings.m22] = m22.jsValue + object[Strings.m41] = m41.jsValue + object[Strings.m42] = m42.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _a = ReadWriteAttribute(jsObject: object, name: Strings.a) + _b = ReadWriteAttribute(jsObject: object, name: Strings.b) + _c = ReadWriteAttribute(jsObject: object, name: Strings.c) + _d = ReadWriteAttribute(jsObject: object, name: Strings.d) + _e = ReadWriteAttribute(jsObject: object, name: Strings.e) + _f = ReadWriteAttribute(jsObject: object, name: Strings.f) + _m11 = ReadWriteAttribute(jsObject: object, name: Strings.m11) + _m12 = ReadWriteAttribute(jsObject: object, name: Strings.m12) + _m21 = ReadWriteAttribute(jsObject: object, name: Strings.m21) + _m22 = ReadWriteAttribute(jsObject: object, name: Strings.m22) + _m41 = ReadWriteAttribute(jsObject: object, name: Strings.m41) + _m42 = ReadWriteAttribute(jsObject: object, name: Strings.m42) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var a: Double + + @ReadWriteAttribute + public var b: Double + + @ReadWriteAttribute + public var c: Double + + @ReadWriteAttribute + public var d: Double + + @ReadWriteAttribute + public var e: Double + + @ReadWriteAttribute + public var f: Double + + @ReadWriteAttribute + public var m11: Double + + @ReadWriteAttribute + public var m12: Double + + @ReadWriteAttribute + public var m21: Double + + @ReadWriteAttribute + public var m22: Double + + @ReadWriteAttribute + public var m41: Double + + @ReadWriteAttribute + public var m42: Double +} + +public class DOMMatrixInit: BridgedDictionary { + public convenience init(m13: Double, m14: Double, m23: Double, m24: Double, m31: Double, m32: Double, m33: Double, m34: Double, m43: Double, m44: Double, is2D: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.m13] = m13.jsValue + object[Strings.m14] = m14.jsValue + object[Strings.m23] = m23.jsValue + object[Strings.m24] = m24.jsValue + object[Strings.m31] = m31.jsValue + object[Strings.m32] = m32.jsValue + object[Strings.m33] = m33.jsValue + object[Strings.m34] = m34.jsValue + object[Strings.m43] = m43.jsValue + object[Strings.m44] = m44.jsValue + object[Strings.is2D] = is2D.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _m13 = ReadWriteAttribute(jsObject: object, name: Strings.m13) + _m14 = ReadWriteAttribute(jsObject: object, name: Strings.m14) + _m23 = ReadWriteAttribute(jsObject: object, name: Strings.m23) + _m24 = ReadWriteAttribute(jsObject: object, name: Strings.m24) + _m31 = ReadWriteAttribute(jsObject: object, name: Strings.m31) + _m32 = ReadWriteAttribute(jsObject: object, name: Strings.m32) + _m33 = ReadWriteAttribute(jsObject: object, name: Strings.m33) + _m34 = ReadWriteAttribute(jsObject: object, name: Strings.m34) + _m43 = ReadWriteAttribute(jsObject: object, name: Strings.m43) + _m44 = ReadWriteAttribute(jsObject: object, name: Strings.m44) + _is2D = ReadWriteAttribute(jsObject: object, name: Strings.is2D) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var m13: Double + + @ReadWriteAttribute + public var m14: Double + + @ReadWriteAttribute + public var m23: Double + + @ReadWriteAttribute + public var m24: Double + + @ReadWriteAttribute + public var m31: Double + + @ReadWriteAttribute + public var m32: Double + + @ReadWriteAttribute + public var m33: Double + + @ReadWriteAttribute + public var m34: Double + + @ReadWriteAttribute + public var m43: Double + + @ReadWriteAttribute + public var m44: Double + + @ReadWriteAttribute + public var is2D: Bool +} + +public class DOMMatrixReadOnly: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrixReadOnly].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _a = ReadonlyAttribute(jsObject: jsObject, name: Strings.a) + _b = ReadonlyAttribute(jsObject: jsObject, name: Strings.b) + _c = ReadonlyAttribute(jsObject: jsObject, name: Strings.c) + _d = ReadonlyAttribute(jsObject: jsObject, name: Strings.d) + _e = ReadonlyAttribute(jsObject: jsObject, name: Strings.e) + _f = ReadonlyAttribute(jsObject: jsObject, name: Strings.f) + _m11 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m11) + _m12 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m12) + _m13 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m13) + _m14 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m14) + _m21 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m21) + _m22 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m22) + _m23 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m23) + _m24 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m24) + _m31 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m31) + _m32 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m32) + _m33 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m33) + _m34 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m34) + _m41 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m41) + _m42 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m42) + _m43 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m43) + _m44 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m44) + _is2D = ReadonlyAttribute(jsObject: jsObject, name: Strings.is2D) + _isIdentity = ReadonlyAttribute(jsObject: jsObject, name: Strings.isIdentity) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: String_or_seq_of_Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self { + let this = constructor + return this[Strings.fromMatrix].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func fromFloat32Array(array32: Float32Array) -> Self { + let this = constructor + return this[Strings.fromFloat32Array].function!(this: this, arguments: [array32.jsValue]).fromJSValue()! + } + + @inlinable public static func fromFloat64Array(array64: Float64Array) -> Self { + let this = constructor + return this[Strings.fromFloat64Array].function!(this: this, arguments: [array64.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var a: Double + + @ReadonlyAttribute + public var b: Double + + @ReadonlyAttribute + public var c: Double + + @ReadonlyAttribute + public var d: Double + + @ReadonlyAttribute + public var e: Double + + @ReadonlyAttribute + public var f: Double + + @ReadonlyAttribute + public var m11: Double + + @ReadonlyAttribute + public var m12: Double + + @ReadonlyAttribute + public var m13: Double + + @ReadonlyAttribute + public var m14: Double + + @ReadonlyAttribute + public var m21: Double + + @ReadonlyAttribute + public var m22: Double + + @ReadonlyAttribute + public var m23: Double + + @ReadonlyAttribute + public var m24: Double + + @ReadonlyAttribute + public var m31: Double + + @ReadonlyAttribute + public var m32: Double + + @ReadonlyAttribute + public var m33: Double + + @ReadonlyAttribute + public var m34: Double + + @ReadonlyAttribute + public var m41: Double + + @ReadonlyAttribute + public var m42: Double + + @ReadonlyAttribute + public var m43: Double + + @ReadonlyAttribute + public var m44: Double + + @ReadonlyAttribute + public var is2D: Bool + + @ReadonlyAttribute + public var isIdentity: Bool + + @inlinable public func translate(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.translate].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scale(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { + let _arg0 = scaleX?.jsValue ?? .undefined + let _arg1 = scaleY?.jsValue ?? .undefined + let _arg2 = scaleZ?.jsValue ?? .undefined + let _arg3 = originX?.jsValue ?? .undefined + let _arg4 = originY?.jsValue ?? .undefined + let _arg5 = originZ?.jsValue ?? .undefined + let this = jsObject + return this[Strings.scale].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable public func scaleNonUniform(scaleX: Double? = nil, scaleY: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.scaleNonUniform].function!(this: this, arguments: [scaleX?.jsValue ?? .undefined, scaleY?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scale3d(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.scale3d].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotate(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.rotate].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateFromVector(x: Double? = nil, y: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.rotateFromVector].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateAxisAngle(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.rotateAxisAngle].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewX(sx: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.skewX].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewY(sy: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.skewY].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func multiply(other: DOMMatrixInit? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.multiply].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func flipX() -> DOMMatrix { + let this = jsObject + return this[Strings.flipX].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func flipY() -> DOMMatrix { + let this = jsObject + return this[Strings.flipY].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func inverse() -> DOMMatrix { + let this = jsObject + return this[Strings.inverse].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func transformPoint(point: DOMPointInit? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.transformPoint].function!(this: this, arguments: [point?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toFloat32Array() -> Float32Array { + let this = jsObject + return this[Strings.toFloat32Array].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func toFloat64Array() -> Float64Array { + let this = jsObject + return this[Strings.toFloat64Array].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMParser: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMParser].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func parseFromString(string: String, type: DOMParserSupportedType) -> Document { + let this = jsObject + return this[Strings.parseFromString].function!(this: this, arguments: [string.jsValue, type.jsValue]).fromJSValue()! + } +} + +public enum DOMParserSupportedType: JSString, JSValueCompatible { + case textHtml = "text/html" + case textXml = "text/xml" + case applicationXml = "application/xml" + case applicationXhtmlXml = "application/xhtml+xml" + case imageSvgXml = "image/svg+xml" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DOMPoint: DOMPointReadOnly { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMPoint].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) + _z = ReadWriteAttribute(jsObject: jsObject, name: Strings.z) + _w = ReadWriteAttribute(jsObject: jsObject, name: Strings.w) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) + } + + // XXX: illegal static override + // override public static func fromPoint(other: DOMPointInit? = nil) -> Self + + @usableFromInline let _x: ReadWriteAttribute + @inlinable override public var x: Double { + get { _x.wrappedValue } + set { _x.wrappedValue = newValue } + } + + @usableFromInline let _y: ReadWriteAttribute + @inlinable override public var y: Double { + get { _y.wrappedValue } + set { _y.wrappedValue = newValue } + } + + @usableFromInline let _z: ReadWriteAttribute + @inlinable override public var z: Double { + get { _z.wrappedValue } + set { _z.wrappedValue = newValue } + } + + @usableFromInline let _w: ReadWriteAttribute + @inlinable override public var w: Double { + get { _w.wrappedValue } + set { _w.wrappedValue = newValue } + } +} + +public class DOMPointInit: BridgedDictionary { + public convenience init(x: Double, y: Double, z: Double, w: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.x] = x.jsValue + object[Strings.y] = y.jsValue + object[Strings.z] = z.jsValue + object[Strings.w] = w.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _x = ReadWriteAttribute(jsObject: object, name: Strings.x) + _y = ReadWriteAttribute(jsObject: object, name: Strings.y) + _z = ReadWriteAttribute(jsObject: object, name: Strings.z) + _w = ReadWriteAttribute(jsObject: object, name: Strings.w) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var x: Double + + @ReadWriteAttribute + public var y: Double + + @ReadWriteAttribute + public var z: Double + + @ReadWriteAttribute + public var w: Double +} + +public class DOMPointReadOnly: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMPointReadOnly].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) + _z = ReadonlyAttribute(jsObject: jsObject, name: Strings.z) + _w = ReadonlyAttribute(jsObject: jsObject, name: Strings.w) + self.jsObject = jsObject + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) + } + + @inlinable public static func fromPoint(other: DOMPointInit? = nil) -> Self { + let this = constructor + return this[Strings.fromPoint].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var x: Double + + @ReadonlyAttribute + public var y: Double + + @ReadonlyAttribute + public var z: Double + + @ReadonlyAttribute + public var w: Double + + @inlinable public func matrixTransform(matrix: DOMMatrixInit? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.matrixTransform].function!(this: this, arguments: [matrix?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMQuad: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMQuad].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _p1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p1) + _p2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p2) + _p3 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p3) + _p4 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p4) + self.jsObject = jsObject + } + + @inlinable public convenience init(p1: DOMPointInit? = nil, p2: DOMPointInit? = nil, p3: DOMPointInit? = nil, p4: DOMPointInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [p1?.jsValue ?? .undefined, p2?.jsValue ?? .undefined, p3?.jsValue ?? .undefined, p4?.jsValue ?? .undefined])) + } + + @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { + let this = constructor + return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func fromQuad(other: DOMQuadInit? = nil) -> Self { + let this = constructor + return this[Strings.fromQuad].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var p1: DOMPoint + + @ReadonlyAttribute + public var p2: DOMPoint + + @ReadonlyAttribute + public var p3: DOMPoint + + @ReadonlyAttribute + public var p4: DOMPoint + + @inlinable public func getBounds() -> DOMRect { + let this = jsObject + return this[Strings.getBounds].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMQuadInit: BridgedDictionary { + public convenience init(p1: DOMPointInit, p2: DOMPointInit, p3: DOMPointInit, p4: DOMPointInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.p1] = p1.jsValue + object[Strings.p2] = p2.jsValue + object[Strings.p3] = p3.jsValue + object[Strings.p4] = p4.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _p1 = ReadWriteAttribute(jsObject: object, name: Strings.p1) + _p2 = ReadWriteAttribute(jsObject: object, name: Strings.p2) + _p3 = ReadWriteAttribute(jsObject: object, name: Strings.p3) + _p4 = ReadWriteAttribute(jsObject: object, name: Strings.p4) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var p1: DOMPointInit + + @ReadWriteAttribute + public var p2: DOMPointInit + + @ReadWriteAttribute + public var p3: DOMPointInit + + @ReadWriteAttribute + public var p4: DOMPointInit +} + +public class DOMRect: DOMRectReadOnly { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMRect].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) + } + + // XXX: illegal static override + // override public static func fromRect(other: DOMRectInit? = nil) -> Self + + @usableFromInline let _x: ReadWriteAttribute + @inlinable override public var x: Double { + get { _x.wrappedValue } + set { _x.wrappedValue = newValue } + } + + @usableFromInline let _y: ReadWriteAttribute + @inlinable override public var y: Double { + get { _y.wrappedValue } + set { _y.wrappedValue = newValue } + } + + @usableFromInline let _width: ReadWriteAttribute + @inlinable override public var width: Double { + get { _width.wrappedValue } + set { _width.wrappedValue = newValue } + } + + @usableFromInline let _height: ReadWriteAttribute + @inlinable override public var height: Double { + get { _height.wrappedValue } + set { _height.wrappedValue = newValue } + } +} + +public class DOMRectInit: BridgedDictionary { + public convenience init(x: Double, y: Double, width: Double, height: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.x] = x.jsValue + object[Strings.y] = y.jsValue + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _x = ReadWriteAttribute(jsObject: object, name: Strings.x) + _y = ReadWriteAttribute(jsObject: object, name: Strings.y) + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var x: Double + + @ReadWriteAttribute + public var y: Double + + @ReadWriteAttribute + public var width: Double + + @ReadWriteAttribute + public var height: Double +} + +public class DOMRectList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> DOMRect? { + jsObject[key].fromJSValue() + } +} + +public class DOMRectReadOnly: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectReadOnly].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) + _right = ReadonlyAttribute(jsObject: jsObject, name: Strings.right) + _bottom = ReadonlyAttribute(jsObject: jsObject, name: Strings.bottom) + _left = ReadonlyAttribute(jsObject: jsObject, name: Strings.left) + self.jsObject = jsObject + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) + } + + @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { + let this = constructor + return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var x: Double + + @ReadonlyAttribute + public var y: Double + + @ReadonlyAttribute + public var width: Double + + @ReadonlyAttribute + public var height: Double + + @ReadonlyAttribute + public var top: Double + + @ReadonlyAttribute + public var right: Double + + @ReadonlyAttribute + public var bottom: Double + + @ReadonlyAttribute + public var left: Double + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMStringList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> String? { + jsObject[key].fromJSValue() + } + + @inlinable public func contains(string: String) -> Bool { + let this = jsObject + return this[Strings.contains].function!(this: this, arguments: [string.jsValue]).fromJSValue()! + } +} + +public class DOMStringMap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringMap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public subscript(key: String) -> String { + jsObject[key].fromJSValue()! + } + + // XXX: unsupported setter for keys of type String + + // XXX: unsupported deleter for keys of type String +} + +public class DOMTokenList: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMTokenList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> String? { + jsObject[key].fromJSValue() + } + + @inlinable public func contains(token: String) -> Bool { + let this = jsObject + return this[Strings.contains].function!(this: this, arguments: [token.jsValue]).fromJSValue()! + } + + @inlinable public func add(tokens: String...) { + let this = jsObject + _ = this[Strings.add].function!(this: this, arguments: tokens.map(\.jsValue)) + } + + @inlinable public func remove(tokens: String...) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: tokens.map(\.jsValue)) + } + + @inlinable public func toggle(token: String, force: Bool? = nil) -> Bool { + let this = jsObject + return this[Strings.toggle].function!(this: this, arguments: [token.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func replace(token: String, newToken: String) -> Bool { + let this = jsObject + return this[Strings.replace].function!(this: this, arguments: [token.jsValue, newToken.jsValue]).fromJSValue()! + } + + @inlinable public func supports(token: String) -> Bool { + let this = jsObject + return this[Strings.supports].function!(this: this, arguments: [token.jsValue]).fromJSValue()! + } + + @ReadWriteAttribute + public var value: String + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class DataTransfer: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransfer].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _dropEffect = ReadWriteAttribute(jsObject: jsObject, name: Strings.dropEffect) + _effectAllowed = ReadWriteAttribute(jsObject: jsObject, name: Strings.effectAllowed) + _items = ReadonlyAttribute(jsObject: jsObject, name: Strings.items) + _types = ReadonlyAttribute(jsObject: jsObject, name: Strings.types) + _files = ReadonlyAttribute(jsObject: jsObject, name: Strings.files) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var dropEffect: String + + @ReadWriteAttribute + public var effectAllowed: String + + @ReadonlyAttribute + public var items: DataTransferItemList + + @inlinable public func setDragImage(image: Element, x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.setDragImage].function!(this: this, arguments: [image.jsValue, x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var types: [String] + + @inlinable public func getData(format: String) -> String { + let this = jsObject + return this[Strings.getData].function!(this: this, arguments: [format.jsValue]).fromJSValue()! + } + + @inlinable public func setData(format: String, data: String) { + let this = jsObject + _ = this[Strings.setData].function!(this: this, arguments: [format.jsValue, data.jsValue]) + } + + @inlinable public func clearData(format: String? = nil) { + let this = jsObject + _ = this[Strings.clearData].function!(this: this, arguments: [format?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var files: FileList +} + +public class DataTransferItem: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItem].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var type: String + + // XXX: member 'getAsString' is ignored + + @inlinable public func getAsFile() -> File? { + let this = jsObject + return this[Strings.getAsFile].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DataTransferItemList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItemList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> DataTransferItem { + jsObject[key].fromJSValue()! + } + + @inlinable public func add(data: String, type: String) -> DataTransferItem? { + let this = jsObject + return this[Strings.add].function!(this: this, arguments: [data.jsValue, type.jsValue]).fromJSValue()! + } + + @inlinable public func add(data: File) -> DataTransferItem? { + let this = jsObject + return this[Strings.add].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func remove(index: UInt32) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable public func clear() { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: []) + } +} + +public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _implementation = ReadonlyAttribute(jsObject: jsObject, name: Strings.implementation) + _URL = ReadonlyAttribute(jsObject: jsObject, name: Strings.URL) + _documentURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentURI) + _compatMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.compatMode) + _characterSet = ReadonlyAttribute(jsObject: jsObject, name: Strings.characterSet) + _charset = ReadonlyAttribute(jsObject: jsObject, name: Strings.charset) + _inputEncoding = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputEncoding) + _contentType = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentType) + _doctype = ReadonlyAttribute(jsObject: jsObject, name: Strings.doctype) + _documentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentElement) + _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) + _domain = ReadWriteAttribute(jsObject: jsObject, name: Strings.domain) + _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) + _cookie = ReadWriteAttribute(jsObject: jsObject, name: Strings.cookie) + _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) + _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) + _body = ReadWriteAttribute(jsObject: jsObject, name: Strings.body) + _head = ReadonlyAttribute(jsObject: jsObject, name: Strings.head) + _images = ReadonlyAttribute(jsObject: jsObject, name: Strings.images) + _embeds = ReadonlyAttribute(jsObject: jsObject, name: Strings.embeds) + _plugins = ReadonlyAttribute(jsObject: jsObject, name: Strings.plugins) + _links = ReadonlyAttribute(jsObject: jsObject, name: Strings.links) + _forms = ReadonlyAttribute(jsObject: jsObject, name: Strings.forms) + _scripts = ReadonlyAttribute(jsObject: jsObject, name: Strings.scripts) + _currentScript = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentScript) + _defaultView = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultView) + _designMode = ReadWriteAttribute(jsObject: jsObject, name: Strings.designMode) + _hidden = ReadonlyAttribute(jsObject: jsObject, name: Strings.hidden) + _visibilityState = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibilityState) + _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) + _onvisibilitychange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onvisibilitychange) + _fgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.fgColor) + _linkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.linkColor) + _vlinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.vlinkColor) + _alinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.alinkColor) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _anchors = ReadonlyAttribute(jsObject: jsObject, name: Strings.anchors) + _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) + _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) + _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var implementation: DOMImplementation + + @ReadonlyAttribute + public var URL: String + + @ReadonlyAttribute + public var documentURI: String + + @ReadonlyAttribute + public var compatMode: String + + @ReadonlyAttribute + public var characterSet: String + + @ReadonlyAttribute + public var charset: String + + @ReadonlyAttribute + public var inputEncoding: String + + @ReadonlyAttribute + public var contentType: String + + @ReadonlyAttribute + public var doctype: DocumentType? + + @ReadonlyAttribute + public var documentElement: Element? + + @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! + } + + @inlinable public func createElement(localName: String, options: ElementCreationOptions_or_String? = nil) -> Element { + let this = jsObject + return this[Strings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: ElementCreationOptions_or_String? = nil) -> Element { + let this = jsObject + return this[Strings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createDocumentFragment() -> DocumentFragment { + let this = jsObject + return this[Strings.createDocumentFragment].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func createTextNode(data: String) -> Text { + let this = jsObject + return this[Strings.createTextNode].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createCDATASection(data: String) -> CDATASection { + let this = jsObject + return this[Strings.createCDATASection].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createComment(data: String) -> Comment { + let this = jsObject + return this[Strings.createComment].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createProcessingInstruction(target: String, data: String) -> ProcessingInstruction { + let this = jsObject + return this[Strings.createProcessingInstruction].function!(this: this, arguments: [target.jsValue, data.jsValue]).fromJSValue()! + } + + @inlinable public func importNode(node: Node, deep: Bool? = nil) -> Node { + let this = jsObject + return this[Strings.importNode].function!(this: this, arguments: [node.jsValue, deep?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func adoptNode(node: Node) -> Node { + let this = jsObject + return this[Strings.adoptNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public func createAttribute(localName: String) -> Attr { + let this = jsObject + return this[Strings.createAttribute].function!(this: this, arguments: [localName.jsValue]).fromJSValue()! + } + + @inlinable public func createAttributeNS(namespace: String?, qualifiedName: String) -> Attr { + let this = jsObject + return this[Strings.createAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func createEvent(interface: String) -> Event { + let this = jsObject + return this[Strings.createEvent].function!(this: this, arguments: [interface.jsValue]).fromJSValue()! + } + + @inlinable public func createRange() -> Range { + let this = jsObject + return this[Strings.createRange].function!(this: this, arguments: []).fromJSValue()! + } + + // XXX: member 'createNodeIterator' is ignored + + // XXX: member 'createTreeWalker' is ignored + + @ReadonlyAttribute + public var location: Location? + + @ReadWriteAttribute + public var domain: String + + @ReadonlyAttribute + public var referrer: String + + @ReadWriteAttribute + public var cookie: String + + @ReadonlyAttribute + public var lastModified: String + + @ReadonlyAttribute + public var readyState: DocumentReadyState + + @inlinable public subscript(key: String) -> JSObject { + jsObject[key].fromJSValue()! + } + + @ReadWriteAttribute + public var title: String + + @ReadWriteAttribute + public var dir: String + + @ReadWriteAttribute + public var body: HTMLElement? + + @ReadonlyAttribute + public var head: HTMLHeadElement? + + @ReadonlyAttribute + public var images: HTMLCollection + + @ReadonlyAttribute + public var embeds: HTMLCollection + + @ReadonlyAttribute + public var plugins: HTMLCollection + + @ReadonlyAttribute + public var links: HTMLCollection + + @ReadonlyAttribute + public var forms: HTMLCollection + + @ReadonlyAttribute + public var scripts: HTMLCollection + + @inlinable public func getElementsByName(elementName: String) -> NodeList { + let this = jsObject + return this[Strings.getElementsByName].function!(this: this, arguments: [elementName.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var currentScript: HTMLOrSVGScriptElement? + + @inlinable public func open(unused1: String? = nil, unused2: String? = nil) -> Self { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [unused1?.jsValue ?? .undefined, unused2?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func open(url: String, name: String, features: String) -> WindowProxy? { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [url.jsValue, name.jsValue, features.jsValue]).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public func write(text: String...) { + let this = jsObject + _ = this[Strings.write].function!(this: this, arguments: text.map(\.jsValue)) + } + + @inlinable public func writeln(text: String...) { + let this = jsObject + _ = this[Strings.writeln].function!(this: this, arguments: text.map(\.jsValue)) + } + + @ReadonlyAttribute + public var defaultView: WindowProxy? + + @inlinable public func hasFocus() -> Bool { + let this = jsObject + return this[Strings.hasFocus].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var designMode: String + + @inlinable public func execCommand(commandId: String, showUI: Bool? = nil, value: String? = nil) -> Bool { + let this = jsObject + return this[Strings.execCommand].function!(this: this, arguments: [commandId.jsValue, showUI?.jsValue ?? .undefined, value?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func queryCommandEnabled(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandEnabled].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandIndeterm(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandIndeterm].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandState(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandState].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandSupported(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandSupported].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandValue(commandId: String) -> String { + let this = jsObject + return this[Strings.queryCommandValue].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var hidden: Bool + + @ReadonlyAttribute + public var visibilityState: DocumentVisibilityState + + @ClosureAttribute1Optional + public var onreadystatechange: EventHandler + + @ClosureAttribute1Optional + public var onvisibilitychange: EventHandler + + @ReadWriteAttribute + public var fgColor: String + + @ReadWriteAttribute + public var linkColor: String + + @ReadWriteAttribute + public var vlinkColor: String + + @ReadWriteAttribute + public var alinkColor: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadonlyAttribute + public var anchors: HTMLCollection + + @ReadonlyAttribute + public var applets: HTMLCollection + + @inlinable public func clear() { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public func captureEvents() { + let this = jsObject + _ = this[Strings.captureEvents].function!(this: this, arguments: []) + } + + @inlinable public func releaseEvents() { + let this = jsObject + _ = this[Strings.releaseEvents].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var all: HTMLAllCollection + + @ReadonlyAttribute + public var timeline: DocumentTimeline +} + +public protocol DocumentAndElementEventHandlers: JSBridgedClass {} +public extension DocumentAndElementEventHandlers { + @inlinable var oncopy: EventHandler { + get { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] = newValue } + } + + @inlinable var oncut: EventHandler { + get { ClosureAttribute1Optional[Strings.oncut, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncut, in: jsObject] = newValue } + } + + @inlinable var onpaste: EventHandler { + get { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] = newValue } + } +} + +public class DocumentFragment: Node, NonElementParentNode, ParentNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentFragment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol DocumentOrShadowRoot: JSBridgedClass {} +public extension DocumentOrShadowRoot { + @inlinable var activeElement: Element? { ReadonlyAttribute[Strings.activeElement, in: jsObject] } + + @inlinable func getAnimations() -> [Animation] { + let this = jsObject + return this[Strings.getAnimations].function!(this: this, arguments: []).fromJSValue()! + } +} + +public enum DocumentReadyState: JSString, JSValueCompatible { + case loading = "loading" + case interactive = "interactive" + case complete = "complete" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DocumentTimeline: AnimationTimeline { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentTimeline].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(options: DocumentTimelineOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [options?.jsValue ?? .undefined])) + } +} + +public class DocumentTimelineOptions: BridgedDictionary { + public convenience init(originTime: DOMHighResTimeStamp) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.originTime] = originTime.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _originTime = ReadWriteAttribute(jsObject: object, name: Strings.originTime) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var originTime: DOMHighResTimeStamp +} + +public class DocumentType: Node, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentType].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _publicId = ReadonlyAttribute(jsObject: jsObject, name: Strings.publicId) + _systemId = ReadonlyAttribute(jsObject: jsObject, name: Strings.systemId) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var publicId: String + + @ReadonlyAttribute + public var systemId: String +} + +public enum DocumentVisibilityState: JSString, JSValueCompatible { + case visible = "visible" + case hidden = "hidden" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DragEvent: MouseEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DragEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _dataTransfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.dataTransfer) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: DragEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var dataTransfer: DataTransfer? +} + +public class DragEventInit: BridgedDictionary { + public convenience init(dataTransfer: DataTransfer?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.dataTransfer] = dataTransfer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _dataTransfer = ReadWriteAttribute(jsObject: object, name: Strings.dataTransfer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var dataTransfer: DataTransfer? +} + +public class EffectTiming: BridgedDictionary { + public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, direction: PlaybackDirection, easing: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.delay] = delay.jsValue + object[Strings.endDelay] = endDelay.jsValue + object[Strings.fill] = fill.jsValue + object[Strings.iterationStart] = iterationStart.jsValue + object[Strings.iterations] = iterations.jsValue + object[Strings.direction] = direction.jsValue + object[Strings.easing] = easing.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) + _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) + _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) + _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) + _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) + _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var delay: Double + + @ReadWriteAttribute + public var endDelay: Double + + @ReadWriteAttribute + public var fill: FillMode + + @ReadWriteAttribute + public var iterationStart: Double + + @ReadWriteAttribute + public var iterations: Double + + @ReadWriteAttribute + public var direction: PlaybackDirection + + @ReadWriteAttribute + public var easing: String +} + +public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) + _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) + _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) + _tagName = ReadonlyAttribute(jsObject: jsObject, name: Strings.tagName) + _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) + _className = ReadWriteAttribute(jsObject: jsObject, name: Strings.className) + _classList = ReadonlyAttribute(jsObject: jsObject, name: Strings.classList) + _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) + _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var namespaceURI: String? + + @ReadonlyAttribute + public var prefix: String? + + @ReadonlyAttribute + public var localName: String + + @ReadonlyAttribute + public var tagName: String + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var className: String + + @ReadonlyAttribute + public var classList: DOMTokenList + + @ReadWriteAttribute + public var slot: String + + @inlinable public func hasAttributes() -> Bool { + let this = jsObject + return this[Strings.hasAttributes].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var attributes: NamedNodeMap + + @inlinable public func getAttributeNames() -> [String] { + let this = jsObject + return this[Strings.getAttributeNames].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getAttribute(qualifiedName: String) -> String? { + let this = jsObject + return this[Strings.getAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNS(namespace: String?, localName: String) -> String? { + let this = jsObject + return this[Strings.getAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setAttribute(qualifiedName: String, value: String) { + let this = jsObject + _ = this[Strings.setAttribute].function!(this: this, arguments: [qualifiedName.jsValue, value.jsValue]) + } + + @inlinable public func setAttributeNS(namespace: String?, qualifiedName: String, value: String) { + let this = jsObject + _ = this[Strings.setAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, value.jsValue]) + } + + @inlinable public func removeAttribute(qualifiedName: String) { + let this = jsObject + _ = this[Strings.removeAttribute].function!(this: this, arguments: [qualifiedName.jsValue]) + } + + @inlinable public func removeAttributeNS(namespace: String?, localName: String) { + let this = jsObject + _ = this[Strings.removeAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]) + } + + @inlinable public func toggleAttribute(qualifiedName: String, force: Bool? = nil) -> Bool { + let this = jsObject + return this[Strings.toggleAttribute].function!(this: this, arguments: [qualifiedName.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func hasAttribute(qualifiedName: String) -> Bool { + let this = jsObject + return this[Strings.hasAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func hasAttributeNS(namespace: String?, localName: String) -> Bool { + let this = jsObject + return this[Strings.hasAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNode(qualifiedName: String) -> Attr? { + let this = jsObject + return this[Strings.getAttributeNode].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNodeNS(namespace: String?, localName: String) -> Attr? { + let this = jsObject + return this[Strings.getAttributeNodeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setAttributeNode(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func setAttributeNodeNS(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setAttributeNodeNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func removeAttributeNode(attr: Attr) -> Attr { + let this = jsObject + return this[Strings.removeAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func attachShadow(init: ShadowRootInit) -> ShadowRoot { + let this = jsObject + return this[Strings.attachShadow].function!(this: this, arguments: [`init`.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func closest(selectors: String) -> Element? { + let this = jsObject + return this[Strings.closest].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func matches(selectors: String) -> Bool { + let this = jsObject + return this[Strings.matches].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func webkitMatchesSelector(selectors: String) -> Bool { + let this = jsObject + return this[Strings.webkitMatchesSelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! + } + + @inlinable public func insertAdjacentElement(where: String, element: Element) -> Element? { + let this = jsObject + return this[Strings.insertAdjacentElement].function!(this: this, arguments: [`where`.jsValue, element.jsValue]).fromJSValue()! + } + + @inlinable public func insertAdjacentText(where: String, data: String) { + let this = jsObject + _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) + } +} + +public protocol ElementContentEditable: JSBridgedClass {} +public extension ElementContentEditable { + @inlinable var contentEditable: String { + get { ReadWriteAttribute[Strings.contentEditable, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.contentEditable, in: jsObject] = newValue } + } + + @inlinable var enterKeyHint: String { + get { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] = newValue } + } + + @inlinable var isContentEditable: Bool { ReadonlyAttribute[Strings.isContentEditable, in: jsObject] } + + @inlinable var inputMode: String { + get { ReadWriteAttribute[Strings.inputMode, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.inputMode, in: jsObject] = newValue } + } +} + +public class ElementCreationOptions: BridgedDictionary { + public convenience init(is: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.is] = `is`.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _is = ReadWriteAttribute(jsObject: object, name: Strings.is) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var `is`: String +} + +public class ElementDefinitionOptions: BridgedDictionary { + public convenience init(extends: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.extends] = extends.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _extends = ReadWriteAttribute(jsObject: object, name: Strings.extends) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var extends: String +} + +public class ElementInternals: JSBridgedClass, ARIAMixin { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ElementInternals].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { + let this = jsObject + _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { + let this = jsObject + _ = this[Strings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public enum EndingType: JSString, JSValueCompatible { + case transparent = "transparent" + case native = "native" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) + _lineno = ReadonlyAttribute(jsObject: jsObject, name: Strings.lineno) + _colno = ReadonlyAttribute(jsObject: jsObject, name: Strings.colno) + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: ErrorEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var filename: String + + @ReadonlyAttribute + public var lineno: UInt32 + + @ReadonlyAttribute + public var colno: UInt32 + + @ReadonlyAttribute + public var error: JSValue +} + +public class ErrorEventInit: BridgedDictionary { + public convenience init(message: String, filename: String, lineno: UInt32, colno: UInt32, error: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.message] = message.jsValue + object[Strings.filename] = filename.jsValue + object[Strings.lineno] = lineno.jsValue + object[Strings.colno] = colno.jsValue + object[Strings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _message = ReadWriteAttribute(jsObject: object, name: Strings.message) + _filename = ReadWriteAttribute(jsObject: object, name: Strings.filename) + _lineno = ReadWriteAttribute(jsObject: object, name: Strings.lineno) + _colno = ReadWriteAttribute(jsObject: object, name: Strings.colno) + _error = ReadWriteAttribute(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var message: String + + @ReadWriteAttribute + public var filename: String + + @ReadWriteAttribute + public var lineno: UInt32 + + @ReadWriteAttribute + public var colno: UInt32 + + @ReadWriteAttribute + public var error: JSValue +} + +public class Event: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Event].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) + _srcElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.srcElement) + _currentTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTarget) + _eventPhase = ReadonlyAttribute(jsObject: jsObject, name: Strings.eventPhase) + _cancelBubble = ReadWriteAttribute(jsObject: jsObject, name: Strings.cancelBubble) + _bubbles = ReadonlyAttribute(jsObject: jsObject, name: Strings.bubbles) + _cancelable = ReadonlyAttribute(jsObject: jsObject, name: Strings.cancelable) + _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) + _defaultPrevented = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultPrevented) + _composed = ReadonlyAttribute(jsObject: jsObject, name: Strings.composed) + _isTrusted = ReadonlyAttribute(jsObject: jsObject, name: Strings.isTrusted) + _timeStamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeStamp) + self.jsObject = jsObject + } + + @inlinable public convenience init(type: String, eventInitDict: EventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var target: EventTarget? + + @ReadonlyAttribute + public var srcElement: EventTarget? + + @ReadonlyAttribute + public var currentTarget: EventTarget? + + @inlinable public func composedPath() -> [EventTarget] { + let this = jsObject + return this[Strings.composedPath].function!(this: this, arguments: []).fromJSValue()! + } + + public static let NONE: UInt16 = 0 + + public static let CAPTURING_PHASE: UInt16 = 1 + + public static let AT_TARGET: UInt16 = 2 + + public static let BUBBLING_PHASE: UInt16 = 3 + + @ReadonlyAttribute + public var eventPhase: UInt16 + + @inlinable public func stopPropagation() { + let this = jsObject + _ = this[Strings.stopPropagation].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var cancelBubble: Bool + + @inlinable public func stopImmediatePropagation() { + let this = jsObject + _ = this[Strings.stopImmediatePropagation].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var bubbles: Bool + + @ReadonlyAttribute + public var cancelable: Bool + + @ReadWriteAttribute + public var returnValue: Bool + + @inlinable public func preventDefault() { + let this = jsObject + _ = this[Strings.preventDefault].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var defaultPrevented: Bool + + @ReadonlyAttribute + public var composed: Bool + + @ReadonlyAttribute + public var isTrusted: Bool + + @ReadonlyAttribute + public var timeStamp: DOMHighResTimeStamp + + @inlinable public func initEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil) { + let this = jsObject + _ = this[Strings.initEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined]) + } +} + +public class EventInit: BridgedDictionary { + public convenience init(bubbles: Bool, cancelable: Bool, composed: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.bubbles] = bubbles.jsValue + object[Strings.cancelable] = cancelable.jsValue + object[Strings.composed] = composed.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _bubbles = ReadWriteAttribute(jsObject: object, name: Strings.bubbles) + _cancelable = ReadWriteAttribute(jsObject: object, name: Strings.cancelable) + _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var bubbles: Bool + + @ReadWriteAttribute + public var cancelable: Bool + + @ReadWriteAttribute + public var composed: Bool +} + +public class EventListenerOptions: BridgedDictionary { + public convenience init(capture: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.capture] = capture.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _capture = ReadWriteAttribute(jsObject: object, name: Strings.capture) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var capture: Bool +} + +public class EventModifierInit: BridgedDictionary { + public convenience init(ctrlKey: Bool, shiftKey: Bool, altKey: Bool, metaKey: Bool, modifierAltGraph: Bool, modifierCapsLock: Bool, modifierFn: Bool, modifierFnLock: Bool, modifierHyper: Bool, modifierNumLock: Bool, modifierScrollLock: Bool, modifierSuper: Bool, modifierSymbol: Bool, modifierSymbolLock: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.ctrlKey] = ctrlKey.jsValue + object[Strings.shiftKey] = shiftKey.jsValue + object[Strings.altKey] = altKey.jsValue + object[Strings.metaKey] = metaKey.jsValue + object[Strings.modifierAltGraph] = modifierAltGraph.jsValue + object[Strings.modifierCapsLock] = modifierCapsLock.jsValue + object[Strings.modifierFn] = modifierFn.jsValue + object[Strings.modifierFnLock] = modifierFnLock.jsValue + object[Strings.modifierHyper] = modifierHyper.jsValue + object[Strings.modifierNumLock] = modifierNumLock.jsValue + object[Strings.modifierScrollLock] = modifierScrollLock.jsValue + object[Strings.modifierSuper] = modifierSuper.jsValue + object[Strings.modifierSymbol] = modifierSymbol.jsValue + object[Strings.modifierSymbolLock] = modifierSymbolLock.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _ctrlKey = ReadWriteAttribute(jsObject: object, name: Strings.ctrlKey) + _shiftKey = ReadWriteAttribute(jsObject: object, name: Strings.shiftKey) + _altKey = ReadWriteAttribute(jsObject: object, name: Strings.altKey) + _metaKey = ReadWriteAttribute(jsObject: object, name: Strings.metaKey) + _modifierAltGraph = ReadWriteAttribute(jsObject: object, name: Strings.modifierAltGraph) + _modifierCapsLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierCapsLock) + _modifierFn = ReadWriteAttribute(jsObject: object, name: Strings.modifierFn) + _modifierFnLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierFnLock) + _modifierHyper = ReadWriteAttribute(jsObject: object, name: Strings.modifierHyper) + _modifierNumLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierNumLock) + _modifierScrollLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierScrollLock) + _modifierSuper = ReadWriteAttribute(jsObject: object, name: Strings.modifierSuper) + _modifierSymbol = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbol) + _modifierSymbolLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbolLock) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var ctrlKey: Bool + + @ReadWriteAttribute + public var shiftKey: Bool + + @ReadWriteAttribute + public var altKey: Bool + + @ReadWriteAttribute + public var metaKey: Bool + + @ReadWriteAttribute + public var modifierAltGraph: Bool + + @ReadWriteAttribute + public var modifierCapsLock: Bool + + @ReadWriteAttribute + public var modifierFn: Bool + + @ReadWriteAttribute + public var modifierFnLock: Bool + + @ReadWriteAttribute + public var modifierHyper: Bool + + @ReadWriteAttribute + public var modifierNumLock: Bool + + @ReadWriteAttribute + public var modifierScrollLock: Bool + + @ReadWriteAttribute + public var modifierSuper: Bool + + @ReadWriteAttribute + public var modifierSymbol: Bool + + @ReadWriteAttribute + public var modifierSymbolLock: Bool +} + +public class EventSource: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.EventSource].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _withCredentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.withCredentials) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _onopen = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onopen) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, eventSourceInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var withCredentials: Bool + + public static let CONNECTING: UInt16 = 0 + + public static let OPEN: UInt16 = 1 + + public static let CLOSED: UInt16 = 2 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ClosureAttribute1Optional + public var onopen: EventHandler + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} + +public class EventSourceInit: BridgedDictionary { + public convenience init(withCredentials: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.withCredentials] = withCredentials.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _withCredentials = ReadWriteAttribute(jsObject: object, name: Strings.withCredentials) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var withCredentials: Bool +} + +public class EventTarget: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EventTarget].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + // XXX: member 'addEventListener' is ignored + + // XXX: member 'removeEventListener' is ignored + + @inlinable public func dispatchEvent(event: Event) -> Bool { + let this = jsObject + return this[Strings.dispatchEvent].function!(this: this, arguments: [event.jsValue]).fromJSValue()! + } +} + +public class ExtendableEventInit: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class External: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.External].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func AddSearchProvider() { + let this = jsObject + _ = this[Strings.AddSearchProvider].function!(this: this, arguments: []) + } + + @inlinable public func IsSearchProviderInstalled() { + let this = jsObject + _ = this[Strings.IsSearchProviderInstalled].function!(this: this, arguments: []) + } +} + +public class FetchEventInit: BridgedDictionary { + public convenience init(request: Request, preloadResponse: JSPromise, clientId: String, resultingClientId: String, replacesClientId: String, handled: JSPromise) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.request] = request.jsValue + object[Strings.preloadResponse] = preloadResponse.jsValue + object[Strings.clientId] = clientId.jsValue + object[Strings.resultingClientId] = resultingClientId.jsValue + object[Strings.replacesClientId] = replacesClientId.jsValue + object[Strings.handled] = handled.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _request = ReadWriteAttribute(jsObject: object, name: Strings.request) + _preloadResponse = ReadWriteAttribute(jsObject: object, name: Strings.preloadResponse) + _clientId = ReadWriteAttribute(jsObject: object, name: Strings.clientId) + _resultingClientId = ReadWriteAttribute(jsObject: object, name: Strings.resultingClientId) + _replacesClientId = ReadWriteAttribute(jsObject: object, name: Strings.replacesClientId) + _handled = ReadWriteAttribute(jsObject: object, name: Strings.handled) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var request: Request + + @ReadWriteAttribute + public var preloadResponse: JSPromise + + @ReadWriteAttribute + public var clientId: String + + @ReadWriteAttribute + public var resultingClientId: String + + @ReadWriteAttribute + public var replacesClientId: String + + @ReadWriteAttribute + public var handled: JSPromise +} + +public class File: Blob { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var lastModified: Int64 +} + +public class FileList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> File? { + jsObject[key].fromJSValue() + } + + @ReadonlyAttribute + public var length: UInt32 +} + +public class FilePropertyBag: BridgedDictionary { + public convenience init(lastModified: Int64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.lastModified] = lastModified.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var lastModified: Int64 +} + +public class FileReader: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) + _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) + _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) + _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func readAsArrayBuffer(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func readAsBinaryString(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { + let this = jsObject + _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) + } + + @inlinable public func readAsDataURL(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func abort() { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: []) + } + + public static let EMPTY: UInt16 = 0 + + public static let LOADING: UInt16 = 1 + + public static let DONE: UInt16 = 2 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var result: ArrayBuffer_or_String? + + @ReadonlyAttribute + public var error: DOMException? + + @ClosureAttribute1Optional + public var onloadstart: EventHandler + + @ClosureAttribute1Optional + public var onprogress: EventHandler + + @ClosureAttribute1Optional + public var onload: EventHandler + + @ClosureAttribute1Optional + public var onabort: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ClosureAttribute1Optional + public var onloadend: EventHandler +} + +public enum FillMode: JSString, JSValueCompatible { + case none = "none" + case forwards = "forwards" + case backwards = "backwards" + case both = "both" + case auto = "auto" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class FocusEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FocusEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: FocusEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var relatedTarget: EventTarget? +} + +public class FocusEventInit: BridgedDictionary { + public convenience init(relatedTarget: EventTarget?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.relatedTarget] = relatedTarget.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var relatedTarget: EventTarget? +} + +public class FocusOptions: BridgedDictionary { + public convenience init(preventScroll: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.preventScroll] = preventScroll.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventScroll = ReadWriteAttribute(jsObject: object, name: Strings.preventScroll) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventScroll: Bool +} + +public class FormData: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FormData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(form: HTMLFormElement? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [form?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func append(name: String, blobValue: Blob, filename: String? = nil) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> FormDataEntryValue? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAll(name: String) -> [FormDataEntryValue] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func set(name: String, blobValue: Blob, filename: String? = nil) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class FormDataEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FormDataEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _formData = ReadonlyAttribute(jsObject: jsObject, name: Strings.formData) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: FormDataEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var formData: FormData +} + +public class FormDataEventInit: BridgedDictionary { + public convenience init(formData: FormData) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.formData] = formData.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _formData = ReadWriteAttribute(jsObject: object, name: Strings.formData) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var formData: FormData +} + +public enum FrameType: JSString, JSValueCompatible { + case auxiliary = "auxiliary" + case topLevel = "top-level" + case nested = "nested" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol GenericTransformStream: JSBridgedClass {} +public extension GenericTransformStream { + @inlinable var readable: ReadableStream { ReadonlyAttribute[Strings.readable, in: jsObject] } + + @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } +} + +public class GetAnimationsOptions: BridgedDictionary { + public convenience init(subtree: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.subtree] = subtree.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var subtree: Bool +} + +public class GetRootNodeOptions: BridgedDictionary { + public convenience init(composed: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.composed] = composed.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var composed: Bool +} + +public protocol GlobalEventHandlers: JSBridgedClass {} +public extension GlobalEventHandlers { + @inlinable var onabort: EventHandler { + get { ClosureAttribute1Optional[Strings.onabort, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onabort, in: jsObject] = newValue } + } + + @inlinable var onauxclick: EventHandler { + get { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] = newValue } + } + + @inlinable var onblur: EventHandler { + get { ClosureAttribute1Optional[Strings.onblur, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onblur, in: jsObject] = newValue } + } + + @inlinable var oncancel: EventHandler { + get { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] = newValue } + } + + @inlinable var oncanplay: EventHandler { + get { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] = newValue } + } + + @inlinable var oncanplaythrough: EventHandler { + get { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] = newValue } + } + + @inlinable var onchange: EventHandler { + get { ClosureAttribute1Optional[Strings.onchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onchange, in: jsObject] = newValue } + } + + @inlinable var onclick: EventHandler { + get { ClosureAttribute1Optional[Strings.onclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onclick, in: jsObject] = newValue } + } + + @inlinable var onclose: EventHandler { + get { ClosureAttribute1Optional[Strings.onclose, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onclose, in: jsObject] = newValue } + } + + @inlinable var oncontextlost: EventHandler { + get { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] = newValue } + } + + @inlinable var oncontextmenu: EventHandler { + get { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] = newValue } + } + + @inlinable var oncontextrestored: EventHandler { + get { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] = newValue } + } + + @inlinable var oncuechange: EventHandler { + get { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] = newValue } + } + + @inlinable var ondblclick: EventHandler { + get { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] = newValue } + } + + @inlinable var ondrag: EventHandler { + get { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] = newValue } + } + + @inlinable var ondragend: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] = newValue } + } + + @inlinable var ondragenter: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] = newValue } + } + + @inlinable var ondragleave: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] = newValue } + } + + @inlinable var ondragover: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] = newValue } + } + + @inlinable var ondragstart: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] = newValue } + } + + @inlinable var ondrop: EventHandler { + get { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] = newValue } + } + + @inlinable var ondurationchange: EventHandler { + get { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] = newValue } + } + + @inlinable var onemptied: EventHandler { + get { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] = newValue } + } + + @inlinable var onended: EventHandler { + get { ClosureAttribute1Optional[Strings.onended, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onended, in: jsObject] = newValue } + } + + @inlinable var onerror: OnErrorEventHandler { + get { ClosureAttribute5Optional[Strings.onerror, in: jsObject] } + nonmutating set { ClosureAttribute5Optional[Strings.onerror, in: jsObject] = newValue } + } + + @inlinable var onfocus: EventHandler { + get { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] = newValue } + } + + @inlinable var onformdata: EventHandler { + get { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] = newValue } + } + + @inlinable var oninput: EventHandler { + get { ClosureAttribute1Optional[Strings.oninput, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oninput, in: jsObject] = newValue } + } + + @inlinable var oninvalid: EventHandler { + get { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] = newValue } + } + + @inlinable var onkeydown: EventHandler { + get { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] = newValue } + } + + @inlinable var onkeypress: EventHandler { + get { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] = newValue } + } + + @inlinable var onkeyup: EventHandler { + get { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] = newValue } + } + + @inlinable var onload: EventHandler { + get { ClosureAttribute1Optional[Strings.onload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onload, in: jsObject] = newValue } + } + + @inlinable var onloadeddata: EventHandler { + get { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] = newValue } + } + + @inlinable var onloadedmetadata: EventHandler { + get { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] = newValue } + } + + @inlinable var onloadstart: EventHandler { + get { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] = newValue } + } + + @inlinable var onmousedown: EventHandler { + get { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] = newValue } + } + + @inlinable var onmouseenter: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] = newValue } + } + + @inlinable var onmouseleave: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] = newValue } + } + + @inlinable var onmousemove: EventHandler { + get { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] = newValue } + } + + @inlinable var onmouseout: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] = newValue } + } + + @inlinable var onmouseover: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] = newValue } + } + + @inlinable var onmouseup: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] = newValue } + } + + @inlinable var onpause: EventHandler { + get { ClosureAttribute1Optional[Strings.onpause, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpause, in: jsObject] = newValue } + } + + @inlinable var onplay: EventHandler { + get { ClosureAttribute1Optional[Strings.onplay, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onplay, in: jsObject] = newValue } + } + + @inlinable var onplaying: EventHandler { + get { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] = newValue } + } + + @inlinable var onprogress: EventHandler { + get { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] = newValue } + } + + @inlinable var onratechange: EventHandler { + get { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] = newValue } + } + + @inlinable var onreset: EventHandler { + get { ClosureAttribute1Optional[Strings.onreset, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onreset, in: jsObject] = newValue } + } + + @inlinable var onresize: EventHandler { + get { ClosureAttribute1Optional[Strings.onresize, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onresize, in: jsObject] = newValue } + } + + @inlinable var onscroll: EventHandler { + get { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] = newValue } + } + + @inlinable var onsecuritypolicyviolation: EventHandler { + get { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] = newValue } + } + + @inlinable var onseeked: EventHandler { + get { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] = newValue } + } + + @inlinable var onseeking: EventHandler { + get { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] = newValue } + } + + @inlinable var onselect: EventHandler { + get { ClosureAttribute1Optional[Strings.onselect, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onselect, in: jsObject] = newValue } + } + + @inlinable var onslotchange: EventHandler { + get { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] = newValue } + } + + @inlinable var onstalled: EventHandler { + get { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] = newValue } + } + + @inlinable var onsubmit: EventHandler { + get { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] = newValue } + } + + @inlinable var onsuspend: EventHandler { + get { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] = newValue } + } + + @inlinable var ontimeupdate: EventHandler { + get { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] = newValue } + } + + @inlinable var ontoggle: EventHandler { + get { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] = newValue } + } + + @inlinable var onvolumechange: EventHandler { + get { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] = newValue } + } + + @inlinable var onwaiting: EventHandler { + get { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationend: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationiteration: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationstart: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] = newValue } + } + + @inlinable var onwebkittransitionend: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] = newValue } + } + + @inlinable var onwheel: EventHandler { + get { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] = newValue } + } +} + +public class HTMLAllCollection: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLAllCollection].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element { + jsObject[key].fromJSValue()! + } + + @inlinable public subscript(key: String) -> Element_or_HTMLCollection? { + jsObject[key].fromJSValue() + } + + @inlinable public func item(nameOrIndex: String? = nil) -> Element_or_HTMLCollection? { + let this = jsObject + return this[Strings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class HTMLAnchorElement: HTMLElement, HTMLHyperlinkElementUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAnchorElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) + _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) + _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) + _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var download: String + + @ReadWriteAttribute + public var ping: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var hreflang: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var coords: String + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var rev: String + + @ReadWriteAttribute + public var shape: String +} + +public class HTMLAreaElement: HTMLElement, HTMLHyperlinkElementUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAreaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) + _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) + _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) + _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _noHref = ReadWriteAttribute(jsObject: jsObject, name: Strings.noHref) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var coords: String + + @ReadWriteAttribute + public var shape: String + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var download: String + + @ReadWriteAttribute + public var ping: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var noHref: Bool +} + +public class HTMLAudioElement: HTMLMediaElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAudioElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLBRElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBRElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _clear = ReadWriteAttribute(jsObject: jsObject, name: Strings.clear) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var clear: String +} + +public class HTMLBaseElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBaseElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var href: String + + @ReadWriteAttribute + public var target: String +} + +public class HTMLBodyElement: HTMLElement, WindowEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBodyElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _link = ReadWriteAttribute(jsObject: jsObject, name: Strings.link) + _vLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.vLink) + _aLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.aLink) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _background = ReadWriteAttribute(jsObject: jsObject, name: Strings.background) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var link: String + + @ReadWriteAttribute + public var vLink: String + + @ReadWriteAttribute + public var aLink: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var background: String +} + +public class HTMLButtonElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLButtonElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) + _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) + _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) + _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) + _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var formAction: String + + @ReadWriteAttribute + public var formEnctype: String + + @ReadWriteAttribute + public var formMethod: String + + @ReadWriteAttribute + public var formNoValidate: Bool + + @ReadWriteAttribute + public var formTarget: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLCanvasElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLCanvasElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @inlinable public func getContext(contextId: String, options: JSValue? = nil) -> RenderingContext? { + let this = jsObject + return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toDataURL(type: String? = nil, quality: JSValue? = nil) -> String { + let this = jsObject + return this[Strings.toDataURL].function!(this: this, arguments: [type?.jsValue ?? .undefined, quality?.jsValue ?? .undefined]).fromJSValue()! + } + + // XXX: member 'toBlob' is ignored + + @inlinable public func transferControlToOffscreen() -> OffscreenCanvas { + let this = jsObject + return this[Strings.transferControlToOffscreen].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLCollection: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLCollection].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Element? { + jsObject[key].fromJSValue() + } +} + +public class HTMLDListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLDataElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: String +} + +public class HTMLDataListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var options: HTMLCollection +} + +public class HTMLDetailsElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDetailsElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var open: Bool +} + +public class HTMLDialogElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDialogElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) + _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var open: Bool + + @ReadWriteAttribute + public var returnValue: String + + @inlinable public func show() { + let this = jsObject + _ = this[Strings.show].function!(this: this, arguments: []) + } + + @inlinable public func showModal() { + let this = jsObject + _ = this[Strings.showModal].function!(this: this, arguments: []) + } + + @inlinable public func close(returnValue: String? = nil) { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: [returnValue?.jsValue ?? .undefined]) + } +} + +public class HTMLDirectoryElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDirectoryElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLDivElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDivElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) + _lang = ReadWriteAttribute(jsObject: jsObject, name: Strings.lang) + _translate = ReadWriteAttribute(jsObject: jsObject, name: Strings.translate) + _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) + _hidden = ReadWriteAttribute(jsObject: jsObject, name: Strings.hidden) + _inert = ReadWriteAttribute(jsObject: jsObject, name: Strings.inert) + _accessKey = ReadWriteAttribute(jsObject: jsObject, name: Strings.accessKey) + _accessKeyLabel = ReadonlyAttribute(jsObject: jsObject, name: Strings.accessKeyLabel) + _draggable = ReadWriteAttribute(jsObject: jsObject, name: Strings.draggable) + _spellcheck = ReadWriteAttribute(jsObject: jsObject, name: Strings.spellcheck) + _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) + _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) + _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var title: String + + @ReadWriteAttribute + public var lang: String + + @ReadWriteAttribute + public var translate: Bool + + @ReadWriteAttribute + public var dir: String + + @ReadWriteAttribute + public var hidden: Bool + + @ReadWriteAttribute + public var inert: Bool + + @inlinable public func click() { + let this = jsObject + _ = this[Strings.click].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var accessKey: String + + @ReadonlyAttribute + public var accessKeyLabel: String + + @ReadWriteAttribute + public var draggable: Bool + + @ReadWriteAttribute + public var spellcheck: Bool + + @ReadWriteAttribute + public var autocapitalize: String + + @ReadWriteAttribute + public var innerText: String + + @ReadWriteAttribute + public var outerText: String + + @inlinable public func attachInternals() -> ElementInternals { + let this = jsObject + return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLEmbedElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLEmbedElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var name: String +} + +public class HTMLFieldSetElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFieldSetElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var elements: HTMLCollection + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } +} + +public class HTMLFontElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFontElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) + _face = ReadWriteAttribute(jsObject: jsObject, name: Strings.face) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var color: String + + @ReadWriteAttribute + public var face: String + + @ReadWriteAttribute + public var size: String +} + +public class HTMLFormControlsCollection: HTMLCollection { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormControlsCollection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public subscript(key: String) -> Element_or_RadioNodeList? { + jsObject[key].fromJSValue() + } +} + +public class HTMLFormElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _acceptCharset = ReadWriteAttribute(jsObject: jsObject, name: Strings.acceptCharset) + _action = ReadWriteAttribute(jsObject: jsObject, name: Strings.action) + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _enctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.enctype) + _encoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.encoding) + _method = ReadWriteAttribute(jsObject: jsObject, name: Strings.method) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _noValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.noValidate) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var acceptCharset: String + + @ReadWriteAttribute + public var action: String + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var enctype: String + + @ReadWriteAttribute + public var encoding: String + + @ReadWriteAttribute + public var method: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var noValidate: Bool + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadonlyAttribute + public var elements: HTMLFormControlsCollection + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element { + jsObject[key].fromJSValue()! + } + + @inlinable public subscript(key: String) -> Element_or_RadioNodeList { + jsObject[key].fromJSValue()! + } + + @inlinable public func submit() { + let this = jsObject + _ = this[Strings.submit].function!(this: this, arguments: []) + } + + @inlinable public func requestSubmit(submitter: HTMLElement? = nil) { + let this = jsObject + _ = this[Strings.requestSubmit].function!(this: this, arguments: [submitter?.jsValue ?? .undefined]) + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLFrameElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) + _noResize = ReadWriteAttribute(jsObject: jsObject, name: Strings.noResize) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) + _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) + _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var scrolling: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var frameBorder: String + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var noResize: Bool + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @ReadWriteAttribute + public var marginHeight: String + + @ReadWriteAttribute + public var marginWidth: String +} + +public class HTMLFrameSetElement: HTMLElement, WindowEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameSetElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) + _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cols: String + + @ReadWriteAttribute + public var rows: String +} + +public class HTMLHRElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHRElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) + _noShade = ReadWriteAttribute(jsObject: jsObject, name: Strings.noShade) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var color: String + + @ReadWriteAttribute + public var noShade: Bool + + @ReadWriteAttribute + public var size: String + + @ReadWriteAttribute + public var width: String +} + +public class HTMLHeadElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLHeadingElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadingElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLHtmlElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHtmlElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _version = ReadWriteAttribute(jsObject: jsObject, name: Strings.version) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var version: String +} + +public protocol HTMLHyperlinkElementUtils: JSBridgedClass {} +public extension HTMLHyperlinkElementUtils { + @inlinable var href: String { + get { ReadWriteAttribute[Strings.href, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.href, in: jsObject] = newValue } + } + + @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } + + @inlinable var `protocol`: String { + get { ReadWriteAttribute[Strings.protocol, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.protocol, in: jsObject] = newValue } + } + + @inlinable var username: String { + get { ReadWriteAttribute[Strings.username, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.username, in: jsObject] = newValue } + } + + @inlinable var password: String { + get { ReadWriteAttribute[Strings.password, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.password, in: jsObject] = newValue } + } + + @inlinable var host: String { + get { ReadWriteAttribute[Strings.host, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.host, in: jsObject] = newValue } + } + + @inlinable var hostname: String { + get { ReadWriteAttribute[Strings.hostname, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.hostname, in: jsObject] = newValue } + } + + @inlinable var port: String { + get { ReadWriteAttribute[Strings.port, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.port, in: jsObject] = newValue } + } + + @inlinable var pathname: String { + get { ReadWriteAttribute[Strings.pathname, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.pathname, in: jsObject] = newValue } + } + + @inlinable var search: String { + get { ReadWriteAttribute[Strings.search, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.search, in: jsObject] = newValue } + } + + @inlinable var hash: String { + get { ReadWriteAttribute[Strings.hash, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.hash, in: jsObject] = newValue } + } +} + +public class HTMLIFrameElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLIFrameElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _srcdoc = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcdoc) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _sandbox = ReadonlyAttribute(jsObject: jsObject, name: Strings.sandbox) + _allow = ReadWriteAttribute(jsObject: jsObject, name: Strings.allow) + _allowFullscreen = ReadWriteAttribute(jsObject: jsObject, name: Strings.allowFullscreen) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) + _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) + _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) + _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srcdoc: String + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var sandbox: DOMTokenList + + @ReadWriteAttribute + public var allow: String + + @ReadWriteAttribute + public var allowFullscreen: Bool + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var loading: String + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var scrolling: String + + @ReadWriteAttribute + public var frameBorder: String + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var marginHeight: String + + @ReadWriteAttribute + public var marginWidth: String +} + +public class HTMLImageElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLImageElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) + _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) + _isMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.isMap) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _naturalWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalWidth) + _naturalHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalHeight) + _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) + _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _decoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.decoding) + _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _lowsrc = ReadWriteAttribute(jsObject: jsObject, name: Strings.lowsrc) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) + _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srcset: String + + @ReadWriteAttribute + public var sizes: String + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var useMap: String + + @ReadWriteAttribute + public var isMap: Bool + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var naturalWidth: UInt32 + + @ReadonlyAttribute + public var naturalHeight: UInt32 + + @ReadonlyAttribute + public var complete: Bool + + @ReadonlyAttribute + public var currentSrc: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var decoding: String + + @ReadWriteAttribute + public var loading: String + + @inlinable public func decode() -> JSPromise { + let this = jsObject + return this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func decode() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var lowsrc: String + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var border: String +} + +public class HTMLInputElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLInputElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _accept = ReadWriteAttribute(jsObject: jsObject, name: Strings.accept) + _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _defaultChecked = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultChecked) + _checked = ReadWriteAttribute(jsObject: jsObject, name: Strings.checked) + _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _files = ReadWriteAttribute(jsObject: jsObject, name: Strings.files) + _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) + _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) + _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) + _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) + _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _indeterminate = ReadWriteAttribute(jsObject: jsObject, name: Strings.indeterminate) + _list = ReadonlyAttribute(jsObject: jsObject, name: Strings.list) + _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) + _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) + _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) + _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) + _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _pattern = ReadWriteAttribute(jsObject: jsObject, name: Strings.pattern) + _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) + _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) + _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _step = ReadWriteAttribute(jsObject: jsObject, name: Strings.step) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _valueAsDate = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsDate) + _valueAsNumber = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsNumber) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) + _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) + _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var accept: String + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var defaultChecked: Bool + + @ReadWriteAttribute + public var checked: Bool + + @ReadWriteAttribute + public var dirName: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var files: FileList? + + @ReadWriteAttribute + public var formAction: String + + @ReadWriteAttribute + public var formEnctype: String + + @ReadWriteAttribute + public var formMethod: String + + @ReadWriteAttribute + public var formNoValidate: Bool + + @ReadWriteAttribute + public var formTarget: String + + @ReadWriteAttribute + public var height: UInt32 + + @ReadWriteAttribute + public var indeterminate: Bool + + @ReadonlyAttribute + public var list: HTMLElement? + + @ReadWriteAttribute + public var max: String + + @ReadWriteAttribute + public var maxLength: Int32 + + @ReadWriteAttribute + public var min: String + + @ReadWriteAttribute + public var minLength: Int32 + + @ReadWriteAttribute + public var multiple: Bool + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var pattern: String + + @ReadWriteAttribute + public var placeholder: String + + @ReadWriteAttribute + public var readOnly: Bool + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var size: UInt32 + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var step: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var valueAsDate: JSObject? + + @ReadWriteAttribute + public var valueAsNumber: Double + + @ReadWriteAttribute + public var width: UInt32 + + @inlinable public func stepUp(n: Int32? = nil) { + let this = jsObject + _ = this[Strings.stepUp].function!(this: this, arguments: [n?.jsValue ?? .undefined]) + } + + @inlinable public func stepDown(n: Int32? = nil) { + let this = jsObject + _ = this[Strings.stepDown].function!(this: this, arguments: [n?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList? + + @inlinable public func select() { + let this = jsObject + _ = this[Strings.select].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var selectionStart: UInt32? + + @ReadWriteAttribute + public var selectionEnd: UInt32? + + @ReadWriteAttribute + public var selectionDirection: String? + + @inlinable public func setRangeText(replacement: String) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) + } + + @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) + } + + @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { + let this = jsObject + _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) + } + + @inlinable public func showPicker() { + let this = jsObject + _ = this[Strings.showPicker].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var useMap: String +} + +public class HTMLLIElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLIElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Int32 + + @ReadWriteAttribute + public var type: String +} + +public class HTMLLabelElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLabelElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) + _control = ReadonlyAttribute(jsObject: jsObject, name: Strings.control) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var htmlFor: String + + @ReadonlyAttribute + public var control: HTMLElement? +} + +public class HTMLLegendElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLegendElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var align: String +} + +public class HTMLLinkElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLinkElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _as = ReadWriteAttribute(jsObject: jsObject, name: Strings.as) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) + _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _sizes = ReadonlyAttribute(jsObject: jsObject, name: Strings.sizes) + _imageSrcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSrcset) + _imageSizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSizes) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) + _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var href: String + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var rel: String + + @ReadWriteAttribute + public var `as`: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var hreflang: String + + @ReadWriteAttribute + public var type: String + + @ReadonlyAttribute + public var sizes: DOMTokenList + + @ReadWriteAttribute + public var imageSrcset: String + + @ReadWriteAttribute + public var imageSizes: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @ReadWriteAttribute + public var disabled: Bool + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var rev: String + + @ReadWriteAttribute + public var target: String +} + +public class HTMLMapElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMapElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _areas = ReadonlyAttribute(jsObject: jsObject, name: Strings.areas) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var areas: HTMLCollection +} + +public class HTMLMarqueeElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMarqueeElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _behavior = ReadWriteAttribute(jsObject: jsObject, name: Strings.behavior) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _direction = ReadWriteAttribute(jsObject: jsObject, name: Strings.direction) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) + _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) + _scrollAmount = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollAmount) + _scrollDelay = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollDelay) + _trueSpeed = ReadWriteAttribute(jsObject: jsObject, name: Strings.trueSpeed) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var behavior: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var direction: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var loop: Int32 + + @ReadWriteAttribute + public var scrollAmount: UInt32 + + @ReadWriteAttribute + public var scrollDelay: UInt32 + + @ReadWriteAttribute + public var trueSpeed: Bool + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var width: String + + @inlinable public func start() { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: []) + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } +} + +public class HTMLMediaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMediaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _networkState = ReadonlyAttribute(jsObject: jsObject, name: Strings.networkState) + _preload = ReadWriteAttribute(jsObject: jsObject, name: Strings.preload) + _buffered = ReadonlyAttribute(jsObject: jsObject, name: Strings.buffered) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _seeking = ReadonlyAttribute(jsObject: jsObject, name: Strings.seeking) + _currentTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentTime) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _paused = ReadonlyAttribute(jsObject: jsObject, name: Strings.paused) + _defaultPlaybackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultPlaybackRate) + _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) + _preservesPitch = ReadWriteAttribute(jsObject: jsObject, name: Strings.preservesPitch) + _played = ReadonlyAttribute(jsObject: jsObject, name: Strings.played) + _seekable = ReadonlyAttribute(jsObject: jsObject, name: Strings.seekable) + _ended = ReadonlyAttribute(jsObject: jsObject, name: Strings.ended) + _autoplay = ReadWriteAttribute(jsObject: jsObject, name: Strings.autoplay) + _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) + _controls = ReadWriteAttribute(jsObject: jsObject, name: Strings.controls) + _volume = ReadWriteAttribute(jsObject: jsObject, name: Strings.volume) + _muted = ReadWriteAttribute(jsObject: jsObject, name: Strings.muted) + _defaultMuted = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultMuted) + _audioTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioTracks) + _videoTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoTracks) + _textTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.textTracks) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var error: MediaError? + + @ReadWriteAttribute + public var src: String + + // XXX: member 'srcObject' is ignored + + @ReadonlyAttribute + public var currentSrc: String + + @ReadWriteAttribute + public var crossOrigin: String? + + public static let NETWORK_EMPTY: UInt16 = 0 + + public static let NETWORK_IDLE: UInt16 = 1 + + public static let NETWORK_LOADING: UInt16 = 2 + + public static let NETWORK_NO_SOURCE: UInt16 = 3 + + @ReadonlyAttribute + public var networkState: UInt16 + + @ReadWriteAttribute + public var preload: String + + @ReadonlyAttribute + public var buffered: TimeRanges + + @inlinable public func load() { + let this = jsObject + _ = this[Strings.load].function!(this: this, arguments: []) + } + + @inlinable public func canPlayType(type: String) -> CanPlayTypeResult { + let this = jsObject + return this[Strings.canPlayType].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + public static let HAVE_NOTHING: UInt16 = 0 + + public static let HAVE_METADATA: UInt16 = 1 + + public static let HAVE_CURRENT_DATA: UInt16 = 2 + + public static let HAVE_FUTURE_DATA: UInt16 = 3 + + public static let HAVE_ENOUGH_DATA: UInt16 = 4 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var seeking: Bool + + @ReadWriteAttribute + public var currentTime: Double + + @inlinable public func fastSeek(time: Double) { + let this = jsObject + _ = this[Strings.fastSeek].function!(this: this, arguments: [time.jsValue]) + } + + @ReadonlyAttribute + public var duration: Double + + @inlinable public func getStartDate() -> JSObject { + let this = jsObject + return this[Strings.getStartDate].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var paused: Bool + + @ReadWriteAttribute + public var defaultPlaybackRate: Double + + @ReadWriteAttribute + public var playbackRate: Double + + @ReadWriteAttribute + public var preservesPitch: Bool + + @ReadonlyAttribute + public var played: TimeRanges + + @ReadonlyAttribute + public var seekable: TimeRanges + + @ReadonlyAttribute + public var ended: Bool + + @ReadWriteAttribute + public var autoplay: Bool + + @ReadWriteAttribute + public var loop: Bool + + @inlinable public func play() -> JSPromise { + let this = jsObject + return this[Strings.play].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func play() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.play].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var controls: Bool + + @ReadWriteAttribute + public var volume: Double + + @ReadWriteAttribute + public var muted: Bool + + @ReadWriteAttribute + public var defaultMuted: Bool + + @ReadonlyAttribute + public var audioTracks: AudioTrackList + + @ReadonlyAttribute + public var videoTracks: VideoTrackList + + @ReadonlyAttribute + public var textTracks: TextTrackList + + @inlinable public func addTextTrack(kind: TextTrackKind, label: String? = nil, language: String? = nil) -> TextTrack { + let this = jsObject + return this[Strings.addTextTrack].function!(this: this, arguments: [kind.jsValue, label?.jsValue ?? .undefined, language?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class HTMLMenuElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMenuElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLMetaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMetaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _httpEquiv = ReadWriteAttribute(jsObject: jsObject, name: Strings.httpEquiv) + _content = ReadWriteAttribute(jsObject: jsObject, name: Strings.content) + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _scheme = ReadWriteAttribute(jsObject: jsObject, name: Strings.scheme) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var httpEquiv: String + + @ReadWriteAttribute + public var content: String + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var scheme: String +} + +public class HTMLMeterElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMeterElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) + _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) + _low = ReadWriteAttribute(jsObject: jsObject, name: Strings.low) + _high = ReadWriteAttribute(jsObject: jsObject, name: Strings.high) + _optimum = ReadWriteAttribute(jsObject: jsObject, name: Strings.optimum) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Double + + @ReadWriteAttribute + public var min: Double + + @ReadWriteAttribute + public var max: Double + + @ReadWriteAttribute + public var low: Double + + @ReadWriteAttribute + public var high: Double + + @ReadWriteAttribute + public var optimum: Double + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLModElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLModElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) + _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cite: String + + @ReadWriteAttribute + public var dateTime: String +} + +public class HTMLOListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _reversed = ReadWriteAttribute(jsObject: jsObject, name: Strings.reversed) + _start = ReadWriteAttribute(jsObject: jsObject, name: Strings.start) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var reversed: Bool + + @ReadWriteAttribute + public var start: Int32 + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLObjectElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLObjectElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _archive = ReadWriteAttribute(jsObject: jsObject, name: Strings.archive) + _code = ReadWriteAttribute(jsObject: jsObject, name: Strings.code) + _declare = ReadWriteAttribute(jsObject: jsObject, name: Strings.declare) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) + _standby = ReadWriteAttribute(jsObject: jsObject, name: Strings.standby) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) + _codeBase = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeBase) + _codeType = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeType) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) + _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var data: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var archive: String + + @ReadWriteAttribute + public var code: String + + @ReadWriteAttribute + public var declare: Bool + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var standby: String + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var codeBase: String + + @ReadWriteAttribute + public var codeType: String + + @ReadWriteAttribute + public var useMap: String + + @ReadWriteAttribute + public var border: String +} + +public class HTMLOptGroupElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptGroupElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadWriteAttribute + public var label: String +} + +public class HTMLOptionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) + _defaultSelected = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultSelected) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _index = ReadonlyAttribute(jsObject: jsObject, name: Strings.index) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var label: String + + @ReadWriteAttribute + public var defaultSelected: Bool + + @ReadWriteAttribute + public var selected: Bool + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var text: String + + @ReadonlyAttribute + public var index: Int32 +} + +public class HTMLOptionsCollection: HTMLCollection { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionsCollection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) + super.init(unsafelyWrapping: jsObject) + } + + @usableFromInline let _length: ReadWriteAttribute + @inlinable override public var length: UInt32 { + get { _length.wrappedValue } + set { _length.wrappedValue = newValue } + } + + // XXX: unsupported setter for keys of type UInt32 + + @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { + let this = jsObject + _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) + } + + @inlinable public func remove(index: Int32) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var selectedIndex: Int32 +} + +public protocol HTMLOrSVGElement: JSBridgedClass {} +public extension HTMLOrSVGElement { + @inlinable var dataset: DOMStringMap { ReadonlyAttribute[Strings.dataset, in: jsObject] } + + @inlinable var nonce: String { + get { ReadWriteAttribute[Strings.nonce, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.nonce, in: jsObject] = newValue } + } + + @inlinable var autofocus: Bool { + get { ReadWriteAttribute[Strings.autofocus, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.autofocus, in: jsObject] = newValue } + } + + @inlinable var tabIndex: Int32 { + get { ReadWriteAttribute[Strings.tabIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.tabIndex, in: jsObject] = newValue } + } + + @inlinable func focus(options: FocusOptions? = nil) { + let this = jsObject + _ = this[Strings.focus].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable func blur() { + let this = jsObject + _ = this[Strings.blur].function!(this: this, arguments: []) + } +} + +public class HTMLOutputElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOutputElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _htmlFor = ReadonlyAttribute(jsObject: jsObject, name: Strings.htmlFor) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var htmlFor: DOMTokenList + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLParagraphElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParagraphElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLParamElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParamElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _valueType = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueType) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var valueType: String +} + +public class HTMLPictureElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPictureElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLPreElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPreElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: Int32 +} + +public class HTMLProgressElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLProgressElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) + _position = ReadonlyAttribute(jsObject: jsObject, name: Strings.position) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Double + + @ReadWriteAttribute + public var max: Double + + @ReadonlyAttribute + public var position: Double + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLQuoteElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLQuoteElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cite: String +} + +public class HTMLScriptElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLScriptElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _noModule = ReadWriteAttribute(jsObject: jsObject, name: Strings.noModule) + _async = ReadWriteAttribute(jsObject: jsObject, name: Strings.async) + _defer = ReadWriteAttribute(jsObject: jsObject, name: Strings.defer) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) + _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) + _event = ReadWriteAttribute(jsObject: jsObject, name: Strings.event) + _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var noModule: Bool + + @ReadWriteAttribute + public var async: Bool + + @ReadWriteAttribute + public var `defer`: Bool + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @inlinable public static func supports(type: String) -> Bool { + let this = constructor + return this[Strings.supports].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var event: String + + @ReadWriteAttribute + public var htmlFor: String +} + +public class HTMLSelectElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSelectElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) + _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) + _selectedOptions = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedOptions) + _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var multiple: Bool + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var size: UInt32 + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var options: HTMLOptionsCollection + + @ReadWriteAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> HTMLOptionElement? { + jsObject[key].fromJSValue() + } + + @inlinable public func namedItem(name: String) -> HTMLOptionElement? { + let this = jsObject + return this[Strings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { + let this = jsObject + _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) + } + + @inlinable public func remove() { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: []) + } + + @inlinable public func remove(index: Int32) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) + } + + // XXX: unsupported setter for keys of type UInt32 + + @ReadonlyAttribute + public var selectedOptions: HTMLCollection + + @ReadWriteAttribute + public var selectedIndex: Int32 + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLSlotElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSlotElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @inlinable public func assignedNodes(options: AssignedNodesOptions? = nil) -> [Node] { + let this = jsObject + return this[Strings.assignedNodes].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func assignedElements(options: AssignedNodesOptions? = nil) -> [Element] { + let this = jsObject + return this[Strings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func assign(nodes: Element_or_Text...) { + let this = jsObject + _ = this[Strings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) + } +} + +public class HTMLSourceElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSourceElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) + _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var srcset: String + + @ReadWriteAttribute + public var sizes: String + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 +} + +public class HTMLSpanElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSpanElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLStyleElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLStyleElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var media: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @ReadWriteAttribute + public var type: String +} + +public class HTMLTableCaptionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCaptionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLTableCellElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCellElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _colSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.colSpan) + _rowSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.rowSpan) + _headers = ReadWriteAttribute(jsObject: jsObject, name: Strings.headers) + _cellIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.cellIndex) + _scope = ReadWriteAttribute(jsObject: jsObject, name: Strings.scope) + _abbr = ReadWriteAttribute(jsObject: jsObject, name: Strings.abbr) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _axis = ReadWriteAttribute(jsObject: jsObject, name: Strings.axis) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _noWrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.noWrap) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var colSpan: UInt32 + + @ReadWriteAttribute + public var rowSpan: UInt32 + + @ReadWriteAttribute + public var headers: String + + @ReadonlyAttribute + public var cellIndex: Int32 + + @ReadWriteAttribute + public var scope: String + + @ReadWriteAttribute + public var abbr: String + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var axis: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var noWrap: Bool + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var bgColor: String +} + +public class HTMLTableColElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableColElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _span = ReadWriteAttribute(jsObject: jsObject, name: Strings.span) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var span: UInt32 + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var width: String +} + +public class HTMLTableElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _caption = ReadWriteAttribute(jsObject: jsObject, name: Strings.caption) + _tHead = ReadWriteAttribute(jsObject: jsObject, name: Strings.tHead) + _tFoot = ReadWriteAttribute(jsObject: jsObject, name: Strings.tFoot) + _tBodies = ReadonlyAttribute(jsObject: jsObject, name: Strings.tBodies) + _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + _frame = ReadWriteAttribute(jsObject: jsObject, name: Strings.frame) + _rules = ReadWriteAttribute(jsObject: jsObject, name: Strings.rules) + _summary = ReadWriteAttribute(jsObject: jsObject, name: Strings.summary) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _cellPadding = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellPadding) + _cellSpacing = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellSpacing) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var caption: HTMLTableCaptionElement? + + @inlinable public func createCaption() -> HTMLTableCaptionElement { + let this = jsObject + return this[Strings.createCaption].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteCaption() { + let this = jsObject + _ = this[Strings.deleteCaption].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var tHead: HTMLTableSectionElement? + + @inlinable public func createTHead() -> HTMLTableSectionElement { + let this = jsObject + return this[Strings.createTHead].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteTHead() { + let this = jsObject + _ = this[Strings.deleteTHead].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var tFoot: HTMLTableSectionElement? + + @inlinable public func createTFoot() -> HTMLTableSectionElement { + let this = jsObject + return this[Strings.createTFoot].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteTFoot() { + let this = jsObject + _ = this[Strings.deleteTFoot].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var tBodies: HTMLCollection + + @inlinable public func createTBody() -> HTMLTableSectionElement { + let this = jsObject + return this[Strings.createTBody].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var rows: HTMLCollection + + @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { + let this = jsObject + return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteRow(index: Int32) { + let this = jsObject + _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var border: String + + @ReadWriteAttribute + public var frame: String + + @ReadWriteAttribute + public var rules: String + + @ReadWriteAttribute + public var summary: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var cellPadding: String + + @ReadWriteAttribute + public var cellSpacing: String +} + +public class HTMLTableRowElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableRowElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _rowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.rowIndex) + _sectionRowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.sectionRowIndex) + _cells = ReadonlyAttribute(jsObject: jsObject, name: Strings.cells) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var rowIndex: Int32 + + @ReadonlyAttribute + public var sectionRowIndex: Int32 + + @ReadonlyAttribute + public var cells: HTMLCollection + + @inlinable public func insertCell(index: Int32? = nil) -> HTMLTableCellElement { + let this = jsObject + return this[Strings.insertCell].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteCell(index: Int32) { + let this = jsObject + _ = this[Strings.deleteCell].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var bgColor: String +} + +public class HTMLTableSectionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableSectionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var rows: HTMLCollection + + @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { + let this = jsObject + return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteRow(index: Int32) { + let this = jsObject + _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String +} + +public class HTMLTemplateElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTemplateElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _content = ReadonlyAttribute(jsObject: jsObject, name: Strings.content) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var content: DocumentFragment +} + +public class HTMLTextAreaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTextAreaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) + _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) + _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) + _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) + _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) + _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) + _wrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.wrap) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _textLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.textLength) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) + _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) + _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var cols: UInt32 + + @ReadWriteAttribute + public var dirName: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var maxLength: Int32 + + @ReadWriteAttribute + public var minLength: Int32 + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var placeholder: String + + @ReadWriteAttribute + public var readOnly: Bool + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var rows: UInt32 + + @ReadWriteAttribute + public var wrap: String + + @ReadonlyAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var textLength: UInt32 + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList + + @inlinable public func select() { + let this = jsObject + _ = this[Strings.select].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var selectionStart: UInt32 + + @ReadWriteAttribute + public var selectionEnd: UInt32 + + @ReadWriteAttribute + public var selectionDirection: String + + @inlinable public func setRangeText(replacement: String) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) + } + + @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) + } + + @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { + let this = jsObject + _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) + } +} + +public class HTMLTimeElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTimeElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var dateTime: String +} + +public class HTMLTitleElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTitleElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var text: String +} + +public class HTMLTrackElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTrackElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadWriteAttribute(jsObject: jsObject, name: Strings.kind) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _srclang = ReadWriteAttribute(jsObject: jsObject, name: Strings.srclang) + _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) + _default = ReadWriteAttribute(jsObject: jsObject, name: Strings.default) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var kind: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srclang: String + + @ReadWriteAttribute + public var label: String + + @ReadWriteAttribute + public var `default`: Bool + + public static let NONE: UInt16 = 0 + + public static let LOADING: UInt16 = 1 + + public static let LOADED: UInt16 = 2 + + public static let ERROR: UInt16 = 3 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var track: TextTrack +} + +public class HTMLUListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool + + @ReadWriteAttribute + public var type: String +} + +public class HTMLUnknownElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUnknownElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class HTMLVideoElement: HTMLMediaElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLVideoElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _videoWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoWidth) + _videoHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoHeight) + _poster = ReadWriteAttribute(jsObject: jsObject, name: Strings.poster) + _playsInline = ReadWriteAttribute(jsObject: jsObject, name: Strings.playsInline) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var videoWidth: UInt32 + + @ReadonlyAttribute + public var videoHeight: UInt32 + + @ReadWriteAttribute + public var poster: String + + @ReadWriteAttribute + public var playsInline: Bool +} + +public class HashChangeEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HashChangeEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _oldURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldURL) + _newURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.newURL) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: HashChangeEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var oldURL: String + + @ReadonlyAttribute + public var newURL: String +} + +public class HashChangeEventInit: BridgedDictionary { + public convenience init(oldURL: String, newURL: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.oldURL] = oldURL.jsValue + object[Strings.newURL] = newURL.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _oldURL = ReadWriteAttribute(jsObject: object, name: Strings.oldURL) + _newURL = ReadWriteAttribute(jsObject: object, name: Strings.newURL) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var oldURL: String + + @ReadWriteAttribute + public var newURL: String +} + +public class Headers: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Headers].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: HeadersInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class History: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.History].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _scrollRestoration = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollRestoration) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @ReadWriteAttribute + public var scrollRestoration: ScrollRestoration + + @ReadonlyAttribute + public var state: JSValue + + @inlinable public func go(delta: Int32? = nil) { + let this = jsObject + _ = this[Strings.go].function!(this: this, arguments: [delta?.jsValue ?? .undefined]) + } + + @inlinable public func back() { + let this = jsObject + _ = this[Strings.back].function!(this: this, arguments: []) + } + + @inlinable public func forward() { + let this = jsObject + _ = this[Strings.forward].function!(this: this, arguments: []) + } + + @inlinable public func pushState(data: JSValue, unused: String, url: String? = nil) { + let this = jsObject + _ = this[Strings.pushState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) + } + + @inlinable public func replaceState(data: JSValue, unused: String, url: String? = nil) { + let this = jsObject + _ = this[Strings.replaceState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) + } +} + +public class ImageBitmap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var width: UInt32 + + @ReadonlyAttribute + public var height: UInt32 + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} + +public class ImageBitmapOptions: BridgedDictionary { + public convenience init(imageOrientation: ImageOrientation, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, resizeWidth: UInt32, resizeHeight: UInt32, resizeQuality: ResizeQuality) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.imageOrientation] = imageOrientation.jsValue + object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue + object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue + object[Strings.resizeWidth] = resizeWidth.jsValue + object[Strings.resizeHeight] = resizeHeight.jsValue + object[Strings.resizeQuality] = resizeQuality.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _imageOrientation = ReadWriteAttribute(jsObject: object, name: Strings.imageOrientation) + _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) + _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) + _resizeWidth = ReadWriteAttribute(jsObject: object, name: Strings.resizeWidth) + _resizeHeight = ReadWriteAttribute(jsObject: object, name: Strings.resizeHeight) + _resizeQuality = ReadWriteAttribute(jsObject: object, name: Strings.resizeQuality) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var imageOrientation: ImageOrientation + + @ReadWriteAttribute + public var premultiplyAlpha: PremultiplyAlpha + + @ReadWriteAttribute + public var colorSpaceConversion: ColorSpaceConversion + + @ReadWriteAttribute + public var resizeWidth: UInt32 + + @ReadWriteAttribute + public var resizeHeight: UInt32 + + @ReadWriteAttribute + public var resizeQuality: ResizeQuality +} + +public class ImageBitmapRenderingContext: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmapRenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: HTMLCanvasElement_or_OffscreenCanvas + + @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { + let this = jsObject + _ = this[Strings.transferFromImageBitmap].function!(this: this, arguments: [bitmap.jsValue]) + } +} + +public class ImageBitmapRenderingContextSettings: BridgedDictionary { + public convenience init(alpha: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool +} + +public class ImageData: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) + self.jsObject = jsObject + } + + @inlinable public convenience init(sw: UInt32, sh: UInt32, settings: ImageDataSettings? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(data: Uint8ClampedArray, sw: UInt32, sh: UInt32? = nil, settings: ImageDataSettings? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, sw.jsValue, sh?.jsValue ?? .undefined, settings?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var width: UInt32 + + @ReadonlyAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var data: Uint8ClampedArray + + @ReadonlyAttribute + public var colorSpace: PredefinedColorSpace +} + +public class ImageDataSettings: BridgedDictionary { + public convenience init(colorSpace: PredefinedColorSpace) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace +} + +public class ImageEncodeOptions: BridgedDictionary { + public convenience init(type: String, quality: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.quality] = quality.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _quality = ReadWriteAttribute(jsObject: object, name: Strings.quality) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var quality: Double +} + +public enum ImageOrientation: JSString, JSValueCompatible { + case none = "none" + case flipY = "flipY" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ImageSmoothingQuality: JSString, JSValueCompatible { + case low = "low" + case medium = "medium" + case high = "high" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class InputEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) + _inputType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputType) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: InputEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: String? + + @ReadonlyAttribute + public var isComposing: Bool + + @ReadonlyAttribute + public var inputType: String +} + +public class InputEventInit: BridgedDictionary { + public convenience init(data: String?, isComposing: Bool, inputType: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.isComposing] = isComposing.jsValue + object[Strings.inputType] = inputType.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) + _inputType = ReadWriteAttribute(jsObject: object, name: Strings.inputType) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: String? + + @ReadWriteAttribute + public var isComposing: Bool + + @ReadWriteAttribute + public var inputType: String +} + +public class KeyboardEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) + _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) + _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) + _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) + _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) + _repeat = ReadonlyAttribute(jsObject: jsObject, name: Strings.repeat) + _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) + _charCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.charCode) + _keyCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.keyCode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: KeyboardEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + public static let DOM_KEY_LOCATION_STANDARD: UInt32 = 0x00 + + public static let DOM_KEY_LOCATION_LEFT: UInt32 = 0x01 + + public static let DOM_KEY_LOCATION_RIGHT: UInt32 = 0x02 + + public static let DOM_KEY_LOCATION_NUMPAD: UInt32 = 0x03 + + @ReadonlyAttribute + public var key: String + + @ReadonlyAttribute + public var code: String + + @ReadonlyAttribute + public var location: UInt32 + + @ReadonlyAttribute + public var ctrlKey: Bool + + @ReadonlyAttribute + public var shiftKey: Bool + + @ReadonlyAttribute + public var altKey: Bool + + @ReadonlyAttribute + public var metaKey: Bool + + @ReadonlyAttribute + public var `repeat`: Bool + + @ReadonlyAttribute + public var isComposing: Bool + + @inlinable public func getModifierState(keyArg: String) -> Bool { + let this = jsObject + return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! + } + + @inlinable public func initKeyboardEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, keyArg: String? = nil, locationArg: UInt32? = nil, ctrlKey: Bool? = nil, altKey: Bool? = nil, shiftKey: Bool? = nil, metaKey: Bool? = nil) { + let _arg0 = typeArg.jsValue + let _arg1 = bubblesArg?.jsValue ?? .undefined + let _arg2 = cancelableArg?.jsValue ?? .undefined + let _arg3 = viewArg?.jsValue ?? .undefined + let _arg4 = keyArg?.jsValue ?? .undefined + let _arg5 = locationArg?.jsValue ?? .undefined + let _arg6 = ctrlKey?.jsValue ?? .undefined + let _arg7 = altKey?.jsValue ?? .undefined + let _arg8 = shiftKey?.jsValue ?? .undefined + let _arg9 = metaKey?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initKeyboardEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @ReadonlyAttribute + public var charCode: UInt32 + + @ReadonlyAttribute + public var keyCode: UInt32 +} + +public class KeyboardEventInit: BridgedDictionary { + public convenience init(key: String, code: String, location: UInt32, repeat: Bool, isComposing: Bool, charCode: UInt32, keyCode: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.key] = key.jsValue + object[Strings.code] = code.jsValue + object[Strings.location] = location.jsValue + object[Strings.repeat] = `repeat`.jsValue + object[Strings.isComposing] = isComposing.jsValue + object[Strings.charCode] = charCode.jsValue + object[Strings.keyCode] = keyCode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _key = ReadWriteAttribute(jsObject: object, name: Strings.key) + _code = ReadWriteAttribute(jsObject: object, name: Strings.code) + _location = ReadWriteAttribute(jsObject: object, name: Strings.location) + _repeat = ReadWriteAttribute(jsObject: object, name: Strings.repeat) + _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) + _charCode = ReadWriteAttribute(jsObject: object, name: Strings.charCode) + _keyCode = ReadWriteAttribute(jsObject: object, name: Strings.keyCode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var key: String + + @ReadWriteAttribute + public var code: String + + @ReadWriteAttribute + public var location: UInt32 + + @ReadWriteAttribute + public var `repeat`: Bool + + @ReadWriteAttribute + public var isComposing: Bool + + @ReadWriteAttribute + public var charCode: UInt32 + + @ReadWriteAttribute + public var keyCode: UInt32 +} + +public class KeyframeAnimationOptions: BridgedDictionary { + public convenience init(id: String, timeline: AnimationTimeline?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.id] = id.jsValue + object[Strings.timeline] = timeline.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _id = ReadWriteAttribute(jsObject: object, name: Strings.id) + _timeline = ReadWriteAttribute(jsObject: object, name: Strings.timeline) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var timeline: AnimationTimeline? +} + +public class KeyframeEffect: AnimationEffect { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyframeEffect].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _pseudoElement = ReadWriteAttribute(jsObject: jsObject, name: Strings.pseudoElement) + _composite = ReadWriteAttribute(jsObject: jsObject, name: Strings.composite) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(target: Element?, keyframes: JSObject?, options: Double_or_KeyframeEffectOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [target.jsValue, keyframes.jsValue, options?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(source: KeyframeEffect) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [source.jsValue])) + } + + @ReadWriteAttribute + public var target: Element? + + @ReadWriteAttribute + public var pseudoElement: String? + + @ReadWriteAttribute + public var composite: CompositeOperation + + @inlinable public func getKeyframes() -> [JSObject] { + let this = jsObject + return this[Strings.getKeyframes].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setKeyframes(keyframes: JSObject?) { + let this = jsObject + _ = this[Strings.setKeyframes].function!(this: this, arguments: [keyframes.jsValue]) + } +} + +public class KeyframeEffectOptions: BridgedDictionary { + public convenience init(composite: CompositeOperation, pseudoElement: String?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.composite] = composite.jsValue + object[Strings.pseudoElement] = pseudoElement.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + _pseudoElement = ReadWriteAttribute(jsObject: object, name: Strings.pseudoElement) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var composite: CompositeOperation + + @ReadWriteAttribute + public var pseudoElement: String? +} + +public class Location: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Location].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) + _ancestorOrigins = ReadonlyAttribute(jsObject: jsObject, name: Strings.ancestorOrigins) + self.jsObject = jsObject + } + + @ReadWriteAttribute + public var href: String + + @ReadonlyAttribute + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String + + @ReadWriteAttribute + public var hash: String + + @inlinable public func assign(url: String) { + let this = jsObject + _ = this[Strings.assign].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public func replace(url: String) { + let this = jsObject + _ = this[Strings.replace].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public func reload() { + let this = jsObject + _ = this[Strings.reload].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var ancestorOrigins: DOMStringList +} + +public class MediaError: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaError].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + self.jsObject = jsObject + } + + public static let MEDIA_ERR_ABORTED: UInt16 = 1 + + public static let MEDIA_ERR_NETWORK: UInt16 = 2 + + public static let MEDIA_ERR_DECODE: UInt16 = 3 + + public static let MEDIA_ERR_SRC_NOT_SUPPORTED: UInt16 = 4 + + @ReadonlyAttribute + public var code: UInt16 + + @ReadonlyAttribute + public var message: String +} + +public class MessageChannel: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MessageChannel].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _port1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port1) + _port2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port2) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var port1: MessagePort + + @ReadonlyAttribute + public var port2: MessagePort +} + +public class MessageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastEventId) + _source = ReadonlyAttribute(jsObject: jsObject, name: Strings.source) + _ports = ReadonlyAttribute(jsObject: jsObject, name: Strings.ports) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: JSValue + + @ReadonlyAttribute + public var origin: String + + @ReadonlyAttribute + public var lastEventId: String + + @ReadonlyAttribute + public var source: MessageEventSource? + + @ReadonlyAttribute + public var ports: [MessagePort] + + @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = data?.jsValue ?? .undefined + let _arg4 = origin?.jsValue ?? .undefined + let _arg5 = lastEventId?.jsValue ?? .undefined + let _arg6 = source?.jsValue ?? .undefined + let _arg7 = ports?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class MessageEventInit: BridgedDictionary { + public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.origin] = origin.jsValue + object[Strings.lastEventId] = lastEventId.jsValue + object[Strings.source] = source.jsValue + object[Strings.ports] = ports.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) + _lastEventId = ReadWriteAttribute(jsObject: object, name: Strings.lastEventId) + _source = ReadWriteAttribute(jsObject: object, name: Strings.source) + _ports = ReadWriteAttribute(jsObject: object, name: Strings.ports) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: JSValue + + @ReadWriteAttribute + public var origin: String + + @ReadWriteAttribute + public var lastEventId: String + + @ReadWriteAttribute + public var source: MessageEventSource? + + @ReadWriteAttribute + public var ports: [MessagePort] +} + +public class MessagePort: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessagePort].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func start() { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class MimeType: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeType].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) + _suffixes = ReadonlyAttribute(jsObject: jsObject, name: Strings.suffixes) + _enabledPlugin = ReadonlyAttribute(jsObject: jsObject, name: Strings.enabledPlugin) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var description: String + + @ReadonlyAttribute + public var suffixes: String + + @ReadonlyAttribute + public var enabledPlugin: Plugin +} + +public class MimeTypeArray: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeTypeArray].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> MimeType? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> MimeType? { + jsObject[key].fromJSValue() + } +} + +public class MouseEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MouseEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) + _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) + _clientX = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientX) + _clientY = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientY) + _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) + _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) + _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) + _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) + _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) + _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) + _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MouseEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var screenX: Int32 + + @ReadonlyAttribute + public var screenY: Int32 + + @ReadonlyAttribute + public var clientX: Int32 + + @ReadonlyAttribute + public var clientY: Int32 + + @ReadonlyAttribute + public var ctrlKey: Bool + + @ReadonlyAttribute + public var shiftKey: Bool + + @ReadonlyAttribute + public var altKey: Bool + + @ReadonlyAttribute + public var metaKey: Bool + + @ReadonlyAttribute + public var button: Int16 + + @ReadonlyAttribute + public var buttons: UInt16 + + @ReadonlyAttribute + public var relatedTarget: EventTarget? + + @inlinable public func getModifierState(keyArg: String) -> Bool { + let this = jsObject + return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! + } + + @inlinable public func initMouseEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil, screenXArg: Int32? = nil, screenYArg: Int32? = nil, clientXArg: Int32? = nil, clientYArg: Int32? = nil, ctrlKeyArg: Bool? = nil, altKeyArg: Bool? = nil, shiftKeyArg: Bool? = nil, metaKeyArg: Bool? = nil, buttonArg: Int16? = nil, relatedTargetArg: EventTarget? = nil) { + let _arg0 = typeArg.jsValue + let _arg1 = bubblesArg?.jsValue ?? .undefined + let _arg2 = cancelableArg?.jsValue ?? .undefined + let _arg3 = viewArg?.jsValue ?? .undefined + let _arg4 = detailArg?.jsValue ?? .undefined + let _arg5 = screenXArg?.jsValue ?? .undefined + let _arg6 = screenYArg?.jsValue ?? .undefined + let _arg7 = clientXArg?.jsValue ?? .undefined + let _arg8 = clientYArg?.jsValue ?? .undefined + let _arg9 = ctrlKeyArg?.jsValue ?? .undefined + let _arg10 = altKeyArg?.jsValue ?? .undefined + let _arg11 = shiftKeyArg?.jsValue ?? .undefined + let _arg12 = metaKeyArg?.jsValue ?? .undefined + let _arg13 = buttonArg?.jsValue ?? .undefined + let _arg14 = relatedTargetArg?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) + } +} + +public class MouseEventInit: BridgedDictionary { + public convenience init(screenX: Int32, screenY: Int32, clientX: Int32, clientY: Int32, button: Int16, buttons: UInt16, relatedTarget: EventTarget?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.screenX] = screenX.jsValue + object[Strings.screenY] = screenY.jsValue + object[Strings.clientX] = clientX.jsValue + object[Strings.clientY] = clientY.jsValue + object[Strings.button] = button.jsValue + object[Strings.buttons] = buttons.jsValue + object[Strings.relatedTarget] = relatedTarget.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _screenX = ReadWriteAttribute(jsObject: object, name: Strings.screenX) + _screenY = ReadWriteAttribute(jsObject: object, name: Strings.screenY) + _clientX = ReadWriteAttribute(jsObject: object, name: Strings.clientX) + _clientY = ReadWriteAttribute(jsObject: object, name: Strings.clientY) + _button = ReadWriteAttribute(jsObject: object, name: Strings.button) + _buttons = ReadWriteAttribute(jsObject: object, name: Strings.buttons) + _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var screenX: Int32 + + @ReadWriteAttribute + public var screenY: Int32 + + @ReadWriteAttribute + public var clientX: Int32 + + @ReadWriteAttribute + public var clientY: Int32 + + @ReadWriteAttribute + public var button: Int16 + + @ReadWriteAttribute + public var buttons: UInt16 + + @ReadWriteAttribute + public var relatedTarget: EventTarget? +} + +public class MultiCacheQueryOptions: BridgedDictionary { + public convenience init(cacheName: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.cacheName] = cacheName.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _cacheName = ReadWriteAttribute(jsObject: object, name: Strings.cacheName) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var cacheName: String +} + +public class MutationEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MutationEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _relatedNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedNode) + _prevValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.prevValue) + _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) + _attrName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrName) + _attrChange = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrChange) + super.init(unsafelyWrapping: jsObject) + } + + public static let MODIFICATION: UInt16 = 1 + + public static let ADDITION: UInt16 = 2 + + public static let REMOVAL: UInt16 = 3 + + @ReadonlyAttribute + public var relatedNode: Node? + + @ReadonlyAttribute + public var prevValue: String + + @ReadonlyAttribute + public var newValue: String + + @ReadonlyAttribute + public var attrName: String + + @ReadonlyAttribute + public var attrChange: UInt16 + + @inlinable public func initMutationEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, relatedNodeArg: Node? = nil, prevValueArg: String? = nil, newValueArg: String? = nil, attrNameArg: String? = nil, attrChangeArg: UInt16? = nil) { + let _arg0 = typeArg.jsValue + let _arg1 = bubblesArg?.jsValue ?? .undefined + let _arg2 = cancelableArg?.jsValue ?? .undefined + let _arg3 = relatedNodeArg?.jsValue ?? .undefined + let _arg4 = prevValueArg?.jsValue ?? .undefined + let _arg5 = newValueArg?.jsValue ?? .undefined + let _arg6 = attrNameArg?.jsValue ?? .undefined + let _arg7 = attrChangeArg?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMutationEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class MutationObserver: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationObserver].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + // XXX: constructor is ignored + + @inlinable public func observe(target: Node, options: MutationObserverInit? = nil) { + let this = jsObject + _ = this[Strings.observe].function!(this: this, arguments: [target.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func disconnect() { + let this = jsObject + _ = this[Strings.disconnect].function!(this: this, arguments: []) + } + + @inlinable public func takeRecords() -> [MutationRecord] { + let this = jsObject + return this[Strings.takeRecords].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class MutationObserverInit: BridgedDictionary { + public convenience init(childList: Bool, attributes: Bool, characterData: Bool, subtree: Bool, attributeOldValue: Bool, characterDataOldValue: Bool, attributeFilter: [String]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.childList] = childList.jsValue + object[Strings.attributes] = attributes.jsValue + object[Strings.characterData] = characterData.jsValue + object[Strings.subtree] = subtree.jsValue + object[Strings.attributeOldValue] = attributeOldValue.jsValue + object[Strings.characterDataOldValue] = characterDataOldValue.jsValue + object[Strings.attributeFilter] = attributeFilter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _childList = ReadWriteAttribute(jsObject: object, name: Strings.childList) + _attributes = ReadWriteAttribute(jsObject: object, name: Strings.attributes) + _characterData = ReadWriteAttribute(jsObject: object, name: Strings.characterData) + _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) + _attributeOldValue = ReadWriteAttribute(jsObject: object, name: Strings.attributeOldValue) + _characterDataOldValue = ReadWriteAttribute(jsObject: object, name: Strings.characterDataOldValue) + _attributeFilter = ReadWriteAttribute(jsObject: object, name: Strings.attributeFilter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var childList: Bool + + @ReadWriteAttribute + public var attributes: Bool + + @ReadWriteAttribute + public var characterData: Bool + + @ReadWriteAttribute + public var subtree: Bool + + @ReadWriteAttribute + public var attributeOldValue: Bool + + @ReadWriteAttribute + public var characterDataOldValue: Bool + + @ReadWriteAttribute + public var attributeFilter: [String] +} + +public class MutationRecord: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationRecord].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) + _addedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.addedNodes) + _removedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.removedNodes) + _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) + _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) + _attributeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeName) + _attributeNamespace = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeNamespace) + _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var target: Node + + @ReadonlyAttribute + public var addedNodes: NodeList + + @ReadonlyAttribute + public var removedNodes: NodeList + + @ReadonlyAttribute + public var previousSibling: Node? + + @ReadonlyAttribute + public var nextSibling: Node? + + @ReadonlyAttribute + public var attributeName: String? + + @ReadonlyAttribute + public var attributeNamespace: String? + + @ReadonlyAttribute + public var oldValue: String? +} + +public class NamedNodeMap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NamedNodeMap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Attr? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Attr? { + jsObject[key].fromJSValue() + } + + @inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? { + let this = jsObject + return this[Strings.getNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setNamedItem(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setNamedItem].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func setNamedItemNS(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setNamedItemNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func removeNamedItem(qualifiedName: String) -> Attr { + let this = jsObject + return this[Strings.removeNamedItem].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func removeNamedItemNS(namespace: String?, localName: String) -> Attr { + let this = jsObject + return this[Strings.removeNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } +} + +public class NavigationPreloadManager: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NavigationPreloadManager].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func enable() -> JSPromise { + let this = jsObject + return this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func enable() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func disable() -> JSPromise { + let this = jsObject + return this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func disable() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func setHeaderValue(value: String) -> JSPromise { + let this = jsObject + return this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func setHeaderValue(value: String) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getState() -> JSPromise { + let this = jsObject + return this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getState() async throws -> NavigationPreloadState { + let this = jsObject + let _promise: JSPromise = this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class NavigationPreloadState: BridgedDictionary { + public convenience init(enabled: Bool, headerValue: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.enabled] = enabled.jsValue + object[Strings.headerValue] = headerValue.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _enabled = ReadWriteAttribute(jsObject: object, name: Strings.enabled) + _headerValue = ReadWriteAttribute(jsObject: object, name: Strings.headerValue) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var enabled: Bool + + @ReadWriteAttribute + public var headerValue: String +} + +public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Navigator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _serviceWorker = ReadonlyAttribute(jsObject: jsObject, name: Strings.serviceWorker) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var serviceWorker: ServiceWorkerContainer +} + +public protocol NavigatorConcurrentHardware: JSBridgedClass {} +public extension NavigatorConcurrentHardware { + @inlinable var hardwareConcurrency: UInt64 { ReadonlyAttribute[Strings.hardwareConcurrency, in: jsObject] } +} + +public protocol NavigatorContentUtils: JSBridgedClass {} +public extension NavigatorContentUtils { + @inlinable func registerProtocolHandler(scheme: String, url: String) { + let this = jsObject + _ = this[Strings.registerProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) + } + + @inlinable func unregisterProtocolHandler(scheme: String, url: String) { + let this = jsObject + _ = this[Strings.unregisterProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) + } +} + +public protocol NavigatorCookies: JSBridgedClass {} +public extension NavigatorCookies { + @inlinable var cookieEnabled: Bool { ReadonlyAttribute[Strings.cookieEnabled, in: jsObject] } +} + +public protocol NavigatorID: JSBridgedClass {} +public extension NavigatorID { + @inlinable var appCodeName: String { ReadonlyAttribute[Strings.appCodeName, in: jsObject] } + + @inlinable var appName: String { ReadonlyAttribute[Strings.appName, in: jsObject] } + + @inlinable var appVersion: String { ReadonlyAttribute[Strings.appVersion, in: jsObject] } + + @inlinable var platform: String { ReadonlyAttribute[Strings.platform, in: jsObject] } + + @inlinable var product: String { ReadonlyAttribute[Strings.product, in: jsObject] } + + @inlinable var productSub: String { ReadonlyAttribute[Strings.productSub, in: jsObject] } + + @inlinable var userAgent: String { ReadonlyAttribute[Strings.userAgent, in: jsObject] } + + @inlinable var vendor: String { ReadonlyAttribute[Strings.vendor, in: jsObject] } + + @inlinable var vendorSub: String { ReadonlyAttribute[Strings.vendorSub, in: jsObject] } + + @inlinable func taintEnabled() -> Bool { + let this = jsObject + return this[Strings.taintEnabled].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var oscpu: String { ReadonlyAttribute[Strings.oscpu, in: jsObject] } +} + +public protocol NavigatorLanguage: JSBridgedClass {} +public extension NavigatorLanguage { + @inlinable var language: String { ReadonlyAttribute[Strings.language, in: jsObject] } + + @inlinable var languages: [String] { ReadonlyAttribute[Strings.languages, in: jsObject] } +} + +public protocol NavigatorOnLine: JSBridgedClass {} +public extension NavigatorOnLine { + @inlinable var onLine: Bool { ReadonlyAttribute[Strings.onLine, in: jsObject] } +} + +public protocol NavigatorPlugins: JSBridgedClass {} +public extension NavigatorPlugins { + @inlinable var plugins: PluginArray { ReadonlyAttribute[Strings.plugins, in: jsObject] } + + @inlinable var mimeTypes: MimeTypeArray { ReadonlyAttribute[Strings.mimeTypes, in: jsObject] } + + @inlinable func javaEnabled() -> Bool { + let this = jsObject + return this[Strings.javaEnabled].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var pdfViewerEnabled: Bool { ReadonlyAttribute[Strings.pdfViewerEnabled, in: jsObject] } +} + +public class Node: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Node].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _nodeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeType) + _nodeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeName) + _baseURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.baseURI) + _isConnected = ReadonlyAttribute(jsObject: jsObject, name: Strings.isConnected) + _ownerDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerDocument) + _parentNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentNode) + _parentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentElement) + _childNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.childNodes) + _firstChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.firstChild) + _lastChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastChild) + _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) + _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) + _nodeValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.nodeValue) + _textContent = ReadWriteAttribute(jsObject: jsObject, name: Strings.textContent) + super.init(unsafelyWrapping: jsObject) + } + + public static let ELEMENT_NODE: UInt16 = 1 + + public static let ATTRIBUTE_NODE: UInt16 = 2 + + public static let TEXT_NODE: UInt16 = 3 + + public static let CDATA_SECTION_NODE: UInt16 = 4 + + public static let ENTITY_REFERENCE_NODE: UInt16 = 5 + + public static let ENTITY_NODE: UInt16 = 6 + + public static let PROCESSING_INSTRUCTION_NODE: UInt16 = 7 + + public static let COMMENT_NODE: UInt16 = 8 + + public static let DOCUMENT_NODE: UInt16 = 9 + + public static let DOCUMENT_TYPE_NODE: UInt16 = 10 + + public static let DOCUMENT_FRAGMENT_NODE: UInt16 = 11 + + public static let NOTATION_NODE: UInt16 = 12 + + @ReadonlyAttribute + public var nodeType: UInt16 + + @ReadonlyAttribute + public var nodeName: String + + @ReadonlyAttribute + public var baseURI: String + + @ReadonlyAttribute + public var isConnected: Bool + + @ReadonlyAttribute + public var ownerDocument: Document? + + @inlinable public func getRootNode(options: GetRootNodeOptions? = nil) -> Self { + let this = jsObject + return this[Strings.getRootNode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var parentNode: Node? + + @ReadonlyAttribute + public var parentElement: Element? + + @inlinable public func hasChildNodes() -> Bool { + let this = jsObject + return this[Strings.hasChildNodes].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var childNodes: NodeList + + @ReadonlyAttribute + public var firstChild: Node? + + @ReadonlyAttribute + public var lastChild: Node? + + @ReadonlyAttribute + public var previousSibling: Node? + + @ReadonlyAttribute + public var nextSibling: Node? + + @ReadWriteAttribute + public var nodeValue: String? + + @ReadWriteAttribute + public var textContent: String? + + @inlinable public func normalize() { + let this = jsObject + _ = this[Strings.normalize].function!(this: this, arguments: []) + } + + @inlinable public func cloneNode(deep: Bool? = nil) -> Self { + let this = jsObject + return this[Strings.cloneNode].function!(this: this, arguments: [deep?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func isEqualNode(otherNode: Node?) -> Bool { + let this = jsObject + return this[Strings.isEqualNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! + } + + @inlinable public func isSameNode(otherNode: Node?) -> Bool { + let this = jsObject + return this[Strings.isSameNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! + } + + public static let DOCUMENT_POSITION_DISCONNECTED: UInt16 = 0x01 + + public static let DOCUMENT_POSITION_PRECEDING: UInt16 = 0x02 + + public static let DOCUMENT_POSITION_FOLLOWING: UInt16 = 0x04 + + public static let DOCUMENT_POSITION_CONTAINS: UInt16 = 0x08 + + public static let DOCUMENT_POSITION_CONTAINED_BY: UInt16 = 0x10 + + public static let DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: UInt16 = 0x20 + + @inlinable public func compareDocumentPosition(other: Node) -> UInt16 { + let this = jsObject + return this[Strings.compareDocumentPosition].function!(this: this, arguments: [other.jsValue]).fromJSValue()! + } + + @inlinable public func contains(other: Node?) -> Bool { + let this = jsObject + return this[Strings.contains].function!(this: this, arguments: [other.jsValue]).fromJSValue()! + } + + @inlinable public func lookupPrefix(namespace: String?) -> String? { + let this = jsObject + return this[Strings.lookupPrefix].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! + } + + @inlinable public func lookupNamespaceURI(prefix: String?) -> String? { + let this = jsObject + return this[Strings.lookupNamespaceURI].function!(this: this, arguments: [prefix.jsValue]).fromJSValue()! + } + + @inlinable public func isDefaultNamespace(namespace: String?) -> Bool { + let this = jsObject + return this[Strings.isDefaultNamespace].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! + } + + @inlinable public func insertBefore(node: Node, child: Node?) -> Self { + let this = jsObject + return this[Strings.insertBefore].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! + } + + @inlinable public func appendChild(node: Node) -> Self { + let this = jsObject + return this[Strings.appendChild].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public func replaceChild(node: Node, child: Node) -> Self { + let this = jsObject + return this[Strings.replaceChild].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! + } + + @inlinable public func removeChild(child: Node) -> Self { + let this = jsObject + return this[Strings.removeChild].function!(this: this, arguments: [child.jsValue]).fromJSValue()! + } +} + +public class NodeIterator: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeIterator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) + _referenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.referenceNode) + _pointerBeforeReferenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.pointerBeforeReferenceNode) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var root: Node + + @ReadonlyAttribute + public var referenceNode: Node + + @ReadonlyAttribute + public var pointerBeforeReferenceNode: Bool + + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func detach() { + let this = jsObject + _ = this[Strings.detach].function!(this: this, arguments: []) + } +} + +public class NodeList: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> Node? { + jsObject[key].fromJSValue() + } + + @ReadonlyAttribute + public var length: UInt32 + + public typealias Element = Node + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public protocol NonDocumentTypeChildNode: JSBridgedClass {} +public extension NonDocumentTypeChildNode { + @inlinable var previousElementSibling: Element? { ReadonlyAttribute[Strings.previousElementSibling, in: jsObject] } + + @inlinable var nextElementSibling: Element? { ReadonlyAttribute[Strings.nextElementSibling, in: jsObject] } +} + +public protocol NonElementParentNode: JSBridgedClass {} +public extension NonElementParentNode { + @inlinable func getElementById(elementId: String) -> Element? { + let this = jsObject + return this[Strings.getElementById].function!(this: this, arguments: [elementId.jsValue]).fromJSValue()! + } +} + +public class OffscreenCanvas: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvas].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _oncontextlost = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextlost) + _oncontextrestored = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextrestored) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(width: UInt64, height: UInt64) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [width.jsValue, height.jsValue])) + } + + @ReadWriteAttribute + public var width: UInt64 + + @ReadWriteAttribute + public var height: UInt64 + + @inlinable public func getContext(contextId: OffscreenRenderingContextId, options: JSValue? = nil) -> OffscreenRenderingContext? { + let this = jsObject + return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func transferToImageBitmap() -> ImageBitmap { + let this = jsObject + return this[Strings.transferToImageBitmap].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob { + let this = jsObject + let _promise: JSPromise = this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ClosureAttribute1Optional + public var oncontextlost: EventHandler + + @ClosureAttribute1Optional + public var oncontextrestored: EventHandler +} + +public class OffscreenCanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvasRenderingContext2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @inlinable public func commit() { + let this = jsObject + _ = this[Strings.commit].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var canvas: OffscreenCanvas +} + +public enum OffscreenRenderingContextId: JSString, JSValueCompatible { + case _2d = "2d" + case bitmaprenderer = "bitmaprenderer" + case webgl = "webgl" + case webgl2 = "webgl2" + case webgpu = "webgpu" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class OptionalEffectTiming: BridgedDictionary { + public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, duration: Double_or_String, direction: PlaybackDirection, easing: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.delay] = delay.jsValue + object[Strings.endDelay] = endDelay.jsValue + object[Strings.fill] = fill.jsValue + object[Strings.iterationStart] = iterationStart.jsValue + object[Strings.iterations] = iterations.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.direction] = direction.jsValue + object[Strings.easing] = easing.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) + _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) + _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) + _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) + _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var delay: Double + + @ReadWriteAttribute + public var endDelay: Double + + @ReadWriteAttribute + public var fill: FillMode + + @ReadWriteAttribute + public var iterationStart: Double + + @ReadWriteAttribute + public var iterations: Double + + @ReadWriteAttribute + public var duration: Double_or_String + + @ReadWriteAttribute + public var direction: PlaybackDirection + + @ReadWriteAttribute + public var easing: String +} + +public class PageTransitionEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PageTransitionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _persisted = ReadonlyAttribute(jsObject: jsObject, name: Strings.persisted) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PageTransitionEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var persisted: Bool +} + +public class PageTransitionEventInit: BridgedDictionary { + public convenience init(persisted: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.persisted] = persisted.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _persisted = ReadWriteAttribute(jsObject: object, name: Strings.persisted) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var persisted: Bool +} + +public protocol ParentNode: JSBridgedClass {} +public extension ParentNode { + @inlinable var children: HTMLCollection { ReadonlyAttribute[Strings.children, in: jsObject] } + + @inlinable var firstElementChild: Element? { ReadonlyAttribute[Strings.firstElementChild, in: jsObject] } + + @inlinable var lastElementChild: Element? { ReadonlyAttribute[Strings.lastElementChild, in: jsObject] } + + @inlinable var childElementCount: UInt32 { ReadonlyAttribute[Strings.childElementCount, in: jsObject] } + + @inlinable func prepend(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func append(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceChildren(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func querySelector(selectors: String) -> Element? { + let this = jsObject + return this[Strings.querySelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable func querySelectorAll(selectors: String) -> NodeList { + let this = jsObject + return this[Strings.querySelectorAll].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } +} + +public class Path2D: JSBridgedClass, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Path2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(path: Path2D_or_String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) + } + + @inlinable public func addPath(path: Path2D, transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.addPath].function!(this: this, arguments: [path.jsValue, transform?.jsValue ?? .undefined]) + } +} + +public class Performance: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Performance].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _timeOrigin = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeOrigin) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func now() -> DOMHighResTimeStamp { + let this = jsObject + return this[Strings.now].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var timeOrigin: DOMHighResTimeStamp + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public enum PlaybackDirection: JSString, JSValueCompatible { + case normal = "normal" + case reverse = "reverse" + case alternate = "alternate" + case alternateReverse = "alternate-reverse" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Plugin: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Plugin].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) + _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var description: String + + @ReadonlyAttribute + public var filename: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> MimeType? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> MimeType? { + jsObject[key].fromJSValue() + } +} + +public class PluginArray: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.PluginArray].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public func refresh() { + let this = jsObject + _ = this[Strings.refresh].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Plugin? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Plugin? { + jsObject[key].fromJSValue() + } +} + +public class PopStateEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PopStateEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PopStateEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var state: JSValue +} + +public class PopStateEventInit: BridgedDictionary { + public convenience init(state: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.state] = state.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _state = ReadWriteAttribute(jsObject: object, name: Strings.state) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var state: JSValue +} + +public enum PredefinedColorSpace: JSString, JSValueCompatible { + case srgb = "srgb" + case displayP3 = "display-p3" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum PremultiplyAlpha: JSString, JSValueCompatible { + case none = "none" + case premultiply = "premultiply" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ProcessingInstruction: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProcessingInstruction].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var target: String +} + +public class ProgressEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProgressEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _lengthComputable = ReadonlyAttribute(jsObject: jsObject, name: Strings.lengthComputable) + _loaded = ReadonlyAttribute(jsObject: jsObject, name: Strings.loaded) + _total = ReadonlyAttribute(jsObject: jsObject, name: Strings.total) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: ProgressEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var lengthComputable: Bool + + @ReadonlyAttribute + public var loaded: UInt64 + + @ReadonlyAttribute + public var total: UInt64 +} + +public class ProgressEventInit: BridgedDictionary { + public convenience init(lengthComputable: Bool, loaded: UInt64, total: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.lengthComputable] = lengthComputable.jsValue + object[Strings.loaded] = loaded.jsValue + object[Strings.total] = total.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _lengthComputable = ReadWriteAttribute(jsObject: object, name: Strings.lengthComputable) + _loaded = ReadWriteAttribute(jsObject: object, name: Strings.loaded) + _total = ReadWriteAttribute(jsObject: object, name: Strings.total) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var lengthComputable: Bool + + @ReadWriteAttribute + public var loaded: UInt64 + + @ReadWriteAttribute + public var total: UInt64 +} + +public class PromiseRejectionEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PromiseRejectionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _promise = ReadonlyAttribute(jsObject: jsObject, name: Strings.promise) + _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PromiseRejectionEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var promise: JSPromise + + @ReadonlyAttribute + public var reason: JSValue +} + +public class PromiseRejectionEventInit: BridgedDictionary { + public convenience init(promise: JSPromise, reason: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.promise] = promise.jsValue + object[Strings.reason] = reason.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _promise = ReadWriteAttribute(jsObject: object, name: Strings.promise) + _reason = ReadWriteAttribute(jsObject: object, name: Strings.reason) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var promise: JSPromise + + @ReadWriteAttribute + public var reason: JSValue +} + +public class QueuingStrategy: BridgedDictionary { + public convenience init(highWaterMark: Double, size: @escaping QueuingStrategySize) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.highWaterMark] = highWaterMark.jsValue + ClosureAttribute1[Strings.size, in: object] = size + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) + _size = ClosureAttribute1(jsObject: object, name: Strings.size) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var highWaterMark: Double + + @ClosureAttribute1 + public var size: QueuingStrategySize +} + +public class QueuingStrategyInit: BridgedDictionary { + public convenience init(highWaterMark: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.highWaterMark] = highWaterMark.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var highWaterMark: Double +} + +public class RadioNodeList: NodeList { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.RadioNodeList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var value: String +} + +public class Range: AbstractRange { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Range].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _commonAncestorContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.commonAncestorContainer) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var commonAncestorContainer: Node + + @inlinable public func setStart(node: Node, offset: UInt32) { + let this = jsObject + _ = this[Strings.setStart].function!(this: this, arguments: [node.jsValue, offset.jsValue]) + } + + @inlinable public func setEnd(node: Node, offset: UInt32) { + let this = jsObject + _ = this[Strings.setEnd].function!(this: this, arguments: [node.jsValue, offset.jsValue]) + } + + @inlinable public func setStartBefore(node: Node) { + let this = jsObject + _ = this[Strings.setStartBefore].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setStartAfter(node: Node) { + let this = jsObject + _ = this[Strings.setStartAfter].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setEndBefore(node: Node) { + let this = jsObject + _ = this[Strings.setEndBefore].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setEndAfter(node: Node) { + let this = jsObject + _ = this[Strings.setEndAfter].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func collapse(toStart: Bool? = nil) { + let this = jsObject + _ = this[Strings.collapse].function!(this: this, arguments: [toStart?.jsValue ?? .undefined]) + } + + @inlinable public func selectNode(node: Node) { + let this = jsObject + _ = this[Strings.selectNode].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func selectNodeContents(node: Node) { + let this = jsObject + _ = this[Strings.selectNodeContents].function!(this: this, arguments: [node.jsValue]) + } + + public static let START_TO_START: UInt16 = 0 + + public static let START_TO_END: UInt16 = 1 + + public static let END_TO_END: UInt16 = 2 + + public static let END_TO_START: UInt16 = 3 + + @inlinable public func compareBoundaryPoints(how: UInt16, sourceRange: Range) -> Int16 { + let this = jsObject + return this[Strings.compareBoundaryPoints].function!(this: this, arguments: [how.jsValue, sourceRange.jsValue]).fromJSValue()! + } + + @inlinable public func deleteContents() { + let this = jsObject + _ = this[Strings.deleteContents].function!(this: this, arguments: []) + } + + @inlinable public func extractContents() -> DocumentFragment { + let this = jsObject + return this[Strings.extractContents].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func cloneContents() -> DocumentFragment { + let this = jsObject + return this[Strings.cloneContents].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func insertNode(node: Node) { + let this = jsObject + _ = this[Strings.insertNode].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func surroundContents(newParent: Node) { + let this = jsObject + _ = this[Strings.surroundContents].function!(this: this, arguments: [newParent.jsValue]) + } + + @inlinable public func cloneRange() -> Self { + let this = jsObject + return this[Strings.cloneRange].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func detach() { + let this = jsObject + _ = this[Strings.detach].function!(this: this, arguments: []) + } + + @inlinable public func isPointInRange(node: Node, offset: UInt32) -> Bool { + let this = jsObject + return this[Strings.isPointInRange].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! + } + + @inlinable public func comparePoint(node: Node, offset: UInt32) -> Int16 { + let this = jsObject + return this[Strings.comparePoint].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! + } + + @inlinable public func intersectsNode(node: Node) -> Bool { + let this = jsObject + return this[Strings.intersectsNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } +} + +public class ReadableByteStreamController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableByteStreamController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _byobRequest = ReadonlyAttribute(jsObject: jsObject, name: Strings.byobRequest) + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var byobRequest: ReadableStreamBYOBRequest? + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public func enqueue(chunk: ArrayBufferView) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func error(e: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) + } +} + +public class ReadableStream: JSBridgedClass, AsyncSequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) + self.jsObject = jsObject + } + + @inlinable public convenience init(underlyingSource: JSObject? = nil, strategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSource?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var locked: Bool + + @inlinable public func cancel(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func cancel(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getReader(options: ReadableStreamGetReaderOptions? = nil) -> ReadableStreamReader { + let this = jsObject + return this[Strings.getReader].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func pipeThrough(transform: ReadableWritablePair, options: StreamPipeOptions? = nil) -> Self { + let this = jsObject + return this[Strings.pipeThrough].function!(this: this, arguments: [transform.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func tee() -> [ReadableStream] { + let this = jsObject + return this[Strings.tee].function!(this: this, arguments: []).fromJSValue()! + } + + public typealias Element = JSValue + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + public func makeAsyncIterator() -> ValueIterableAsyncIterator { + ValueIterableAsyncIterator(sequence: self) + } +} + +public class ReadableStreamBYOBReadResult: BridgedDictionary { + public convenience init(value: ArrayBufferView?, done: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.value] = value.jsValue + object[Strings.done] = done.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _value = ReadWriteAttribute(jsObject: object, name: Strings.value) + _done = ReadWriteAttribute(jsObject: object, name: Strings.done) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var value: ArrayBufferView? + + @ReadWriteAttribute + public var done: Bool +} + +public class ReadableStreamBYOBReader: JSBridgedClass, ReadableStreamGenericReader { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBReader].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(stream: ReadableStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public func read(view: ArrayBufferView) -> JSPromise { + let this = jsObject + return this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func read(view: ArrayBufferView) async throws -> ReadableStreamBYOBReadResult { + let this = jsObject + let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func releaseLock() { + let this = jsObject + _ = this[Strings.releaseLock].function!(this: this, arguments: []) + } +} + +public class ReadableStreamBYOBRequest: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBRequest].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var view: ArrayBufferView? + + @inlinable public func respond(bytesWritten: UInt64) { + let this = jsObject + _ = this[Strings.respond].function!(this: this, arguments: [bytesWritten.jsValue]) + } + + @inlinable public func respondWithNewView(view: ArrayBufferView) { + let this = jsObject + _ = this[Strings.respondWithNewView].function!(this: this, arguments: [view.jsValue]) + } +} + +public class ReadableStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public func enqueue(chunk: JSValue? = nil) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) + } + + @inlinable public func error(e: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) + } +} + +public class ReadableStreamDefaultReadResult: BridgedDictionary { + public convenience init(value: JSValue, done: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.value] = value.jsValue + object[Strings.done] = done.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _value = ReadWriteAttribute(jsObject: object, name: Strings.value) + _done = ReadWriteAttribute(jsObject: object, name: Strings.done) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var value: JSValue + + @ReadWriteAttribute + public var done: Bool +} + +public class ReadableStreamDefaultReader: JSBridgedClass, ReadableStreamGenericReader { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultReader].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(stream: ReadableStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public func read() -> JSPromise { + let this = jsObject + return this[Strings.read].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func read() async throws -> ReadableStreamDefaultReadResult { + let this = jsObject + let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func releaseLock() { + let this = jsObject + _ = this[Strings.releaseLock].function!(this: this, arguments: []) + } +} + +public protocol ReadableStreamGenericReader: JSBridgedClass {} +public extension ReadableStreamGenericReader { + @inlinable var closed: JSPromise { ReadonlyAttribute[Strings.closed, in: jsObject] } + + @inlinable func cancel(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func cancel(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class ReadableStreamGetReaderOptions: BridgedDictionary { + public convenience init(mode: ReadableStreamReaderMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mode] = mode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mode: ReadableStreamReaderMode +} + +public class ReadableStreamIteratorOptions: BridgedDictionary { + public convenience init(preventCancel: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.preventCancel] = preventCancel.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventCancel: Bool +} + +public enum ReadableStreamReaderMode: JSString, JSValueCompatible { + case byob = "byob" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ReadableStreamType: JSString, JSValueCompatible { + case bytes = "bytes" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ReadableWritablePair: BridgedDictionary { + public convenience init(readable: ReadableStream, writable: WritableStream) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.readable] = readable.jsValue + object[Strings.writable] = writable.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _readable = ReadWriteAttribute(jsObject: object, name: Strings.readable) + _writable = ReadWriteAttribute(jsObject: object, name: Strings.writable) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var readable: ReadableStream + + @ReadWriteAttribute + public var writable: WritableStream +} + +public enum ReferrerPolicy: JSString, JSValueCompatible { + case _empty = "" + case noReferrer = "no-referrer" + case noReferrerWhenDowngrade = "no-referrer-when-downgrade" + case sameOrigin = "same-origin" + case origin = "origin" + case strictOrigin = "strict-origin" + case originWhenCrossOrigin = "origin-when-cross-origin" + case strictOriginWhenCrossOrigin = "strict-origin-when-cross-origin" + case unsafeUrl = "unsafe-url" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class RegistrationOptions: BridgedDictionary { + public convenience init(scope: String, type: WorkerType, updateViaCache: ServiceWorkerUpdateViaCache) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.scope] = scope.jsValue + object[Strings.type] = type.jsValue + object[Strings.updateViaCache] = updateViaCache.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _scope = ReadWriteAttribute(jsObject: object, name: Strings.scope) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _updateViaCache = ReadWriteAttribute(jsObject: object, name: Strings.updateViaCache) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var scope: String + + @ReadWriteAttribute + public var type: WorkerType + + @ReadWriteAttribute + public var updateViaCache: ServiceWorkerUpdateViaCache +} + +public class Request: JSBridgedClass, Body { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Request].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _method = ReadonlyAttribute(jsObject: jsObject, name: Strings.method) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) + _destination = ReadonlyAttribute(jsObject: jsObject, name: Strings.destination) + _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) + _referrerPolicy = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) + _credentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.credentials) + _cache = ReadonlyAttribute(jsObject: jsObject, name: Strings.cache) + _redirect = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirect) + _integrity = ReadonlyAttribute(jsObject: jsObject, name: Strings.integrity) + _keepalive = ReadonlyAttribute(jsObject: jsObject, name: Strings.keepalive) + _isReloadNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isReloadNavigation) + _isHistoryNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isHistoryNavigation) + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject + } + + @inlinable public convenience init(input: RequestInfo, init: RequestInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [input.jsValue, `init`?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var method: String + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var headers: Headers + + @ReadonlyAttribute + public var destination: RequestDestination + + @ReadonlyAttribute + public var referrer: String + + @ReadonlyAttribute + public var referrerPolicy: ReferrerPolicy + + @ReadonlyAttribute + public var mode: RequestMode + + @ReadonlyAttribute + public var credentials: RequestCredentials + + @ReadonlyAttribute + public var cache: RequestCache + + @ReadonlyAttribute + public var redirect: RequestRedirect + + @ReadonlyAttribute + public var integrity: String + + @ReadonlyAttribute + public var keepalive: Bool + + @ReadonlyAttribute + public var isReloadNavigation: Bool + + @ReadonlyAttribute + public var isHistoryNavigation: Bool + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } +} + +public enum RequestCache: JSString, JSValueCompatible { + case `default` = "default" + case noStore = "no-store" + case reload = "reload" + case noCache = "no-cache" + case forceCache = "force-cache" + case onlyIfCached = "only-if-cached" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestCredentials: JSString, JSValueCompatible { + case omit = "omit" + case sameOrigin = "same-origin" + case include = "include" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestDestination: JSString, JSValueCompatible { + case _empty = "" + case audio = "audio" + case audioworklet = "audioworklet" + case document = "document" + case embed = "embed" + case font = "font" + case frame = "frame" + case iframe = "iframe" + case image = "image" + case manifest = "manifest" + case object = "object" + case paintworklet = "paintworklet" + case report = "report" + case script = "script" + case sharedworker = "sharedworker" + case style = "style" + case track = "track" + case video = "video" + case worker = "worker" + case xslt = "xslt" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class RequestInit: BridgedDictionary { + public convenience init(method: String, headers: HeadersInit, body: BodyInit?, referrer: String, referrerPolicy: ReferrerPolicy, mode: RequestMode, credentials: RequestCredentials, cache: RequestCache, redirect: RequestRedirect, integrity: String, keepalive: Bool, signal: AbortSignal?, window: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.method] = method.jsValue + object[Strings.headers] = headers.jsValue + object[Strings.body] = body.jsValue + object[Strings.referrer] = referrer.jsValue + object[Strings.referrerPolicy] = referrerPolicy.jsValue + object[Strings.mode] = mode.jsValue + object[Strings.credentials] = credentials.jsValue + object[Strings.cache] = cache.jsValue + object[Strings.redirect] = redirect.jsValue + object[Strings.integrity] = integrity.jsValue + object[Strings.keepalive] = keepalive.jsValue + object[Strings.signal] = signal.jsValue + object[Strings.window] = window.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _method = ReadWriteAttribute(jsObject: object, name: Strings.method) + _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) + _body = ReadWriteAttribute(jsObject: object, name: Strings.body) + _referrer = ReadWriteAttribute(jsObject: object, name: Strings.referrer) + _referrerPolicy = ReadWriteAttribute(jsObject: object, name: Strings.referrerPolicy) + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + _cache = ReadWriteAttribute(jsObject: object, name: Strings.cache) + _redirect = ReadWriteAttribute(jsObject: object, name: Strings.redirect) + _integrity = ReadWriteAttribute(jsObject: object, name: Strings.integrity) + _keepalive = ReadWriteAttribute(jsObject: object, name: Strings.keepalive) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) + _window = ReadWriteAttribute(jsObject: object, name: Strings.window) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var method: String + + @ReadWriteAttribute + public var headers: HeadersInit + + @ReadWriteAttribute + public var body: BodyInit? + + @ReadWriteAttribute + public var referrer: String + + @ReadWriteAttribute + public var referrerPolicy: ReferrerPolicy + + @ReadWriteAttribute + public var mode: RequestMode + + @ReadWriteAttribute + public var credentials: RequestCredentials + + @ReadWriteAttribute + public var cache: RequestCache + + @ReadWriteAttribute + public var redirect: RequestRedirect + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var keepalive: Bool + + @ReadWriteAttribute + public var signal: AbortSignal? + + @ReadWriteAttribute + public var window: JSValue +} + +public enum RequestMode: JSString, JSValueCompatible { + case navigate = "navigate" + case sameOrigin = "same-origin" + case noCors = "no-cors" + case cors = "cors" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestRedirect: JSString, JSValueCompatible { + case follow = "follow" + case error = "error" + case manual = "manual" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ResizeQuality: JSString, JSValueCompatible { + case pixelated = "pixelated" + case low = "low" + case medium = "medium" + case high = "high" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Response: JSBridgedClass, Body { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Response].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _redirected = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirected) + _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) + _ok = ReadonlyAttribute(jsObject: jsObject, name: Strings.ok) + _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) + _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) + self.jsObject = jsObject + } + + @inlinable public convenience init(body: BodyInit? = nil, init: ResponseInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [body?.jsValue ?? .undefined, `init`?.jsValue ?? .undefined])) + } + + @inlinable public static func error() -> Self { + let this = constructor + return this[Strings.error].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public static func redirect(url: String, status: UInt16? = nil) -> Self { + let this = constructor + return this[Strings.redirect].function!(this: this, arguments: [url.jsValue, status?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var type: ResponseType + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var redirected: Bool + + @ReadonlyAttribute + public var status: UInt16 + + @ReadonlyAttribute + public var ok: Bool + + @ReadonlyAttribute + public var statusText: String + + @ReadonlyAttribute + public var headers: Headers + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class ResponseInit: BridgedDictionary { + public convenience init(status: UInt16, statusText: String, headers: HeadersInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.status] = status.jsValue + object[Strings.statusText] = statusText.jsValue + object[Strings.headers] = headers.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _status = ReadWriteAttribute(jsObject: object, name: Strings.status) + _statusText = ReadWriteAttribute(jsObject: object, name: Strings.statusText) + _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var status: UInt16 + + @ReadWriteAttribute + public var statusText: String + + @ReadWriteAttribute + public var headers: HeadersInit +} + +public enum ResponseType: JSString, JSValueCompatible { + case basic = "basic" + case cors = "cors" + case `default` = "default" + case error = "error" + case opaque = "opaque" + case opaqueredirect = "opaqueredirect" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ScrollRestoration: JSString, JSValueCompatible { + case auto = "auto" + case manual = "manual" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum SelectionMode: JSString, JSValueCompatible { + case select = "select" + case start = "start" + case end = "end" + case preserve = "preserve" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ServiceWorker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _scriptURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.scriptURL) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _onstatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstatechange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var scriptURL: String + + @ReadonlyAttribute + public var state: ServiceWorkerState + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @ClosureAttribute1Optional + public var onstatechange: EventHandler +} + +public class ServiceWorkerContainer: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerContainer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _controller = ReadonlyAttribute(jsObject: jsObject, name: Strings.controller) + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _oncontrollerchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontrollerchange) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var controller: ServiceWorker? + + @ReadonlyAttribute + public var ready: JSPromise + + @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) async throws -> ServiceWorkerRegistration { + let this = jsObject + let _promise: JSPromise = this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getRegistration(clientURL: String? = nil) -> JSPromise { + let this = jsObject + return this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getRegistration(clientURL: String? = nil) async throws -> ServiceWorkerRegistration? { + let this = jsObject + let _promise: JSPromise = this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getRegistrations() -> JSPromise { + let this = jsObject + return this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getRegistrations() async throws -> [ServiceWorkerRegistration] { + let this = jsObject + let _promise: JSPromise = this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func startMessages() { + let this = jsObject + _ = this[Strings.startMessages].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var oncontrollerchange: EventHandler + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class ServiceWorkerRegistration: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerRegistration].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _installing = ReadonlyAttribute(jsObject: jsObject, name: Strings.installing) + _waiting = ReadonlyAttribute(jsObject: jsObject, name: Strings.waiting) + _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) + _navigationPreload = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigationPreload) + _scope = ReadonlyAttribute(jsObject: jsObject, name: Strings.scope) + _updateViaCache = ReadonlyAttribute(jsObject: jsObject, name: Strings.updateViaCache) + _onupdatefound = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onupdatefound) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var installing: ServiceWorker? + + @ReadonlyAttribute + public var waiting: ServiceWorker? + + @ReadonlyAttribute + public var active: ServiceWorker? + + @ReadonlyAttribute + public var navigationPreload: NavigationPreloadManager + + @ReadonlyAttribute + public var scope: String + + @ReadonlyAttribute + public var updateViaCache: ServiceWorkerUpdateViaCache + + @inlinable public func update() -> JSPromise { + let this = jsObject + return this[Strings.update].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func update() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.update].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func unregister() -> JSPromise { + let this = jsObject + return this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func unregister() async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ClosureAttribute1Optional + public var onupdatefound: EventHandler +} + +public enum ServiceWorkerState: JSString, JSValueCompatible { + case parsed = "parsed" + case installing = "installing" + case installed = "installed" + case activating = "activating" + case activated = "activated" + case redundant = "redundant" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ServiceWorkerUpdateViaCache: JSString, JSValueCompatible { + case imports = "imports" + case all = "all" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ShadowRoot: DocumentFragment, DocumentOrShadowRoot { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ShadowRoot].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) + _delegatesFocus = ReadonlyAttribute(jsObject: jsObject, name: Strings.delegatesFocus) + _slotAssignment = ReadonlyAttribute(jsObject: jsObject, name: Strings.slotAssignment) + _host = ReadonlyAttribute(jsObject: jsObject, name: Strings.host) + _onslotchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onslotchange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var mode: ShadowRootMode + + @ReadonlyAttribute + public var delegatesFocus: Bool + + @ReadonlyAttribute + public var slotAssignment: SlotAssignmentMode + + @ReadonlyAttribute + public var host: Element + + @ClosureAttribute1Optional + public var onslotchange: EventHandler +} + +public class ShadowRootInit: BridgedDictionary { + public convenience init(mode: ShadowRootMode, delegatesFocus: Bool, slotAssignment: SlotAssignmentMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mode] = mode.jsValue + object[Strings.delegatesFocus] = delegatesFocus.jsValue + object[Strings.slotAssignment] = slotAssignment.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + _delegatesFocus = ReadWriteAttribute(jsObject: object, name: Strings.delegatesFocus) + _slotAssignment = ReadWriteAttribute(jsObject: object, name: Strings.slotAssignment) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mode: ShadowRootMode + + @ReadWriteAttribute + public var delegatesFocus: Bool + + @ReadWriteAttribute + public var slotAssignment: SlotAssignmentMode +} + +public enum ShadowRootMode: JSString, JSValueCompatible { + case open = "open" + case closed = "closed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class SharedWorker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SharedWorker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _port = ReadonlyAttribute(jsObject: jsObject, name: Strings.port) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(scriptURL: String, options: String_or_WorkerOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var port: MessagePort +} + +public enum SlotAssignmentMode: JSString, JSValueCompatible { + case manual = "manual" + case named = "named" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol Slottable: JSBridgedClass {} +public extension Slottable { + @inlinable var assignedSlot: HTMLSlotElement? { ReadonlyAttribute[Strings.assignedSlot, in: jsObject] } +} + +public class StaticRange: AbstractRange { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StaticRange].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(init: StaticRangeInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } +} + +public class StaticRangeInit: BridgedDictionary { + public convenience init(startContainer: Node, startOffset: UInt32, endContainer: Node, endOffset: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.startContainer] = startContainer.jsValue + object[Strings.startOffset] = startOffset.jsValue + object[Strings.endContainer] = endContainer.jsValue + object[Strings.endOffset] = endOffset.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _startContainer = ReadWriteAttribute(jsObject: object, name: Strings.startContainer) + _startOffset = ReadWriteAttribute(jsObject: object, name: Strings.startOffset) + _endContainer = ReadWriteAttribute(jsObject: object, name: Strings.endContainer) + _endOffset = ReadWriteAttribute(jsObject: object, name: Strings.endOffset) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var startContainer: Node + + @ReadWriteAttribute + public var startOffset: UInt32 + + @ReadWriteAttribute + public var endContainer: Node + + @ReadWriteAttribute + public var endOffset: UInt32 +} + +public class Storage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Storage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func key(index: UInt32) -> String? { + let this = jsObject + return this[Strings.key].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public subscript(key: String) -> String? { + jsObject[key].fromJSValue() + } + + // XXX: unsupported setter for keys of type String + + // XXX: unsupported deleter for keys of type String + + @inlinable public func clear() { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: []) + } +} + +public class StorageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StorageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) + _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) + _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _storageArea = ReadonlyAttribute(jsObject: jsObject, name: Strings.storageArea) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: StorageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var key: String? + + @ReadonlyAttribute + public var oldValue: String? + + @ReadonlyAttribute + public var newValue: String? + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var storageArea: Storage? + + @inlinable public func initStorageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, key: String? = nil, oldValue: String? = nil, newValue: String? = nil, url: String? = nil, storageArea: Storage? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = key?.jsValue ?? .undefined + let _arg4 = oldValue?.jsValue ?? .undefined + let _arg5 = newValue?.jsValue ?? .undefined + let _arg6 = url?.jsValue ?? .undefined + let _arg7 = storageArea?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initStorageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class StorageEventInit: BridgedDictionary { + public convenience init(key: String?, oldValue: String?, newValue: String?, url: String, storageArea: Storage?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.key] = key.jsValue + object[Strings.oldValue] = oldValue.jsValue + object[Strings.newValue] = newValue.jsValue + object[Strings.url] = url.jsValue + object[Strings.storageArea] = storageArea.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _key = ReadWriteAttribute(jsObject: object, name: Strings.key) + _oldValue = ReadWriteAttribute(jsObject: object, name: Strings.oldValue) + _newValue = ReadWriteAttribute(jsObject: object, name: Strings.newValue) + _url = ReadWriteAttribute(jsObject: object, name: Strings.url) + _storageArea = ReadWriteAttribute(jsObject: object, name: Strings.storageArea) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var key: String? + + @ReadWriteAttribute + public var oldValue: String? + + @ReadWriteAttribute + public var newValue: String? + + @ReadWriteAttribute + public var url: String + + @ReadWriteAttribute + public var storageArea: Storage? +} + +public class StreamPipeOptions: BridgedDictionary { + public convenience init(preventClose: Bool, preventAbort: Bool, preventCancel: Bool, signal: AbortSignal) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.preventClose] = preventClose.jsValue + object[Strings.preventAbort] = preventAbort.jsValue + object[Strings.preventCancel] = preventCancel.jsValue + object[Strings.signal] = signal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventClose = ReadWriteAttribute(jsObject: object, name: Strings.preventClose) + _preventAbort = ReadWriteAttribute(jsObject: object, name: Strings.preventAbort) + _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventClose: Bool + + @ReadWriteAttribute + public var preventAbort: Bool + + @ReadWriteAttribute + public var preventCancel: Bool + + @ReadWriteAttribute + public var signal: AbortSignal +} + +public class StructuredSerializeOptions: BridgedDictionary { + public convenience init(transfer: [JSObject]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.transfer] = transfer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var transfer: [JSObject] +} + +public class SubmitEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SubmitEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _submitter = ReadonlyAttribute(jsObject: jsObject, name: Strings.submitter) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: SubmitEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var submitter: HTMLElement? +} + +public class SubmitEventInit: BridgedDictionary { + public convenience init(submitter: HTMLElement?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.submitter] = submitter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _submitter = ReadWriteAttribute(jsObject: object, name: Strings.submitter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var submitter: HTMLElement? +} + +public class Text: CharacterData, Slottable { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _wholeText = ReadonlyAttribute(jsObject: jsObject, name: Strings.wholeText) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } + + @inlinable public func splitText(offset: UInt32) -> Self { + let this = jsObject + return this[Strings.splitText].function!(this: this, arguments: [offset.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var wholeText: String +} + +public class TextMetrics: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextMetrics].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _actualBoundingBoxLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxLeft) + _actualBoundingBoxRight = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxRight) + _fontBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxAscent) + _fontBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxDescent) + _actualBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxAscent) + _actualBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxDescent) + _emHeightAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightAscent) + _emHeightDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightDescent) + _hangingBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.hangingBaseline) + _alphabeticBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.alphabeticBaseline) + _ideographicBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.ideographicBaseline) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var width: Double + + @ReadonlyAttribute + public var actualBoundingBoxLeft: Double + + @ReadonlyAttribute + public var actualBoundingBoxRight: Double + + @ReadonlyAttribute + public var fontBoundingBoxAscent: Double + + @ReadonlyAttribute + public var fontBoundingBoxDescent: Double + + @ReadonlyAttribute + public var actualBoundingBoxAscent: Double + + @ReadonlyAttribute + public var actualBoundingBoxDescent: Double + + @ReadonlyAttribute + public var emHeightAscent: Double + + @ReadonlyAttribute + public var emHeightDescent: Double + + @ReadonlyAttribute + public var hangingBaseline: Double + + @ReadonlyAttribute + public var alphabeticBaseline: Double + + @ReadonlyAttribute + public var ideographicBaseline: Double +} + +public class TextTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _inBandMetadataTrackDispatchType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inBandMetadataTrackDispatchType) + _mode = ReadWriteAttribute(jsObject: jsObject, name: Strings.mode) + _cues = ReadonlyAttribute(jsObject: jsObject, name: Strings.cues) + _activeCues = ReadonlyAttribute(jsObject: jsObject, name: Strings.activeCues) + _oncuechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncuechange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var kind: TextTrackKind + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var inBandMetadataTrackDispatchType: String + + @ReadWriteAttribute + public var mode: TextTrackMode + + @ReadonlyAttribute + public var cues: TextTrackCueList? + + @ReadonlyAttribute + public var activeCues: TextTrackCueList? + + @inlinable public func addCue(cue: TextTrackCue) { + let this = jsObject + _ = this[Strings.addCue].function!(this: this, arguments: [cue.jsValue]) + } + + @inlinable public func removeCue(cue: TextTrackCue) { + let this = jsObject + _ = this[Strings.removeCue].function!(this: this, arguments: [cue.jsValue]) + } + + @ClosureAttribute1Optional + public var oncuechange: EventHandler +} + +public class TextTrackCue: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCue].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) + _startTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.startTime) + _endTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.endTime) + _pauseOnExit = ReadWriteAttribute(jsObject: jsObject, name: Strings.pauseOnExit) + _onenter = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onenter) + _onexit = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onexit) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var track: TextTrack? + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var startTime: Double + + @ReadWriteAttribute + public var endTime: Double + + @ReadWriteAttribute + public var pauseOnExit: Bool + + @ClosureAttribute1Optional + public var onenter: EventHandler + + @ClosureAttribute1Optional + public var onexit: EventHandler +} + +public class TextTrackCueList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCueList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> TextTrackCue { + jsObject[key].fromJSValue()! + } + + @inlinable public func getCueById(id: String) -> TextTrackCue? { + let this = jsObject + return this[Strings.getCueById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } +} + +public enum TextTrackKind: JSString, JSValueCompatible { + case subtitles = "subtitles" + case captions = "captions" + case descriptions = "descriptions" + case chapters = "chapters" + case metadata = "metadata" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TextTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> TextTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> TextTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public enum TextTrackMode: JSString, JSValueCompatible { + case disabled = "disabled" + case hidden = "hidden" + case showing = "showing" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TimeRanges: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TimeRanges].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func start(index: UInt32) -> Double { + let this = jsObject + return this[Strings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public func end(index: UInt32) -> Double { + let this = jsObject + return this[Strings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public enum TimelinePhase: JSString, JSValueCompatible { + case inactive = "inactive" + case before = "before" + case active = "active" + case after = "after" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TrackEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var track: AudioTrack_or_TextTrack_or_VideoTrack? +} + +public class TrackEventInit: BridgedDictionary { + public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.track] = track.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _track = ReadWriteAttribute(jsObject: object, name: Strings.track) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var track: AudioTrack_or_TextTrack_or_VideoTrack? +} + +public class TransformStream: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _readable = ReadonlyAttribute(jsObject: jsObject, name: Strings.readable) + _writable = ReadonlyAttribute(jsObject: jsObject, name: Strings.writable) + self.jsObject = jsObject + } + + @inlinable public convenience init(transformer: JSObject? = nil, writableStrategy: QueuingStrategy? = nil, readableStrategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [transformer?.jsValue ?? .undefined, writableStrategy?.jsValue ?? .undefined, readableStrategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var readable: ReadableStream + + @ReadonlyAttribute + public var writable: WritableStream +} + +public class TransformStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func enqueue(chunk: JSValue? = nil) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) + } + + @inlinable public func error(reason: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + } + + @inlinable public func terminate() { + let this = jsObject + _ = this[Strings.terminate].function!(this: this, arguments: []) + } +} + +public class Transformer: BridgedDictionary { + public convenience init(start: @escaping TransformerStartCallback, transform: @escaping TransformerTransformCallback, flush: @escaping TransformerFlushCallback, readableType: JSValue, writableType: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute2[Strings.transform, in: object] = transform + ClosureAttribute1[Strings.flush, in: object] = flush + object[Strings.readableType] = readableType.jsValue + object[Strings.writableType] = writableType.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _transform = ClosureAttribute2(jsObject: object, name: Strings.transform) + _flush = ClosureAttribute1(jsObject: object, name: Strings.flush) + _readableType = ReadWriteAttribute(jsObject: object, name: Strings.readableType) + _writableType = ReadWriteAttribute(jsObject: object, name: Strings.writableType) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: TransformerStartCallback + + @ClosureAttribute2 + public var transform: TransformerTransformCallback + + @ClosureAttribute1 + public var flush: TransformerFlushCallback + + @ReadWriteAttribute + public var readableType: JSValue + + @ReadWriteAttribute + public var writableType: JSValue +} + +public class TreeWalker: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TreeWalker].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) + _currentNode = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentNode) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var root: Node + + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @ReadWriteAttribute + public var currentNode: Node + + @inlinable public func parentNode() -> Node? { + let this = jsObject + return this[Strings.parentNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func firstChild() -> Node? { + let this = jsObject + return this[Strings.firstChild].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func lastChild() -> Node? { + let this = jsObject + return this[Strings.lastChild].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousSibling() -> Node? { + let this = jsObject + return this[Strings.previousSibling].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextSibling() -> Node? { + let this = jsObject + return this[Strings.nextSibling].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } +} + +public typealias CanvasFilterInput = [String: JSValue] + +public typealias EventHandler = EventHandlerNonNull? +public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? +public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? + +public typealias DOMHighResTimeStamp = Double +public typealias EpochTimeStamp = UInt64 + +public typealias DOMTimeStamp = UInt64 + +public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void +public typealias BlobCallback = (Blob?) -> Void +public typealias FunctionStringCallback = (String) -> Void +public typealias EventHandlerNonNull = (Event) -> JSValue +public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue +public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? +public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void +public typealias VoidFunction = () -> Void +public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue +public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise +public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise +public typealias UnderlyingSinkStartCallback = (WritableStreamDefaultController) -> JSValue +public typealias UnderlyingSinkWriteCallback = (JSValue, WritableStreamDefaultController) -> JSPromise +public typealias UnderlyingSinkCloseCallback = () -> JSPromise +public typealias UnderlyingSinkAbortCallback = (JSValue) -> JSPromise +public typealias TransformerStartCallback = (TransformStreamDefaultController) -> JSValue +public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise +public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise +public typealias QueuingStrategySize = (JSValue) -> Double +public class UIEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) + _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) + _which = ReadonlyAttribute(jsObject: jsObject, name: Strings.which) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: UIEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var view: Window? + + @ReadonlyAttribute + public var detail: Int32 + + @inlinable public func initUIEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil) { + let this = jsObject + _ = this[Strings.initUIEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, detailArg?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var which: UInt32 +} + +public class UIEventInit: BridgedDictionary { + public convenience init(view: Window?, detail: Int32, which: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.view] = view.jsValue + object[Strings.detail] = detail.jsValue + object[Strings.which] = which.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _view = ReadWriteAttribute(jsObject: object, name: Strings.view) + _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) + _which = ReadWriteAttribute(jsObject: object, name: Strings.which) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var view: Window? + + @ReadWriteAttribute + public var detail: Int32 + + @ReadWriteAttribute + public var which: UInt32 +} + +public class URL: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) + _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) + self.jsObject = jsObject + } + + @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { + let this = constructor + return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! + } + + @inlinable public static func revokeObjectURL(url: String) { + let this = constructor + _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public convenience init(url: String, base: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) + } + + @ReadWriteAttribute + public var href: String + + @ReadonlyAttribute + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var username: String + + @ReadWriteAttribute + public var password: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String + + @ReadonlyAttribute + public var searchParams: URLSearchParams + + @ReadWriteAttribute + public var hash: String + + @inlinable public func toJSON() -> String { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class URLSearchParams: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAll(name: String) -> [String] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func sort() { + let this = jsObject + _ = this[Strings.sort].function!(this: this, arguments: []) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } +} + +public class UnderlyingSink: BridgedDictionary { + public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute2[Strings.write, in: object] = write + ClosureAttribute0[Strings.close, in: object] = close + ClosureAttribute1[Strings.abort, in: object] = abort + object[Strings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _write = ClosureAttribute2(jsObject: object, name: Strings.write) + _close = ClosureAttribute0(jsObject: object, name: Strings.close) + _abort = ClosureAttribute1(jsObject: object, name: Strings.abort) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: UnderlyingSinkStartCallback + + @ClosureAttribute2 + public var write: UnderlyingSinkWriteCallback + + @ClosureAttribute0 + public var close: UnderlyingSinkCloseCallback + + @ClosureAttribute1 + public var abort: UnderlyingSinkAbortCallback + + @ReadWriteAttribute + public var type: JSValue +} + +public class UnderlyingSource: BridgedDictionary { + public convenience init(start: @escaping UnderlyingSourceStartCallback, pull: @escaping UnderlyingSourcePullCallback, cancel: @escaping UnderlyingSourceCancelCallback, type: ReadableStreamType, autoAllocateChunkSize: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute1[Strings.pull, in: object] = pull + ClosureAttribute1[Strings.cancel, in: object] = cancel + object[Strings.type] = type.jsValue + object[Strings.autoAllocateChunkSize] = autoAllocateChunkSize.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _pull = ClosureAttribute1(jsObject: object, name: Strings.pull) + _cancel = ClosureAttribute1(jsObject: object, name: Strings.cancel) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _autoAllocateChunkSize = ReadWriteAttribute(jsObject: object, name: Strings.autoAllocateChunkSize) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: UnderlyingSourceStartCallback + + @ClosureAttribute1 + public var pull: UnderlyingSourcePullCallback + + @ClosureAttribute1 + public var cancel: UnderlyingSourceCancelCallback + + @ReadWriteAttribute + public var type: ReadableStreamType + + @ReadWriteAttribute + public var autoAllocateChunkSize: UInt64 +} + +public class ValidityState: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ValidityState].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: Strings.valueMissing) + _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.typeMismatch) + _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.patternMismatch) + _tooLong = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooLong) + _tooShort = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooShort) + _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeUnderflow) + _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeOverflow) + _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.stepMismatch) + _badInput = ReadonlyAttribute(jsObject: jsObject, name: Strings.badInput) + _customError = ReadonlyAttribute(jsObject: jsObject, name: Strings.customError) + _valid = ReadonlyAttribute(jsObject: jsObject, name: Strings.valid) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var valueMissing: Bool + + @ReadonlyAttribute + public var typeMismatch: Bool + + @ReadonlyAttribute + public var patternMismatch: Bool + + @ReadonlyAttribute + public var tooLong: Bool + + @ReadonlyAttribute + public var tooShort: Bool + + @ReadonlyAttribute + public var rangeUnderflow: Bool + + @ReadonlyAttribute + public var rangeOverflow: Bool + + @ReadonlyAttribute + public var stepMismatch: Bool + + @ReadonlyAttribute + public var badInput: Bool + + @ReadonlyAttribute + public var customError: Bool + + @ReadonlyAttribute + public var valid: Bool +} + +public class ValidityStateFlags: BridgedDictionary { + public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.valueMissing] = valueMissing.jsValue + object[Strings.typeMismatch] = typeMismatch.jsValue + object[Strings.patternMismatch] = patternMismatch.jsValue + object[Strings.tooLong] = tooLong.jsValue + object[Strings.tooShort] = tooShort.jsValue + object[Strings.rangeUnderflow] = rangeUnderflow.jsValue + object[Strings.rangeOverflow] = rangeOverflow.jsValue + object[Strings.stepMismatch] = stepMismatch.jsValue + object[Strings.badInput] = badInput.jsValue + object[Strings.customError] = customError.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _valueMissing = ReadWriteAttribute(jsObject: object, name: Strings.valueMissing) + _typeMismatch = ReadWriteAttribute(jsObject: object, name: Strings.typeMismatch) + _patternMismatch = ReadWriteAttribute(jsObject: object, name: Strings.patternMismatch) + _tooLong = ReadWriteAttribute(jsObject: object, name: Strings.tooLong) + _tooShort = ReadWriteAttribute(jsObject: object, name: Strings.tooShort) + _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeUnderflow) + _rangeOverflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeOverflow) + _stepMismatch = ReadWriteAttribute(jsObject: object, name: Strings.stepMismatch) + _badInput = ReadWriteAttribute(jsObject: object, name: Strings.badInput) + _customError = ReadWriteAttribute(jsObject: object, name: Strings.customError) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var valueMissing: Bool + + @ReadWriteAttribute + public var typeMismatch: Bool + + @ReadWriteAttribute + public var patternMismatch: Bool + + @ReadWriteAttribute + public var tooLong: Bool + + @ReadWriteAttribute + public var tooShort: Bool + + @ReadWriteAttribute + public var rangeUnderflow: Bool + + @ReadWriteAttribute + public var rangeOverflow: Bool + + @ReadWriteAttribute + public var stepMismatch: Bool + + @ReadWriteAttribute + public var badInput: Bool + + @ReadWriteAttribute + public var customError: Bool +} + +public class VideoTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var selected: Bool +} + +public class VideoTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> VideoTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> VideoTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public class WheelEvent: MouseEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _deltaX = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaX) + _deltaY = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaY) + _deltaZ = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaZ) + _deltaMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaMode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: WheelEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + public static let DOM_DELTA_PIXEL: UInt32 = 0x00 + + public static let DOM_DELTA_LINE: UInt32 = 0x01 + + public static let DOM_DELTA_PAGE: UInt32 = 0x02 + + @ReadonlyAttribute + public var deltaX: Double + + @ReadonlyAttribute + public var deltaY: Double + + @ReadonlyAttribute + public var deltaZ: Double + + @ReadonlyAttribute + public var deltaMode: UInt32 +} + +public class WheelEventInit: BridgedDictionary { + public convenience init(deltaX: Double, deltaY: Double, deltaZ: Double, deltaMode: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.deltaX] = deltaX.jsValue + object[Strings.deltaY] = deltaY.jsValue + object[Strings.deltaZ] = deltaZ.jsValue + object[Strings.deltaMode] = deltaMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _deltaX = ReadWriteAttribute(jsObject: object, name: Strings.deltaX) + _deltaY = ReadWriteAttribute(jsObject: object, name: Strings.deltaY) + _deltaZ = ReadWriteAttribute(jsObject: object, name: Strings.deltaZ) + _deltaMode = ReadWriteAttribute(jsObject: object, name: Strings.deltaMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var deltaX: Double + + @ReadWriteAttribute + public var deltaY: Double + + @ReadWriteAttribute + public var deltaZ: Double + + @ReadWriteAttribute + public var deltaMode: UInt32 +} + +public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Window].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _event = ReadonlyAttribute(jsObject: jsObject, name: Strings.event) + _window = ReadonlyAttribute(jsObject: jsObject, name: Strings.window) + _self = ReadonlyAttribute(jsObject: jsObject, name: Strings._self) + _document = ReadonlyAttribute(jsObject: jsObject, name: Strings.document) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) + _history = ReadonlyAttribute(jsObject: jsObject, name: Strings.history) + _customElements = ReadonlyAttribute(jsObject: jsObject, name: Strings.customElements) + _locationbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.locationbar) + _menubar = ReadonlyAttribute(jsObject: jsObject, name: Strings.menubar) + _personalbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.personalbar) + _scrollbars = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollbars) + _statusbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusbar) + _toolbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.toolbar) + _status = ReadWriteAttribute(jsObject: jsObject, name: Strings.status) + _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) + _frames = ReadonlyAttribute(jsObject: jsObject, name: Strings.frames) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) + _opener = ReadWriteAttribute(jsObject: jsObject, name: Strings.opener) + _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) + _frameElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameElement) + _navigator = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigator) + _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) + _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) + _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var event: Event? + + @ReadonlyAttribute + public var window: WindowProxy + + @ReadonlyAttribute + public var `self`: WindowProxy + + @ReadonlyAttribute + public var document: Document + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var location: Location + + @ReadonlyAttribute + public var history: History + + @ReadonlyAttribute + public var customElements: CustomElementRegistry + + @ReadonlyAttribute + public var locationbar: BarProp + + @ReadonlyAttribute + public var menubar: BarProp + + @ReadonlyAttribute + public var personalbar: BarProp + + @ReadonlyAttribute + public var scrollbars: BarProp + + @ReadonlyAttribute + public var statusbar: BarProp + + @ReadonlyAttribute + public var toolbar: BarProp + + @ReadWriteAttribute + public var status: String + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var closed: Bool + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func focus() { + let this = jsObject + _ = this[Strings.focus].function!(this: this, arguments: []) + } + + @inlinable public func blur() { + let this = jsObject + _ = this[Strings.blur].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var frames: WindowProxy + + @ReadonlyAttribute + public var length: UInt32 + + @ReadonlyAttribute + public var top: WindowProxy? + + @ReadWriteAttribute + public var opener: JSValue + + @ReadonlyAttribute + public var parent: WindowProxy? + + @ReadonlyAttribute + public var frameElement: Element? + + @inlinable public func open(url: String? = nil, target: String? = nil, features: String? = nil) -> WindowProxy? { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [url?.jsValue ?? .undefined, target?.jsValue ?? .undefined, features?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public subscript(key: String) -> JSObject { + jsObject[key].fromJSValue()! + } + + @ReadonlyAttribute + public var navigator: Navigator + + @ReadonlyAttribute + public var clientInformation: Navigator + + @ReadonlyAttribute + public var originAgentCluster: Bool + + @inlinable public func alert() { + let this = jsObject + _ = this[Strings.alert].function!(this: this, arguments: []) + } + + @inlinable public func alert(message: String) { + let this = jsObject + _ = this[Strings.alert].function!(this: this, arguments: [message.jsValue]) + } + + @inlinable public func confirm(message: String? = nil) -> Bool { + let this = jsObject + return this[Strings.confirm].function!(this: this, arguments: [message?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func prompt(message: String? = nil, default: String? = nil) -> String? { + let this = jsObject + return this[Strings.prompt].function!(this: this, arguments: [message?.jsValue ?? .undefined, `default`?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func print() { + let this = jsObject + _ = this[Strings.print].function!(this: this, arguments: []) + } + + @inlinable public func postMessage(message: JSValue, targetOrigin: String, transfer: [JSObject]? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, targetOrigin.jsValue, transfer?.jsValue ?? .undefined]) + } + + @inlinable public func postMessage(message: JSValue, options: WindowPostMessageOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func captureEvents() { + let this = jsObject + _ = this[Strings.captureEvents].function!(this: this, arguments: []) + } + + @inlinable public func releaseEvents() { + let this = jsObject + _ = this[Strings.releaseEvents].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var external: External +} + +public protocol WindowEventHandlers: JSBridgedClass {} +public extension WindowEventHandlers { + @inlinable var onafterprint: EventHandler { + get { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] = newValue } + } + + @inlinable var onbeforeprint: EventHandler { + get { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] = newValue } + } + + @inlinable var onbeforeunload: OnBeforeUnloadEventHandler { + get { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] = newValue } + } + + @inlinable var onhashchange: EventHandler { + get { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] = newValue } + } + + @inlinable var onlanguagechange: EventHandler { + get { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] = newValue } + } + + @inlinable var onmessage: EventHandler { + get { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] = newValue } + } + + @inlinable var onmessageerror: EventHandler { + get { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] = newValue } + } + + @inlinable var onoffline: EventHandler { + get { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] = newValue } + } + + @inlinable var ononline: EventHandler { + get { ClosureAttribute1Optional[Strings.ononline, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ononline, in: jsObject] = newValue } + } + + @inlinable var onpagehide: EventHandler { + get { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] = newValue } + } + + @inlinable var onpageshow: EventHandler { + get { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] = newValue } + } + + @inlinable var onpopstate: EventHandler { + get { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] = newValue } + } + + @inlinable var onrejectionhandled: EventHandler { + get { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] = newValue } + } + + @inlinable var onstorage: EventHandler { + get { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] = newValue } + } + + @inlinable var onunhandledrejection: EventHandler { + get { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] = newValue } + } + + @inlinable var onunload: EventHandler { + get { ClosureAttribute1Optional[Strings.onunload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onunload, in: jsObject] = newValue } + } +} + +public protocol WindowLocalStorage: JSBridgedClass {} +public extension WindowLocalStorage { + @inlinable var localStorage: Storage { ReadonlyAttribute[Strings.localStorage, in: jsObject] } +} + +public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} +public extension WindowOrWorkerGlobalScope { + @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) -> JSPromise { + let this = jsObject + return this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) async throws -> Response { + let this = jsObject + let _promise: JSPromise = this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } + + @inlinable var isSecureContext: Bool { ReadonlyAttribute[Strings.isSecureContext, in: jsObject] } + + @inlinable var crossOriginIsolated: Bool { ReadonlyAttribute[Strings.crossOriginIsolated, in: jsObject] } + + @inlinable func reportError(e: JSValue) { + let this = jsObject + _ = this[Strings.reportError].function!(this: this, arguments: [e.jsValue]) + } + + @inlinable func btoa(data: String) -> String { + let this = jsObject + return this[Strings.btoa].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable func atob(data: String) -> String { + let this = jsObject + return this[Strings.atob].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable func setTimeout(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { + let this = jsObject + return this[Strings.setTimeout].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! + } + + @inlinable func clearTimeout(id: Int32? = nil) { + let this = jsObject + _ = this[Strings.clearTimeout].function!(this: this, arguments: [id?.jsValue ?? .undefined]) + } + + @inlinable func setInterval(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { + let this = jsObject + return this[Strings.setInterval].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! + } + + @inlinable func clearInterval(id: Int32? = nil) { + let this = jsObject + _ = this[Strings.clearInterval].function!(this: this, arguments: [id?.jsValue ?? .undefined]) + } + + // XXX: method 'queueMicrotask' is ignored + + @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { + let this = jsObject + let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) -> JSPromise { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = options?.jsValue ?? .undefined + let this = jsObject + return this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = options?.jsValue ?? .undefined + let this = jsObject + let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func structuredClone(value: JSValue, options: StructuredSerializeOptions? = nil) -> JSValue { + let this = jsObject + return this[Strings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable var performance: Performance { ReadonlyAttribute[Strings.performance, in: jsObject] } + + @inlinable var caches: CacheStorage { ReadonlyAttribute[Strings.caches, in: jsObject] } +} + +public class WindowPostMessageOptions: BridgedDictionary { + public convenience init(targetOrigin: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.targetOrigin] = targetOrigin.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _targetOrigin = ReadWriteAttribute(jsObject: object, name: Strings.targetOrigin) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var targetOrigin: String +} + +public protocol WindowSessionStorage: JSBridgedClass {} +public extension WindowSessionStorage { + @inlinable var sessionStorage: Storage { ReadonlyAttribute[Strings.sessionStorage, in: jsObject] } +} + +public class Worker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Worker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(scriptURL: String, options: WorkerOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) + } + + @inlinable public func terminate() { + let this = jsObject + _ = this[Strings.terminate].function!(this: this, arguments: []) + } + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class WorkerOptions: BridgedDictionary { + public convenience init(type: WorkerType, credentials: RequestCredentials, name: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.credentials] = credentials.jsValue + object[Strings.name] = name.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + _name = ReadWriteAttribute(jsObject: object, name: Strings.name) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: WorkerType + + @ReadWriteAttribute + public var credentials: RequestCredentials + + @ReadWriteAttribute + public var name: String +} + +public enum WorkerType: JSString, JSValueCompatible { + case classic = "classic" + case module = "module" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Worklet: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Worklet].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class WorkletOptions: BridgedDictionary { + public convenience init(credentials: RequestCredentials) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.credentials] = credentials.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var credentials: RequestCredentials +} + +public class WritableStream: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) + self.jsObject = jsObject + } + + @inlinable public convenience init(underlyingSink: JSObject? = nil, strategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSink?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var locked: Bool + + @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func abort(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func close() -> JSPromise { + let this = jsObject + return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func close() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getWriter() -> WritableStreamDefaultWriter { + let this = jsObject + return this[Strings.getWriter].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class WritableStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func error(e: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) + } +} + +public class WritableStreamDefaultWriter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultWriter].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + self.jsObject = jsObject + } + + @inlinable public convenience init(stream: WritableStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @ReadonlyAttribute + public var closed: JSPromise + + @ReadonlyAttribute + public var desiredSize: Double? + + @ReadonlyAttribute + public var ready: JSPromise + + @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func abort(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func close() -> JSPromise { + let this = jsObject + return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func close() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func releaseLock() { + let this = jsObject + _ = this[Strings.releaseLock].function!(this: this, arguments: []) + } + + @inlinable public func write(chunk: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func write(chunk: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class XMLDocument: Document { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLDocument].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class XMLHttpRequest: XMLHttpRequestEventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequest].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _timeout = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeout) + _withCredentials = ReadWriteAttribute(jsObject: jsObject, name: Strings.withCredentials) + _upload = ReadonlyAttribute(jsObject: jsObject, name: Strings.upload) + _responseURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseURL) + _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) + _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) + _responseType = ReadWriteAttribute(jsObject: jsObject, name: Strings.responseType) + _response = ReadonlyAttribute(jsObject: jsObject, name: Strings.response) + _responseText = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseText) + _responseXML = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseXML) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ClosureAttribute1Optional + public var onreadystatechange: EventHandler + + public static let UNSENT: UInt16 = 0 + + public static let OPENED: UInt16 = 1 + + public static let HEADERS_RECEIVED: UInt16 = 2 + + public static let LOADING: UInt16 = 3 + + public static let DONE: UInt16 = 4 + + @ReadonlyAttribute + public var readyState: UInt16 + + @inlinable public func open(method: String, url: String) { + let this = jsObject + _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue]) + } + + @inlinable public func open(method: String, url: String, async: Bool, username: String? = nil, password: String? = nil) { + let this = jsObject + _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue, async.jsValue, username?.jsValue ?? .undefined, password?.jsValue ?? .undefined]) + } + + @inlinable public func setRequestHeader(name: String, value: String) { + let this = jsObject + _ = this[Strings.setRequestHeader].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @ReadWriteAttribute + public var timeout: UInt32 + + @ReadWriteAttribute + public var withCredentials: Bool + + @ReadonlyAttribute + public var upload: XMLHttpRequestUpload + + @inlinable public func send(body: Document_or_XMLHttpRequestBodyInit? = nil) { + let this = jsObject + _ = this[Strings.send].function!(this: this, arguments: [body?.jsValue ?? .undefined]) + } + + @inlinable public func abort() { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var responseURL: String + + @ReadonlyAttribute + public var status: UInt16 + + @ReadonlyAttribute + public var statusText: String + + @inlinable public func getResponseHeader(name: String) -> String? { + let this = jsObject + return this[Strings.getResponseHeader].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAllResponseHeaders() -> String { + let this = jsObject + return this[Strings.getAllResponseHeaders].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func overrideMimeType(mime: String) { + let this = jsObject + _ = this[Strings.overrideMimeType].function!(this: this, arguments: [mime.jsValue]) + } + + @ReadWriteAttribute + public var responseType: XMLHttpRequestResponseType + + @ReadonlyAttribute + public var response: JSValue + + @ReadonlyAttribute + public var responseText: String + + @ReadonlyAttribute + public var responseXML: Document? +} + +public class XMLHttpRequestEventTarget: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestEventTarget].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) + _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) + _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) + _ontimeout = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ontimeout) + _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) + super.init(unsafelyWrapping: jsObject) + } + + @ClosureAttribute1Optional + public var onloadstart: EventHandler + + @ClosureAttribute1Optional + public var onprogress: EventHandler + + @ClosureAttribute1Optional + public var onabort: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ClosureAttribute1Optional + public var onload: EventHandler + + @ClosureAttribute1Optional + public var ontimeout: EventHandler + + @ClosureAttribute1Optional + public var onloadend: EventHandler +} + +public enum XMLHttpRequestResponseType: JSString, JSValueCompatible { + case _empty = "" + case arraybuffer = "arraybuffer" + case blob = "blob" + case document = "document" + case json = "json" + case text = "text" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class XMLHttpRequestUpload: XMLHttpRequestEventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestUpload].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class XPathEvaluator: JSBridgedClass, XPathEvaluatorBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathEvaluator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol XPathEvaluatorBase: JSBridgedClass {} +public extension XPathEvaluatorBase { + // XXX: method 'createExpression' is ignored + + // XXX: method 'createNSResolver' is ignored + + // XXX: method 'evaluate' is ignored +} + +public class XPathExpression: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathExpression].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func evaluate(contextNode: Node, type: UInt16? = nil, result: XPathResult? = nil) -> XPathResult { + let this = jsObject + return this[Strings.evaluate].function!(this: this, arguments: [contextNode.jsValue, type?.jsValue ?? .undefined, result?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class XPathResult: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathResult].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _resultType = ReadonlyAttribute(jsObject: jsObject, name: Strings.resultType) + _numberValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberValue) + _stringValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.stringValue) + _booleanValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.booleanValue) + _singleNodeValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.singleNodeValue) + _invalidIteratorState = ReadonlyAttribute(jsObject: jsObject, name: Strings.invalidIteratorState) + _snapshotLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.snapshotLength) + self.jsObject = jsObject + } + + public static let ANY_TYPE: UInt16 = 0 + + public static let NUMBER_TYPE: UInt16 = 1 + + public static let STRING_TYPE: UInt16 = 2 + + public static let BOOLEAN_TYPE: UInt16 = 3 + + public static let UNORDERED_NODE_ITERATOR_TYPE: UInt16 = 4 + + public static let ORDERED_NODE_ITERATOR_TYPE: UInt16 = 5 + + public static let UNORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 6 + + public static let ORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 7 + + public static let ANY_UNORDERED_NODE_TYPE: UInt16 = 8 + + public static let FIRST_ORDERED_NODE_TYPE: UInt16 = 9 + + @ReadonlyAttribute + public var resultType: UInt16 + + @ReadonlyAttribute + public var numberValue: Double + + @ReadonlyAttribute + public var stringValue: String + + @ReadonlyAttribute + public var booleanValue: Bool + + @ReadonlyAttribute + public var singleNodeValue: Node? + + @ReadonlyAttribute + public var invalidIteratorState: Bool + + @ReadonlyAttribute + public var snapshotLength: UInt32 + + @inlinable public func iterateNext() -> Node? { + let this = jsObject + return this[Strings.iterateNext].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func snapshotItem(index: UInt32) -> Node? { + let this = jsObject + return this[Strings.snapshotItem].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public class XSLTProcessor: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XSLTProcessor].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func importStylesheet(style: Node) { + let this = jsObject + _ = this[Strings.importStylesheet].function!(this: this, arguments: [style.jsValue]) + } + + @inlinable public func transformToFragment(source: Node, output: Document) -> DocumentFragment { + let this = jsObject + return this[Strings.transformToFragment].function!(this: this, arguments: [source.jsValue, output.jsValue]).fromJSValue()! + } + + @inlinable public func transformToDocument(source: Node) -> Document { + let this = jsObject + return this[Strings.transformToDocument].function!(this: this, arguments: [source.jsValue]).fromJSValue()! + } + + @inlinable public func setParameter(namespaceURI: String, localName: String, value: JSValue) { + let this = jsObject + _ = this[Strings.setParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue, value.jsValue]) + } + + @inlinable public func getParameter(namespaceURI: String, localName: String) -> JSValue { + let this = jsObject + return this[Strings.getParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func removeParameter(namespaceURI: String, localName: String) { + let this = jsObject + _ = this[Strings.removeParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]) + } + + @inlinable public func clearParameters() { + let this = jsObject + _ = this[Strings.clearParameters].function!(this: this, arguments: []) + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } +} + +public enum console { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.console].object! + } + + @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func clear() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public static func debug(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func error(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func info(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func log(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) + } + + @inlinable public static func trace(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func warn(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) + } + + @inlinable public static func dirxml(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func count(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func countReset(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func group(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupCollapsed(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupEnd() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupEnd].function!(this: this, arguments: []) + } + + @inlinable public static func time(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func timeEnd(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } +} + +/* variadic generics please */ +@propertyWrapper public final class ClosureAttribute0 + where ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: () -> ReturnType { + get { ClosureAttribute0[name, in: jsObject] } + set { ClosureAttribute0[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> ReturnType { + get { + let function = jsObject[name].function! + return { function().fromJSValue()! } + } + set { + jsObject[name] = JSClosure { _ in + newValue().jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute0Optional + where ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (() -> ReturnType)? { + get { ClosureAttribute0Optional[name, in: jsObject] } + set { ClosureAttribute0Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function().fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { _ in + newValue().jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute0OptionalVoid { + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (() -> Void)? { + get { ClosureAttribute0OptionalVoid[name, in: jsObject] } + set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function() } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { _ in + newValue() + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute0Void { + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: () -> Void { + get { ClosureAttribute0Void[name, in: jsObject] } + set { ClosureAttribute0Void[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { + get { + let function = jsObject[name].function! + return { function() } + } + set { + jsObject[name] = JSClosure { _ in + newValue() + return .undefined + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute1 + where A0: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0) -> ReturnType { + get { ClosureAttribute1[name, in: jsObject] } + set { ClosureAttribute1[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!).jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute1Optional + where A0: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0) -> ReturnType)? { + get { ClosureAttribute1Optional[name, in: jsObject] } + set { ClosureAttribute1Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute1OptionalVoid + where A0: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0) -> Void)? { + get { ClosureAttribute1OptionalVoid[name, in: jsObject] } + set { ClosureAttribute1OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue) } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!) + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute1Void + where A0: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0) -> Void { + get { ClosureAttribute1Void[name, in: jsObject] } + set { ClosureAttribute1Void[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> Void { + get { + let function = jsObject[name].function! + return { function($0.jsValue) } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!) + return .undefined + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute2 + where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0, A1) -> ReturnType { + get { ClosureAttribute2[name, in: jsObject] } + set { ClosureAttribute2[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute2Optional + where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0, A1) -> ReturnType)? { + get { ClosureAttribute2Optional[name, in: jsObject] } + set { ClosureAttribute2Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute2OptionalVoid + where A0: JSValueCompatible, A1: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0, A1) -> Void)? { + get { ClosureAttribute2OptionalVoid[name, in: jsObject] } + set { ClosureAttribute2OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue) } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute2Void + where A0: JSValueCompatible, A1: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0, A1) -> Void { + get { ClosureAttribute2Void[name, in: jsObject] } + set { ClosureAttribute2Void[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> Void { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue) } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) + return .undefined + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute5 + where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0, A1, A2, A3, A4) -> ReturnType { + get { ClosureAttribute5[name, in: jsObject] } + set { ClosureAttribute5[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1, A2, A3, A4) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute5Optional + where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0, A1, A2, A3, A4) -> ReturnType)? { + get { ClosureAttribute5Optional[name, in: jsObject] } + set { ClosureAttribute5Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1, A2, A3, A4) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@usableFromInline enum Strings { + static let _self: JSString = "self" + @usableFromInline static let AbortController: JSString = "AbortController" + @usableFromInline static let AbortSignal: JSString = "AbortSignal" + @usableFromInline static let AbstractRange: JSString = "AbstractRange" + @usableFromInline static let AddSearchProvider: JSString = "AddSearchProvider" + @usableFromInline static let Animation: JSString = "Animation" + @usableFromInline static let AnimationEffect: JSString = "AnimationEffect" + @usableFromInline static let AnimationTimeline: JSString = "AnimationTimeline" + @usableFromInline static let Attr: JSString = "Attr" + @usableFromInline static let AudioTrack: JSString = "AudioTrack" + @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" + @usableFromInline static let BarProp: JSString = "BarProp" + @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" + @usableFromInline static let Blob: JSString = "Blob" + @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" + @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" + @usableFromInline static let CDATASection: JSString = "CDATASection" + @usableFromInline static let Cache: JSString = "Cache" + @usableFromInline static let CacheStorage: JSString = "CacheStorage" + @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" + @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" + @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" + @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" + @usableFromInline static let CharacterData: JSString = "CharacterData" + @usableFromInline static let Comment: JSString = "Comment" + @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" + @usableFromInline static let CountQueuingStrategy: JSString = "CountQueuingStrategy" + @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" + @usableFromInline static let CustomEvent: JSString = "CustomEvent" + @usableFromInline static let DOMException: JSString = "DOMException" + @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" + @usableFromInline static let DOMMatrix: JSString = "DOMMatrix" + @usableFromInline static let DOMMatrixReadOnly: JSString = "DOMMatrixReadOnly" + @usableFromInline static let DOMParser: JSString = "DOMParser" + @usableFromInline static let DOMPoint: JSString = "DOMPoint" + @usableFromInline static let DOMPointReadOnly: JSString = "DOMPointReadOnly" + @usableFromInline static let DOMQuad: JSString = "DOMQuad" + @usableFromInline static let DOMRect: JSString = "DOMRect" + @usableFromInline static let DOMRectList: JSString = "DOMRectList" + @usableFromInline static let DOMRectReadOnly: JSString = "DOMRectReadOnly" + @usableFromInline static let DOMStringList: JSString = "DOMStringList" + @usableFromInline static let DOMStringMap: JSString = "DOMStringMap" + @usableFromInline static let DOMTokenList: JSString = "DOMTokenList" + @usableFromInline static let DataTransfer: JSString = "DataTransfer" + @usableFromInline static let DataTransferItem: JSString = "DataTransferItem" + @usableFromInline static let DataTransferItemList: JSString = "DataTransferItemList" + @usableFromInline static let Document: JSString = "Document" + @usableFromInline static let DocumentFragment: JSString = "DocumentFragment" + @usableFromInline static let DocumentTimeline: JSString = "DocumentTimeline" + @usableFromInline static let DocumentType: JSString = "DocumentType" + @usableFromInline static let DragEvent: JSString = "DragEvent" + @usableFromInline static let Element: JSString = "Element" + @usableFromInline static let ElementInternals: JSString = "ElementInternals" + @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" + @usableFromInline static let Event: JSString = "Event" + @usableFromInline static let EventSource: JSString = "EventSource" + @usableFromInline static let EventTarget: JSString = "EventTarget" + @usableFromInline static let External: JSString = "External" + @usableFromInline static let File: JSString = "File" + @usableFromInline static let FileList: JSString = "FileList" + @usableFromInline static let FileReader: JSString = "FileReader" + @usableFromInline static let FocusEvent: JSString = "FocusEvent" + @usableFromInline static let FormData: JSString = "FormData" + @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" + @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" + @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" + @usableFromInline static let HTMLAreaElement: JSString = "HTMLAreaElement" + @usableFromInline static let HTMLAudioElement: JSString = "HTMLAudioElement" + @usableFromInline static let HTMLBRElement: JSString = "HTMLBRElement" + @usableFromInline static let HTMLBaseElement: JSString = "HTMLBaseElement" + @usableFromInline static let HTMLBodyElement: JSString = "HTMLBodyElement" + @usableFromInline static let HTMLButtonElement: JSString = "HTMLButtonElement" + @usableFromInline static let HTMLCanvasElement: JSString = "HTMLCanvasElement" + @usableFromInline static let HTMLCollection: JSString = "HTMLCollection" + @usableFromInline static let HTMLDListElement: JSString = "HTMLDListElement" + @usableFromInline static let HTMLDataElement: JSString = "HTMLDataElement" + @usableFromInline static let HTMLDataListElement: JSString = "HTMLDataListElement" + @usableFromInline static let HTMLDetailsElement: JSString = "HTMLDetailsElement" + @usableFromInline static let HTMLDialogElement: JSString = "HTMLDialogElement" + @usableFromInline static let HTMLDirectoryElement: JSString = "HTMLDirectoryElement" + @usableFromInline static let HTMLDivElement: JSString = "HTMLDivElement" + @usableFromInline static let HTMLElement: JSString = "HTMLElement" + @usableFromInline static let HTMLEmbedElement: JSString = "HTMLEmbedElement" + @usableFromInline static let HTMLFieldSetElement: JSString = "HTMLFieldSetElement" + @usableFromInline static let HTMLFontElement: JSString = "HTMLFontElement" + @usableFromInline static let HTMLFormControlsCollection: JSString = "HTMLFormControlsCollection" + @usableFromInline static let HTMLFormElement: JSString = "HTMLFormElement" + @usableFromInline static let HTMLFrameElement: JSString = "HTMLFrameElement" + @usableFromInline static let HTMLFrameSetElement: JSString = "HTMLFrameSetElement" + @usableFromInline static let HTMLHRElement: JSString = "HTMLHRElement" + @usableFromInline static let HTMLHeadElement: JSString = "HTMLHeadElement" + @usableFromInline static let HTMLHeadingElement: JSString = "HTMLHeadingElement" + @usableFromInline static let HTMLHtmlElement: JSString = "HTMLHtmlElement" + @usableFromInline static let HTMLIFrameElement: JSString = "HTMLIFrameElement" + @usableFromInline static let HTMLImageElement: JSString = "HTMLImageElement" + @usableFromInline static let HTMLInputElement: JSString = "HTMLInputElement" + @usableFromInline static let HTMLLIElement: JSString = "HTMLLIElement" + @usableFromInline static let HTMLLabelElement: JSString = "HTMLLabelElement" + @usableFromInline static let HTMLLegendElement: JSString = "HTMLLegendElement" + @usableFromInline static let HTMLLinkElement: JSString = "HTMLLinkElement" + @usableFromInline static let HTMLMapElement: JSString = "HTMLMapElement" + @usableFromInline static let HTMLMarqueeElement: JSString = "HTMLMarqueeElement" + @usableFromInline static let HTMLMediaElement: JSString = "HTMLMediaElement" + @usableFromInline static let HTMLMenuElement: JSString = "HTMLMenuElement" + @usableFromInline static let HTMLMetaElement: JSString = "HTMLMetaElement" + @usableFromInline static let HTMLMeterElement: JSString = "HTMLMeterElement" + @usableFromInline static let HTMLModElement: JSString = "HTMLModElement" + @usableFromInline static let HTMLOListElement: JSString = "HTMLOListElement" + @usableFromInline static let HTMLObjectElement: JSString = "HTMLObjectElement" + @usableFromInline static let HTMLOptGroupElement: JSString = "HTMLOptGroupElement" + @usableFromInline static let HTMLOptionElement: JSString = "HTMLOptionElement" + @usableFromInline static let HTMLOptionsCollection: JSString = "HTMLOptionsCollection" + @usableFromInline static let HTMLOutputElement: JSString = "HTMLOutputElement" + @usableFromInline static let HTMLParagraphElement: JSString = "HTMLParagraphElement" + @usableFromInline static let HTMLParamElement: JSString = "HTMLParamElement" + @usableFromInline static let HTMLPictureElement: JSString = "HTMLPictureElement" + @usableFromInline static let HTMLPreElement: JSString = "HTMLPreElement" + @usableFromInline static let HTMLProgressElement: JSString = "HTMLProgressElement" + @usableFromInline static let HTMLQuoteElement: JSString = "HTMLQuoteElement" + @usableFromInline static let HTMLScriptElement: JSString = "HTMLScriptElement" + @usableFromInline static let HTMLSelectElement: JSString = "HTMLSelectElement" + @usableFromInline static let HTMLSlotElement: JSString = "HTMLSlotElement" + @usableFromInline static let HTMLSourceElement: JSString = "HTMLSourceElement" + @usableFromInline static let HTMLSpanElement: JSString = "HTMLSpanElement" + @usableFromInline static let HTMLStyleElement: JSString = "HTMLStyleElement" + @usableFromInline static let HTMLTableCaptionElement: JSString = "HTMLTableCaptionElement" + @usableFromInline static let HTMLTableCellElement: JSString = "HTMLTableCellElement" + @usableFromInline static let HTMLTableColElement: JSString = "HTMLTableColElement" + @usableFromInline static let HTMLTableElement: JSString = "HTMLTableElement" + @usableFromInline static let HTMLTableRowElement: JSString = "HTMLTableRowElement" + @usableFromInline static let HTMLTableSectionElement: JSString = "HTMLTableSectionElement" + @usableFromInline static let HTMLTemplateElement: JSString = "HTMLTemplateElement" + @usableFromInline static let HTMLTextAreaElement: JSString = "HTMLTextAreaElement" + @usableFromInline static let HTMLTimeElement: JSString = "HTMLTimeElement" + @usableFromInline static let HTMLTitleElement: JSString = "HTMLTitleElement" + @usableFromInline static let HTMLTrackElement: JSString = "HTMLTrackElement" + @usableFromInline static let HTMLUListElement: JSString = "HTMLUListElement" + @usableFromInline static let HTMLUnknownElement: JSString = "HTMLUnknownElement" + @usableFromInline static let HTMLVideoElement: JSString = "HTMLVideoElement" + @usableFromInline static let HashChangeEvent: JSString = "HashChangeEvent" + @usableFromInline static let Headers: JSString = "Headers" + @usableFromInline static let History: JSString = "History" + @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" + @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" + @usableFromInline static let ImageData: JSString = "ImageData" + @usableFromInline static let InputEvent: JSString = "InputEvent" + @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" + @usableFromInline static let KeyboardEvent: JSString = "KeyboardEvent" + @usableFromInline static let KeyframeEffect: JSString = "KeyframeEffect" + @usableFromInline static let Location: JSString = "Location" + @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MessageChannel: JSString = "MessageChannel" + @usableFromInline static let MessageEvent: JSString = "MessageEvent" + @usableFromInline static let MessagePort: JSString = "MessagePort" + @usableFromInline static let MimeType: JSString = "MimeType" + @usableFromInline static let MimeTypeArray: JSString = "MimeTypeArray" + @usableFromInline static let MouseEvent: JSString = "MouseEvent" + @usableFromInline static let MutationEvent: JSString = "MutationEvent" + @usableFromInline static let MutationObserver: JSString = "MutationObserver" + @usableFromInline static let MutationRecord: JSString = "MutationRecord" + @usableFromInline static let NamedNodeMap: JSString = "NamedNodeMap" + @usableFromInline static let NavigationPreloadManager: JSString = "NavigationPreloadManager" + @usableFromInline static let Navigator: JSString = "Navigator" + @usableFromInline static let Node: JSString = "Node" + @usableFromInline static let NodeIterator: JSString = "NodeIterator" + @usableFromInline static let NodeList: JSString = "NodeList" + @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" + @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" + @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" + @usableFromInline static let Path2D: JSString = "Path2D" + @usableFromInline static let Performance: JSString = "Performance" + @usableFromInline static let Plugin: JSString = "Plugin" + @usableFromInline static let PluginArray: JSString = "PluginArray" + @usableFromInline static let PopStateEvent: JSString = "PopStateEvent" + @usableFromInline static let ProcessingInstruction: JSString = "ProcessingInstruction" + @usableFromInline static let ProgressEvent: JSString = "ProgressEvent" + @usableFromInline static let PromiseRejectionEvent: JSString = "PromiseRejectionEvent" + @usableFromInline static let RadioNodeList: JSString = "RadioNodeList" + @usableFromInline static let Range: JSString = "Range" + @usableFromInline static let ReadableByteStreamController: JSString = "ReadableByteStreamController" + @usableFromInline static let ReadableStream: JSString = "ReadableStream" + @usableFromInline static let ReadableStreamBYOBReader: JSString = "ReadableStreamBYOBReader" + @usableFromInline static let ReadableStreamBYOBRequest: JSString = "ReadableStreamBYOBRequest" + @usableFromInline static let ReadableStreamDefaultController: JSString = "ReadableStreamDefaultController" + @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" + @usableFromInline static let Request: JSString = "Request" + @usableFromInline static let Response: JSString = "Response" + @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" + @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" + @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" + @usableFromInline static let ShadowRoot: JSString = "ShadowRoot" + @usableFromInline static let SharedWorker: JSString = "SharedWorker" + @usableFromInline static let StaticRange: JSString = "StaticRange" + @usableFromInline static let Storage: JSString = "Storage" + @usableFromInline static let StorageEvent: JSString = "StorageEvent" + @usableFromInline static let SubmitEvent: JSString = "SubmitEvent" + @usableFromInline static let Text: JSString = "Text" + @usableFromInline static let TextMetrics: JSString = "TextMetrics" + @usableFromInline static let TextTrack: JSString = "TextTrack" + @usableFromInline static let TextTrackCue: JSString = "TextTrackCue" + @usableFromInline static let TextTrackCueList: JSString = "TextTrackCueList" + @usableFromInline static let TextTrackList: JSString = "TextTrackList" + @usableFromInline static let TimeRanges: JSString = "TimeRanges" + @usableFromInline static let TrackEvent: JSString = "TrackEvent" + @usableFromInline static let TransformStream: JSString = "TransformStream" + @usableFromInline static let TransformStreamDefaultController: JSString = "TransformStreamDefaultController" + @usableFromInline static let TreeWalker: JSString = "TreeWalker" + @usableFromInline static let UIEvent: JSString = "UIEvent" + @usableFromInline static let URL: JSString = "URL" + @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" + @usableFromInline static let ValidityState: JSString = "ValidityState" + @usableFromInline static let VideoTrack: JSString = "VideoTrack" + @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" + @usableFromInline static let WheelEvent: JSString = "WheelEvent" + @usableFromInline static let Window: JSString = "Window" + @usableFromInline static let Worker: JSString = "Worker" + @usableFromInline static let Worklet: JSString = "Worklet" + @usableFromInline static let WritableStream: JSString = "WritableStream" + @usableFromInline static let WritableStreamDefaultController: JSString = "WritableStreamDefaultController" + @usableFromInline static let WritableStreamDefaultWriter: JSString = "WritableStreamDefaultWriter" + @usableFromInline static let XMLDocument: JSString = "XMLDocument" + @usableFromInline static let XMLHttpRequest: JSString = "XMLHttpRequest" + @usableFromInline static let XMLHttpRequestEventTarget: JSString = "XMLHttpRequestEventTarget" + @usableFromInline static let XMLHttpRequestUpload: JSString = "XMLHttpRequestUpload" + @usableFromInline static let XPathEvaluator: JSString = "XPathEvaluator" + @usableFromInline static let XPathExpression: JSString = "XPathExpression" + @usableFromInline static let XPathResult: JSString = "XPathResult" + @usableFromInline static let XSLTProcessor: JSString = "XSLTProcessor" + @usableFromInline static let a: JSString = "a" + @usableFromInline static let aLink: JSString = "aLink" + @usableFromInline static let abbr: JSString = "abbr" + @usableFromInline static let abort: JSString = "abort" + @usableFromInline static let aborted: JSString = "aborted" + @usableFromInline static let accept: JSString = "accept" + @usableFromInline static let acceptCharset: JSString = "acceptCharset" + @usableFromInline static let accessKey: JSString = "accessKey" + @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" + @usableFromInline static let action: JSString = "action" + @usableFromInline static let active: JSString = "active" + @usableFromInline static let activeCues: JSString = "activeCues" + @usableFromInline static let activeElement: JSString = "activeElement" + @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" + @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" + @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" + @usableFromInline static let actualBoundingBoxRight: JSString = "actualBoundingBoxRight" + @usableFromInline static let add: JSString = "add" + @usableFromInline static let addAll: JSString = "addAll" + @usableFromInline static let addColorStop: JSString = "addColorStop" + @usableFromInline static let addCue: JSString = "addCue" + @usableFromInline static let addModule: JSString = "addModule" + @usableFromInline static let addPath: JSString = "addPath" + @usableFromInline static let addTextTrack: JSString = "addTextTrack" + @usableFromInline static let addedNodes: JSString = "addedNodes" + @usableFromInline static let adoptNode: JSString = "adoptNode" + @usableFromInline static let after: JSString = "after" + @usableFromInline static let alert: JSString = "alert" + @usableFromInline static let align: JSString = "align" + @usableFromInline static let alinkColor: JSString = "alinkColor" + @usableFromInline static let all: JSString = "all" + @usableFromInline static let allow: JSString = "allow" + @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" + @usableFromInline static let alpha: JSString = "alpha" + @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" + @usableFromInline static let alt: JSString = "alt" + @usableFromInline static let altKey: JSString = "altKey" + @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" + @usableFromInline static let anchors: JSString = "anchors" + @usableFromInline static let animate: JSString = "animate" + @usableFromInline static let appCodeName: JSString = "appCodeName" + @usableFromInline static let appName: JSString = "appName" + @usableFromInline static let appVersion: JSString = "appVersion" + @usableFromInline static let append: JSString = "append" + @usableFromInline static let appendChild: JSString = "appendChild" + @usableFromInline static let appendData: JSString = "appendData" + @usableFromInline static let applets: JSString = "applets" + @usableFromInline static let arc: JSString = "arc" + @usableFromInline static let arcTo: JSString = "arcTo" + @usableFromInline static let archive: JSString = "archive" + @usableFromInline static let areas: JSString = "areas" + @usableFromInline static let ariaAtomic: JSString = "ariaAtomic" + @usableFromInline static let ariaAutoComplete: JSString = "ariaAutoComplete" + @usableFromInline static let ariaBusy: JSString = "ariaBusy" + @usableFromInline static let ariaChecked: JSString = "ariaChecked" + @usableFromInline static let ariaColCount: JSString = "ariaColCount" + @usableFromInline static let ariaColIndex: JSString = "ariaColIndex" + @usableFromInline static let ariaColIndexText: JSString = "ariaColIndexText" + @usableFromInline static let ariaColSpan: JSString = "ariaColSpan" + @usableFromInline static let ariaCurrent: JSString = "ariaCurrent" + @usableFromInline static let ariaDescription: JSString = "ariaDescription" + @usableFromInline static let ariaDisabled: JSString = "ariaDisabled" + @usableFromInline static let ariaExpanded: JSString = "ariaExpanded" + @usableFromInline static let ariaHasPopup: JSString = "ariaHasPopup" + @usableFromInline static let ariaHidden: JSString = "ariaHidden" + @usableFromInline static let ariaInvalid: JSString = "ariaInvalid" + @usableFromInline static let ariaKeyShortcuts: JSString = "ariaKeyShortcuts" + @usableFromInline static let ariaLabel: JSString = "ariaLabel" + @usableFromInline static let ariaLevel: JSString = "ariaLevel" + @usableFromInline static let ariaLive: JSString = "ariaLive" + @usableFromInline static let ariaModal: JSString = "ariaModal" + @usableFromInline static let ariaMultiLine: JSString = "ariaMultiLine" + @usableFromInline static let ariaMultiSelectable: JSString = "ariaMultiSelectable" + @usableFromInline static let ariaOrientation: JSString = "ariaOrientation" + @usableFromInline static let ariaPlaceholder: JSString = "ariaPlaceholder" + @usableFromInline static let ariaPosInSet: JSString = "ariaPosInSet" + @usableFromInline static let ariaPressed: JSString = "ariaPressed" + @usableFromInline static let ariaReadOnly: JSString = "ariaReadOnly" + @usableFromInline static let ariaRequired: JSString = "ariaRequired" + @usableFromInline static let ariaRoleDescription: JSString = "ariaRoleDescription" + @usableFromInline static let ariaRowCount: JSString = "ariaRowCount" + @usableFromInline static let ariaRowIndex: JSString = "ariaRowIndex" + @usableFromInline static let ariaRowIndexText: JSString = "ariaRowIndexText" + @usableFromInline static let ariaRowSpan: JSString = "ariaRowSpan" + @usableFromInline static let ariaSelected: JSString = "ariaSelected" + @usableFromInline static let ariaSetSize: JSString = "ariaSetSize" + @usableFromInline static let ariaSort: JSString = "ariaSort" + @usableFromInline static let ariaValueMax: JSString = "ariaValueMax" + @usableFromInline static let ariaValueMin: JSString = "ariaValueMin" + @usableFromInline static let ariaValueNow: JSString = "ariaValueNow" + @usableFromInline static let ariaValueText: JSString = "ariaValueText" + @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" + @usableFromInline static let `as`: JSString = "as" + @usableFromInline static let assert: JSString = "assert" + @usableFromInline static let assign: JSString = "assign" + @usableFromInline static let assignedElements: JSString = "assignedElements" + @usableFromInline static let assignedNodes: JSString = "assignedNodes" + @usableFromInline static let assignedSlot: JSString = "assignedSlot" + @usableFromInline static let async: JSString = "async" + @usableFromInline static let atob: JSString = "atob" + @usableFromInline static let attachInternals: JSString = "attachInternals" + @usableFromInline static let attachShadow: JSString = "attachShadow" + @usableFromInline static let attrChange: JSString = "attrChange" + @usableFromInline static let attrName: JSString = "attrName" + @usableFromInline static let attributeFilter: JSString = "attributeFilter" + @usableFromInline static let attributeName: JSString = "attributeName" + @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" + @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" + @usableFromInline static let attributes: JSString = "attributes" + @usableFromInline static let audioTracks: JSString = "audioTracks" + @usableFromInline static let autoAllocateChunkSize: JSString = "autoAllocateChunkSize" + @usableFromInline static let autocapitalize: JSString = "autocapitalize" + @usableFromInline static let autocomplete: JSString = "autocomplete" + @usableFromInline static let autofocus: JSString = "autofocus" + @usableFromInline static let autoplay: JSString = "autoplay" + @usableFromInline static let axis: JSString = "axis" + @usableFromInline static let b: JSString = "b" + @usableFromInline static let back: JSString = "back" + @usableFromInline static let background: JSString = "background" + @usableFromInline static let badInput: JSString = "badInput" + @usableFromInline static let baseURI: JSString = "baseURI" + @usableFromInline static let before: JSString = "before" + @usableFromInline static let beginPath: JSString = "beginPath" + @usableFromInline static let behavior: JSString = "behavior" + @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" + @usableFromInline static let bgColor: JSString = "bgColor" + @usableFromInline static let blob: JSString = "blob" + @usableFromInline static let blocking: JSString = "blocking" + @usableFromInline static let blur: JSString = "blur" + @usableFromInline static let body: JSString = "body" + @usableFromInline static let bodyUsed: JSString = "bodyUsed" + @usableFromInline static let booleanValue: JSString = "booleanValue" + @usableFromInline static let border: JSString = "border" + @usableFromInline static let bottom: JSString = "bottom" + @usableFromInline static let btoa: JSString = "btoa" + @usableFromInline static let bubbles: JSString = "bubbles" + @usableFromInline static let buffered: JSString = "buffered" + @usableFromInline static let button: JSString = "button" + @usableFromInline static let buttons: JSString = "buttons" + @usableFromInline static let byobRequest: JSString = "byobRequest" + @usableFromInline static let c: JSString = "c" + @usableFromInline static let cache: JSString = "cache" + @usableFromInline static let cacheName: JSString = "cacheName" + @usableFromInline static let caches: JSString = "caches" + @usableFromInline static let canPlayType: JSString = "canPlayType" + @usableFromInline static let cancel: JSString = "cancel" + @usableFromInline static let cancelAnimationFrame: JSString = "cancelAnimationFrame" + @usableFromInline static let cancelBubble: JSString = "cancelBubble" + @usableFromInline static let cancelable: JSString = "cancelable" + @usableFromInline static let canvas: JSString = "canvas" + @usableFromInline static let caption: JSString = "caption" + @usableFromInline static let capture: JSString = "capture" + @usableFromInline static let captureEvents: JSString = "captureEvents" + @usableFromInline static let cellIndex: JSString = "cellIndex" + @usableFromInline static let cellPadding: JSString = "cellPadding" + @usableFromInline static let cellSpacing: JSString = "cellSpacing" + @usableFromInline static let cells: JSString = "cells" + @usableFromInline static let ch: JSString = "ch" + @usableFromInline static let chOff: JSString = "chOff" + @usableFromInline static let charCode: JSString = "charCode" + @usableFromInline static let characterData: JSString = "characterData" + @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" + @usableFromInline static let characterSet: JSString = "characterSet" + @usableFromInline static let charset: JSString = "charset" + @usableFromInline static let checkValidity: JSString = "checkValidity" + @usableFromInline static let checked: JSString = "checked" + @usableFromInline static let childElementCount: JSString = "childElementCount" + @usableFromInline static let childList: JSString = "childList" + @usableFromInline static let childNodes: JSString = "childNodes" + @usableFromInline static let children: JSString = "children" + @usableFromInline static let cite: JSString = "cite" + @usableFromInline static let classList: JSString = "classList" + @usableFromInline static let className: JSString = "className" + @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearData: JSString = "clearData" + @usableFromInline static let clearInterval: JSString = "clearInterval" + @usableFromInline static let clearParameters: JSString = "clearParameters" + @usableFromInline static let clearRect: JSString = "clearRect" + @usableFromInline static let clearTimeout: JSString = "clearTimeout" + @usableFromInline static let click: JSString = "click" + @usableFromInline static let clientId: JSString = "clientId" + @usableFromInline static let clientInformation: JSString = "clientInformation" + @usableFromInline static let clientX: JSString = "clientX" + @usableFromInline static let clientY: JSString = "clientY" + @usableFromInline static let clip: JSString = "clip" + @usableFromInline static let clone: JSString = "clone" + @usableFromInline static let cloneContents: JSString = "cloneContents" + @usableFromInline static let cloneNode: JSString = "cloneNode" + @usableFromInline static let cloneRange: JSString = "cloneRange" + @usableFromInline static let close: JSString = "close" + @usableFromInline static let closePath: JSString = "closePath" + @usableFromInline static let closed: JSString = "closed" + @usableFromInline static let closest: JSString = "closest" + @usableFromInline static let code: JSString = "code" + @usableFromInline static let codeBase: JSString = "codeBase" + @usableFromInline static let codeType: JSString = "codeType" + @usableFromInline static let colSpan: JSString = "colSpan" + @usableFromInline static let collapse: JSString = "collapse" + @usableFromInline static let collapsed: JSString = "collapsed" + @usableFromInline static let colno: JSString = "colno" + @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorSpace: JSString = "colorSpace" + @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" + @usableFromInline static let cols: JSString = "cols" + @usableFromInline static let commit: JSString = "commit" + @usableFromInline static let commitStyles: JSString = "commitStyles" + @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" + @usableFromInline static let compact: JSString = "compact" + @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" + @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" + @usableFromInline static let comparePoint: JSString = "comparePoint" + @usableFromInline static let compatMode: JSString = "compatMode" + @usableFromInline static let complete: JSString = "complete" + @usableFromInline static let composed: JSString = "composed" + @usableFromInline static let composedPath: JSString = "composedPath" + @usableFromInline static let composite: JSString = "composite" + @usableFromInline static let computedOffset: JSString = "computedOffset" + @usableFromInline static let confirm: JSString = "confirm" + @usableFromInline static let console: JSString = "console" + @usableFromInline static let contains: JSString = "contains" + @usableFromInline static let content: JSString = "content" + @usableFromInline static let contentDocument: JSString = "contentDocument" + @usableFromInline static let contentEditable: JSString = "contentEditable" + @usableFromInline static let contentType: JSString = "contentType" + @usableFromInline static let contentWindow: JSString = "contentWindow" + @usableFromInline static let control: JSString = "control" + @usableFromInline static let controller: JSString = "controller" + @usableFromInline static let controls: JSString = "controls" + @usableFromInline static let convertToBlob: JSString = "convertToBlob" + @usableFromInline static let cookie: JSString = "cookie" + @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" + @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let count: JSString = "count" + @usableFromInline static let countReset: JSString = "countReset" + @usableFromInline static let createAttribute: JSString = "createAttribute" + @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" + @usableFromInline static let createCDATASection: JSString = "createCDATASection" + @usableFromInline static let createCaption: JSString = "createCaption" + @usableFromInline static let createComment: JSString = "createComment" + @usableFromInline static let createConicGradient: JSString = "createConicGradient" + @usableFromInline static let createDocument: JSString = "createDocument" + @usableFromInline static let createDocumentFragment: JSString = "createDocumentFragment" + @usableFromInline static let createDocumentType: JSString = "createDocumentType" + @usableFromInline static let createElement: JSString = "createElement" + @usableFromInline static let createElementNS: JSString = "createElementNS" + @usableFromInline static let createEvent: JSString = "createEvent" + @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" + @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" + @usableFromInline static let createImageData: JSString = "createImageData" + @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" + @usableFromInline static let createObjectURL: JSString = "createObjectURL" + @usableFromInline static let createPattern: JSString = "createPattern" + @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" + @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" + @usableFromInline static let createRange: JSString = "createRange" + @usableFromInline static let createTBody: JSString = "createTBody" + @usableFromInline static let createTFoot: JSString = "createTFoot" + @usableFromInline static let createTHead: JSString = "createTHead" + @usableFromInline static let createTextNode: JSString = "createTextNode" + @usableFromInline static let credentials: JSString = "credentials" + @usableFromInline static let crossOrigin: JSString = "crossOrigin" + @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" + @usableFromInline static let ctrlKey: JSString = "ctrlKey" + @usableFromInline static let cues: JSString = "cues" + @usableFromInline static let currentIteration: JSString = "currentIteration" + @usableFromInline static let currentNode: JSString = "currentNode" + @usableFromInline static let currentScript: JSString = "currentScript" + @usableFromInline static let currentSrc: JSString = "currentSrc" + @usableFromInline static let currentTarget: JSString = "currentTarget" + @usableFromInline static let currentTime: JSString = "currentTime" + @usableFromInline static let customElements: JSString = "customElements" + @usableFromInline static let customError: JSString = "customError" + @usableFromInline static let d: JSString = "d" + @usableFromInline static let data: JSString = "data" + @usableFromInline static let dataTransfer: JSString = "dataTransfer" + @usableFromInline static let dataset: JSString = "dataset" + @usableFromInline static let dateTime: JSString = "dateTime" + @usableFromInline static let debug: JSString = "debug" + @usableFromInline static let declare: JSString = "declare" + @usableFromInline static let decode: JSString = "decode" + @usableFromInline static let decoding: JSString = "decoding" + @usableFromInline static let `default`: JSString = "default" + @usableFromInline static let defaultChecked: JSString = "defaultChecked" + @usableFromInline static let defaultMuted: JSString = "defaultMuted" + @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" + @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" + @usableFromInline static let defaultSelected: JSString = "defaultSelected" + @usableFromInline static let defaultValue: JSString = "defaultValue" + @usableFromInline static let defaultView: JSString = "defaultView" + @usableFromInline static let `defer`: JSString = "defer" + @usableFromInline static let define: JSString = "define" + @usableFromInline static let delay: JSString = "delay" + @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" + @usableFromInline static let delete: JSString = "delete" + @usableFromInline static let deleteCaption: JSString = "deleteCaption" + @usableFromInline static let deleteCell: JSString = "deleteCell" + @usableFromInline static let deleteContents: JSString = "deleteContents" + @usableFromInline static let deleteData: JSString = "deleteData" + @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" + @usableFromInline static let deleteTHead: JSString = "deleteTHead" + @usableFromInline static let deltaMode: JSString = "deltaMode" + @usableFromInline static let deltaX: JSString = "deltaX" + @usableFromInline static let deltaY: JSString = "deltaY" + @usableFromInline static let deltaZ: JSString = "deltaZ" + @usableFromInline static let description: JSString = "description" + @usableFromInline static let designMode: JSString = "designMode" + @usableFromInline static let desiredSize: JSString = "desiredSize" + @usableFromInline static let destination: JSString = "destination" + @usableFromInline static let desynchronized: JSString = "desynchronized" + @usableFromInline static let detach: JSString = "detach" + @usableFromInline static let detail: JSString = "detail" + @usableFromInline static let dir: JSString = "dir" + @usableFromInline static let dirName: JSString = "dirName" + @usableFromInline static let direction: JSString = "direction" + @usableFromInline static let dirxml: JSString = "dirxml" + @usableFromInline static let disable: JSString = "disable" + @usableFromInline static let disabled: JSString = "disabled" + @usableFromInline static let disconnect: JSString = "disconnect" + @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" + @usableFromInline static let doctype: JSString = "doctype" + @usableFromInline static let document: JSString = "document" + @usableFromInline static let documentElement: JSString = "documentElement" + @usableFromInline static let documentURI: JSString = "documentURI" + @usableFromInline static let domain: JSString = "domain" + @usableFromInline static let done: JSString = "done" + @usableFromInline static let download: JSString = "download" + @usableFromInline static let draggable: JSString = "draggable" + @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" + @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let dropEffect: JSString = "dropEffect" + @usableFromInline static let duration: JSString = "duration" + @usableFromInline static let e: JSString = "e" + @usableFromInline static let easing: JSString = "easing" + @usableFromInline static let effect: JSString = "effect" + @usableFromInline static let effectAllowed: JSString = "effectAllowed" + @usableFromInline static let elements: JSString = "elements" + @usableFromInline static let ellipse: JSString = "ellipse" + @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" + @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" + @usableFromInline static let embeds: JSString = "embeds" + @usableFromInline static let enable: JSString = "enable" + @usableFromInline static let enabled: JSString = "enabled" + @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" + @usableFromInline static let encoding: JSString = "encoding" + @usableFromInline static let enctype: JSString = "enctype" + @usableFromInline static let end: JSString = "end" + @usableFromInline static let endContainer: JSString = "endContainer" + @usableFromInline static let endDelay: JSString = "endDelay" + @usableFromInline static let endOffset: JSString = "endOffset" + @usableFromInline static let endTime: JSString = "endTime" + @usableFromInline static let ended: JSString = "ended" + @usableFromInline static let endings: JSString = "endings" + @usableFromInline static let enqueue: JSString = "enqueue" + @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" + @usableFromInline static let error: JSString = "error" + @usableFromInline static let evaluate: JSString = "evaluate" + @usableFromInline static let event: JSString = "event" + @usableFromInline static let eventPhase: JSString = "eventPhase" + @usableFromInline static let execCommand: JSString = "execCommand" + @usableFromInline static let extends: JSString = "extends" + @usableFromInline static let external: JSString = "external" + @usableFromInline static let extractContents: JSString = "extractContents" + @usableFromInline static let f: JSString = "f" + @usableFromInline static let face: JSString = "face" + @usableFromInline static let fastSeek: JSString = "fastSeek" + @usableFromInline static let fetch: JSString = "fetch" + @usableFromInline static let fgColor: JSString = "fgColor" + @usableFromInline static let filename: JSString = "filename" + @usableFromInline static let files: JSString = "files" + @usableFromInline static let fill: JSString = "fill" + @usableFromInline static let fillRect: JSString = "fillRect" + @usableFromInline static let fillStyle: JSString = "fillStyle" + @usableFromInline static let fillText: JSString = "fillText" + @usableFromInline static let filter: JSString = "filter" + @usableFromInline static let finish: JSString = "finish" + @usableFromInline static let finished: JSString = "finished" + @usableFromInline static let firstChild: JSString = "firstChild" + @usableFromInline static let firstElementChild: JSString = "firstElementChild" + @usableFromInline static let flatten: JSString = "flatten" + @usableFromInline static let flipX: JSString = "flipX" + @usableFromInline static let flipY: JSString = "flipY" + @usableFromInline static let flush: JSString = "flush" + @usableFromInline static let focus: JSString = "focus" + @usableFromInline static let font: JSString = "font" + @usableFromInline static let fontBoundingBoxAscent: JSString = "fontBoundingBoxAscent" + @usableFromInline static let fontBoundingBoxDescent: JSString = "fontBoundingBoxDescent" + @usableFromInline static let fontKerning: JSString = "fontKerning" + @usableFromInline static let fontStretch: JSString = "fontStretch" + @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" + @usableFromInline static let form: JSString = "form" + @usableFromInline static let formAction: JSString = "formAction" + @usableFromInline static let formData: JSString = "formData" + @usableFromInline static let formEnctype: JSString = "formEnctype" + @usableFromInline static let formMethod: JSString = "formMethod" + @usableFromInline static let formNoValidate: JSString = "formNoValidate" + @usableFromInline static let formTarget: JSString = "formTarget" + @usableFromInline static let forms: JSString = "forms" + @usableFromInline static let forward: JSString = "forward" + @usableFromInline static let frame: JSString = "frame" + @usableFromInline static let frameBorder: JSString = "frameBorder" + @usableFromInline static let frameElement: JSString = "frameElement" + @usableFromInline static let frames: JSString = "frames" + @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" + @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" + @usableFromInline static let fromMatrix: JSString = "fromMatrix" + @usableFromInline static let fromPoint: JSString = "fromPoint" + @usableFromInline static let fromQuad: JSString = "fromQuad" + @usableFromInline static let fromRect: JSString = "fromRect" + @usableFromInline static let get: JSString = "get" + @usableFromInline static let getAll: JSString = "getAll" + @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" + @usableFromInline static let getAnimations: JSString = "getAnimations" + @usableFromInline static let getAsFile: JSString = "getAsFile" + @usableFromInline static let getAttribute: JSString = "getAttribute" + @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" + @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" + @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" + @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" + @usableFromInline static let getBounds: JSString = "getBounds" + @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" + @usableFromInline static let getContext: JSString = "getContext" + @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" + @usableFromInline static let getCueById: JSString = "getCueById" + @usableFromInline static let getData: JSString = "getData" + @usableFromInline static let getElementById: JSString = "getElementById" + @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" + @usableFromInline static let getElementsByName: JSString = "getElementsByName" + @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" + @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" + @usableFromInline static let getImageData: JSString = "getImageData" + @usableFromInline static let getKeyframes: JSString = "getKeyframes" + @usableFromInline static let getLineDash: JSString = "getLineDash" + @usableFromInline static let getModifierState: JSString = "getModifierState" + @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" + @usableFromInline static let getParameter: JSString = "getParameter" + @usableFromInline static let getReader: JSString = "getReader" + @usableFromInline static let getRegistration: JSString = "getRegistration" + @usableFromInline static let getRegistrations: JSString = "getRegistrations" + @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" + @usableFromInline static let getRootNode: JSString = "getRootNode" + @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getStartDate: JSString = "getStartDate" + @usableFromInline static let getState: JSString = "getState" + @usableFromInline static let getTiming: JSString = "getTiming" + @usableFromInline static let getTrackById: JSString = "getTrackById" + @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getWriter: JSString = "getWriter" + @usableFromInline static let globalAlpha: JSString = "globalAlpha" + @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" + @usableFromInline static let go: JSString = "go" + @usableFromInline static let group: JSString = "group" + @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" + @usableFromInline static let groupEnd: JSString = "groupEnd" + @usableFromInline static let handled: JSString = "handled" + @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" + @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" + @usableFromInline static let has: JSString = "has" + @usableFromInline static let hasAttribute: JSString = "hasAttribute" + @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" + @usableFromInline static let hasAttributes: JSString = "hasAttributes" + @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" + @usableFromInline static let hasFeature: JSString = "hasFeature" + @usableFromInline static let hasFocus: JSString = "hasFocus" + @usableFromInline static let hash: JSString = "hash" + @usableFromInline static let head: JSString = "head" + @usableFromInline static let headerValue: JSString = "headerValue" + @usableFromInline static let headers: JSString = "headers" + @usableFromInline static let height: JSString = "height" + @usableFromInline static let hidden: JSString = "hidden" + @usableFromInline static let high: JSString = "high" + @usableFromInline static let highWaterMark: JSString = "highWaterMark" + @usableFromInline static let history: JSString = "history" + @usableFromInline static let host: JSString = "host" + @usableFromInline static let hostname: JSString = "hostname" + @usableFromInline static let href: JSString = "href" + @usableFromInline static let hreflang: JSString = "hreflang" + @usableFromInline static let hspace: JSString = "hspace" + @usableFromInline static let htmlFor: JSString = "htmlFor" + @usableFromInline static let httpEquiv: JSString = "httpEquiv" + @usableFromInline static let id: JSString = "id" + @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" + @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" + @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" + @usableFromInline static let ignoreVary: JSString = "ignoreVary" + @usableFromInline static let imageOrientation: JSString = "imageOrientation" + @usableFromInline static let imageSizes: JSString = "imageSizes" + @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" + @usableFromInline static let imageSmoothingQuality: JSString = "imageSmoothingQuality" + @usableFromInline static let imageSrcset: JSString = "imageSrcset" + @usableFromInline static let images: JSString = "images" + @usableFromInline static let implementation: JSString = "implementation" + @usableFromInline static let importNode: JSString = "importNode" + @usableFromInline static let importStylesheet: JSString = "importStylesheet" + @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" + @usableFromInline static let includeUncontrolled: JSString = "includeUncontrolled" + @usableFromInline static let indeterminate: JSString = "indeterminate" + @usableFromInline static let index: JSString = "index" + @usableFromInline static let inert: JSString = "inert" + @usableFromInline static let info: JSString = "info" + @usableFromInline static let initCompositionEvent: JSString = "initCompositionEvent" + @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" + @usableFromInline static let initEvent: JSString = "initEvent" + @usableFromInline static let initKeyboardEvent: JSString = "initKeyboardEvent" + @usableFromInline static let initMessageEvent: JSString = "initMessageEvent" + @usableFromInline static let initMouseEvent: JSString = "initMouseEvent" + @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" + @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" + @usableFromInline static let initUIEvent: JSString = "initUIEvent" + @usableFromInline static let innerText: JSString = "innerText" + @usableFromInline static let inputEncoding: JSString = "inputEncoding" + @usableFromInline static let inputMode: JSString = "inputMode" + @usableFromInline static let inputType: JSString = "inputType" + @usableFromInline static let insertAdjacentElement: JSString = "insertAdjacentElement" + @usableFromInline static let insertAdjacentText: JSString = "insertAdjacentText" + @usableFromInline static let insertBefore: JSString = "insertBefore" + @usableFromInline static let insertCell: JSString = "insertCell" + @usableFromInline static let insertData: JSString = "insertData" + @usableFromInline static let insertNode: JSString = "insertNode" + @usableFromInline static let insertRow: JSString = "insertRow" + @usableFromInline static let installing: JSString = "installing" + @usableFromInline static let integrity: JSString = "integrity" + @usableFromInline static let intersectsNode: JSString = "intersectsNode" + @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" + @usableFromInline static let inverse: JSString = "inverse" + @usableFromInline static let invertSelf: JSString = "invertSelf" + @usableFromInline static let `is`: JSString = "is" + @usableFromInline static let is2D: JSString = "is2D" + @usableFromInline static let isComposing: JSString = "isComposing" + @usableFromInline static let isConnected: JSString = "isConnected" + @usableFromInline static let isContentEditable: JSString = "isContentEditable" + @usableFromInline static let isContextLost: JSString = "isContextLost" + @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" + @usableFromInline static let isEqualNode: JSString = "isEqualNode" + @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" + @usableFromInline static let isIdentity: JSString = "isIdentity" + @usableFromInline static let isMap: JSString = "isMap" + @usableFromInline static let isPointInPath: JSString = "isPointInPath" + @usableFromInline static let isPointInRange: JSString = "isPointInRange" + @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" + @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" + @usableFromInline static let isSameNode: JSString = "isSameNode" + @usableFromInline static let isSecureContext: JSString = "isSecureContext" + @usableFromInline static let isTrusted: JSString = "isTrusted" + @usableFromInline static let item: JSString = "item" + @usableFromInline static let items: JSString = "items" + @usableFromInline static let iterateNext: JSString = "iterateNext" + @usableFromInline static let iterationStart: JSString = "iterationStart" + @usableFromInline static let iterations: JSString = "iterations" + @usableFromInline static let javaEnabled: JSString = "javaEnabled" + @usableFromInline static let json: JSString = "json" + @usableFromInline static let keepalive: JSString = "keepalive" + @usableFromInline static let key: JSString = "key" + @usableFromInline static let keyCode: JSString = "keyCode" + @usableFromInline static let keys: JSString = "keys" + @usableFromInline static let kind: JSString = "kind" + @usableFromInline static let label: JSString = "label" + @usableFromInline static let labels: JSString = "labels" + @usableFromInline static let lang: JSString = "lang" + @usableFromInline static let language: JSString = "language" + @usableFromInline static let languages: JSString = "languages" + @usableFromInline static let lastChild: JSString = "lastChild" + @usableFromInline static let lastElementChild: JSString = "lastElementChild" + @usableFromInline static let lastEventId: JSString = "lastEventId" + @usableFromInline static let lastModified: JSString = "lastModified" + @usableFromInline static let left: JSString = "left" + @usableFromInline static let length: JSString = "length" + @usableFromInline static let lengthComputable: JSString = "lengthComputable" + @usableFromInline static let letterSpacing: JSString = "letterSpacing" + @usableFromInline static let lineCap: JSString = "lineCap" + @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" + @usableFromInline static let lineJoin: JSString = "lineJoin" + @usableFromInline static let lineTo: JSString = "lineTo" + @usableFromInline static let lineWidth: JSString = "lineWidth" + @usableFromInline static let lineno: JSString = "lineno" + @usableFromInline static let link: JSString = "link" + @usableFromInline static let linkColor: JSString = "linkColor" + @usableFromInline static let links: JSString = "links" + @usableFromInline static let list: JSString = "list" + @usableFromInline static let load: JSString = "load" + @usableFromInline static let loaded: JSString = "loaded" + @usableFromInline static let loading: JSString = "loading" + @usableFromInline static let localName: JSString = "localName" + @usableFromInline static let localStorage: JSString = "localStorage" + @usableFromInline static let location: JSString = "location" + @usableFromInline static let locationbar: JSString = "locationbar" + @usableFromInline static let locked: JSString = "locked" + @usableFromInline static let log: JSString = "log" + @usableFromInline static let longDesc: JSString = "longDesc" + @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" + @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" + @usableFromInline static let loop: JSString = "loop" + @usableFromInline static let low: JSString = "low" + @usableFromInline static let lowsrc: JSString = "lowsrc" + @usableFromInline static let m11: JSString = "m11" + @usableFromInline static let m12: JSString = "m12" + @usableFromInline static let m13: JSString = "m13" + @usableFromInline static let m14: JSString = "m14" + @usableFromInline static let m21: JSString = "m21" + @usableFromInline static let m22: JSString = "m22" + @usableFromInline static let m23: JSString = "m23" + @usableFromInline static let m24: JSString = "m24" + @usableFromInline static let m31: JSString = "m31" + @usableFromInline static let m32: JSString = "m32" + @usableFromInline static let m33: JSString = "m33" + @usableFromInline static let m34: JSString = "m34" + @usableFromInline static let m41: JSString = "m41" + @usableFromInline static let m42: JSString = "m42" + @usableFromInline static let m43: JSString = "m43" + @usableFromInline static let m44: JSString = "m44" + @usableFromInline static let marginHeight: JSString = "marginHeight" + @usableFromInline static let marginWidth: JSString = "marginWidth" + @usableFromInline static let match: JSString = "match" + @usableFromInline static let matchAll: JSString = "matchAll" + @usableFromInline static let matches: JSString = "matches" + @usableFromInline static let matrixTransform: JSString = "matrixTransform" + @usableFromInline static let max: JSString = "max" + @usableFromInline static let maxLength: JSString = "maxLength" + @usableFromInline static let measureText: JSString = "measureText" + @usableFromInline static let media: JSString = "media" + @usableFromInline static let menubar: JSString = "menubar" + @usableFromInline static let message: JSString = "message" + @usableFromInline static let metaKey: JSString = "metaKey" + @usableFromInline static let method: JSString = "method" + @usableFromInline static let mimeTypes: JSString = "mimeTypes" + @usableFromInline static let min: JSString = "min" + @usableFromInline static let minLength: JSString = "minLength" + @usableFromInline static let miterLimit: JSString = "miterLimit" + @usableFromInline static let mode: JSString = "mode" + @usableFromInline static let modifierAltGraph: JSString = "modifierAltGraph" + @usableFromInline static let modifierCapsLock: JSString = "modifierCapsLock" + @usableFromInline static let modifierFn: JSString = "modifierFn" + @usableFromInline static let modifierFnLock: JSString = "modifierFnLock" + @usableFromInline static let modifierHyper: JSString = "modifierHyper" + @usableFromInline static let modifierNumLock: JSString = "modifierNumLock" + @usableFromInline static let modifierScrollLock: JSString = "modifierScrollLock" + @usableFromInline static let modifierSuper: JSString = "modifierSuper" + @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" + @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" + @usableFromInline static let moveTo: JSString = "moveTo" + @usableFromInline static let multiple: JSString = "multiple" + @usableFromInline static let multiply: JSString = "multiply" + @usableFromInline static let multiplySelf: JSString = "multiplySelf" + @usableFromInline static let muted: JSString = "muted" + @usableFromInline static let name: JSString = "name" + @usableFromInline static let namedItem: JSString = "namedItem" + @usableFromInline static let namespaceURI: JSString = "namespaceURI" + @usableFromInline static let naturalHeight: JSString = "naturalHeight" + @usableFromInline static let naturalWidth: JSString = "naturalWidth" + @usableFromInline static let navigationPreload: JSString = "navigationPreload" + @usableFromInline static let navigator: JSString = "navigator" + @usableFromInline static let networkState: JSString = "networkState" + @usableFromInline static let newURL: JSString = "newURL" + @usableFromInline static let newValue: JSString = "newValue" + @usableFromInline static let nextElementSibling: JSString = "nextElementSibling" + @usableFromInline static let nextNode: JSString = "nextNode" + @usableFromInline static let nextSibling: JSString = "nextSibling" + @usableFromInline static let noHref: JSString = "noHref" + @usableFromInline static let noModule: JSString = "noModule" + @usableFromInline static let noResize: JSString = "noResize" + @usableFromInline static let noShade: JSString = "noShade" + @usableFromInline static let noValidate: JSString = "noValidate" + @usableFromInline static let noWrap: JSString = "noWrap" + @usableFromInline static let nodeName: JSString = "nodeName" + @usableFromInline static let nodeType: JSString = "nodeType" + @usableFromInline static let nodeValue: JSString = "nodeValue" + @usableFromInline static let nonce: JSString = "nonce" + @usableFromInline static let normalize: JSString = "normalize" + @usableFromInline static let now: JSString = "now" + @usableFromInline static let numberValue: JSString = "numberValue" + @usableFromInline static let observe: JSString = "observe" + @usableFromInline static let offset: JSString = "offset" + @usableFromInline static let ok: JSString = "ok" + @usableFromInline static let oldURL: JSString = "oldURL" + @usableFromInline static let oldValue: JSString = "oldValue" + @usableFromInline static let onLine: JSString = "onLine" + @usableFromInline static let onabort: JSString = "onabort" + @usableFromInline static let onaddtrack: JSString = "onaddtrack" + @usableFromInline static let onafterprint: JSString = "onafterprint" + @usableFromInline static let onauxclick: JSString = "onauxclick" + @usableFromInline static let onbeforeprint: JSString = "onbeforeprint" + @usableFromInline static let onbeforeunload: JSString = "onbeforeunload" + @usableFromInline static let onblur: JSString = "onblur" + @usableFromInline static let oncancel: JSString = "oncancel" + @usableFromInline static let oncanplay: JSString = "oncanplay" + @usableFromInline static let oncanplaythrough: JSString = "oncanplaythrough" + @usableFromInline static let once: JSString = "once" + @usableFromInline static let onchange: JSString = "onchange" + @usableFromInline static let onclick: JSString = "onclick" + @usableFromInline static let onclose: JSString = "onclose" + @usableFromInline static let oncontextlost: JSString = "oncontextlost" + @usableFromInline static let oncontextmenu: JSString = "oncontextmenu" + @usableFromInline static let oncontextrestored: JSString = "oncontextrestored" + @usableFromInline static let oncontrollerchange: JSString = "oncontrollerchange" + @usableFromInline static let oncopy: JSString = "oncopy" + @usableFromInline static let oncuechange: JSString = "oncuechange" + @usableFromInline static let oncut: JSString = "oncut" + @usableFromInline static let ondblclick: JSString = "ondblclick" + @usableFromInline static let ondrag: JSString = "ondrag" + @usableFromInline static let ondragend: JSString = "ondragend" + @usableFromInline static let ondragenter: JSString = "ondragenter" + @usableFromInline static let ondragleave: JSString = "ondragleave" + @usableFromInline static let ondragover: JSString = "ondragover" + @usableFromInline static let ondragstart: JSString = "ondragstart" + @usableFromInline static let ondrop: JSString = "ondrop" + @usableFromInline static let ondurationchange: JSString = "ondurationchange" + @usableFromInline static let onemptied: JSString = "onemptied" + @usableFromInline static let onended: JSString = "onended" + @usableFromInline static let onenter: JSString = "onenter" + @usableFromInline static let onerror: JSString = "onerror" + @usableFromInline static let onexit: JSString = "onexit" + @usableFromInline static let onfinish: JSString = "onfinish" + @usableFromInline static let onfocus: JSString = "onfocus" + @usableFromInline static let onformdata: JSString = "onformdata" + @usableFromInline static let onhashchange: JSString = "onhashchange" + @usableFromInline static let oninput: JSString = "oninput" + @usableFromInline static let oninvalid: JSString = "oninvalid" + @usableFromInline static let onkeydown: JSString = "onkeydown" + @usableFromInline static let onkeypress: JSString = "onkeypress" + @usableFromInline static let onkeyup: JSString = "onkeyup" + @usableFromInline static let onlanguagechange: JSString = "onlanguagechange" + @usableFromInline static let onload: JSString = "onload" + @usableFromInline static let onloadeddata: JSString = "onloadeddata" + @usableFromInline static let onloadedmetadata: JSString = "onloadedmetadata" + @usableFromInline static let onloadend: JSString = "onloadend" + @usableFromInline static let onloadstart: JSString = "onloadstart" + @usableFromInline static let onmessage: JSString = "onmessage" + @usableFromInline static let onmessageerror: JSString = "onmessageerror" + @usableFromInline static let onmousedown: JSString = "onmousedown" + @usableFromInline static let onmouseenter: JSString = "onmouseenter" + @usableFromInline static let onmouseleave: JSString = "onmouseleave" + @usableFromInline static let onmousemove: JSString = "onmousemove" + @usableFromInline static let onmouseout: JSString = "onmouseout" + @usableFromInline static let onmouseover: JSString = "onmouseover" + @usableFromInline static let onmouseup: JSString = "onmouseup" + @usableFromInline static let onoffline: JSString = "onoffline" + @usableFromInline static let ononline: JSString = "ononline" + @usableFromInline static let onopen: JSString = "onopen" + @usableFromInline static let onpagehide: JSString = "onpagehide" + @usableFromInline static let onpageshow: JSString = "onpageshow" + @usableFromInline static let onpaste: JSString = "onpaste" + @usableFromInline static let onpause: JSString = "onpause" + @usableFromInline static let onplay: JSString = "onplay" + @usableFromInline static let onplaying: JSString = "onplaying" + @usableFromInline static let onpopstate: JSString = "onpopstate" + @usableFromInline static let onprogress: JSString = "onprogress" + @usableFromInline static let onratechange: JSString = "onratechange" + @usableFromInline static let onreadystatechange: JSString = "onreadystatechange" + @usableFromInline static let onrejectionhandled: JSString = "onrejectionhandled" + @usableFromInline static let onremove: JSString = "onremove" + @usableFromInline static let onremovetrack: JSString = "onremovetrack" + @usableFromInline static let onreset: JSString = "onreset" + @usableFromInline static let onresize: JSString = "onresize" + @usableFromInline static let onscroll: JSString = "onscroll" + @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" + @usableFromInline static let onseeked: JSString = "onseeked" + @usableFromInline static let onseeking: JSString = "onseeking" + @usableFromInline static let onselect: JSString = "onselect" + @usableFromInline static let onslotchange: JSString = "onslotchange" + @usableFromInline static let onstalled: JSString = "onstalled" + @usableFromInline static let onstatechange: JSString = "onstatechange" + @usableFromInline static let onstorage: JSString = "onstorage" + @usableFromInline static let onsubmit: JSString = "onsubmit" + @usableFromInline static let onsuspend: JSString = "onsuspend" + @usableFromInline static let ontimeout: JSString = "ontimeout" + @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" + @usableFromInline static let ontoggle: JSString = "ontoggle" + @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" + @usableFromInline static let onunload: JSString = "onunload" + @usableFromInline static let onupdatefound: JSString = "onupdatefound" + @usableFromInline static let onvisibilitychange: JSString = "onvisibilitychange" + @usableFromInline static let onvolumechange: JSString = "onvolumechange" + @usableFromInline static let onwaiting: JSString = "onwaiting" + @usableFromInline static let onwebkitanimationend: JSString = "onwebkitanimationend" + @usableFromInline static let onwebkitanimationiteration: JSString = "onwebkitanimationiteration" + @usableFromInline static let onwebkitanimationstart: JSString = "onwebkitanimationstart" + @usableFromInline static let onwebkittransitionend: JSString = "onwebkittransitionend" + @usableFromInline static let onwheel: JSString = "onwheel" + @usableFromInline static let open: JSString = "open" + @usableFromInline static let opener: JSString = "opener" + @usableFromInline static let optimum: JSString = "optimum" + @usableFromInline static let options: JSString = "options" + @usableFromInline static let origin: JSString = "origin" + @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" + @usableFromInline static let originTime: JSString = "originTime" + @usableFromInline static let oscpu: JSString = "oscpu" + @usableFromInline static let outerText: JSString = "outerText" + @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" + @usableFromInline static let ownerDocument: JSString = "ownerDocument" + @usableFromInline static let ownerElement: JSString = "ownerElement" + @usableFromInline static let p1: JSString = "p1" + @usableFromInline static let p2: JSString = "p2" + @usableFromInline static let p3: JSString = "p3" + @usableFromInline static let p4: JSString = "p4" + @usableFromInline static let parent: JSString = "parent" + @usableFromInline static let parentElement: JSString = "parentElement" + @usableFromInline static let parentNode: JSString = "parentNode" + @usableFromInline static let parseFromString: JSString = "parseFromString" + @usableFromInline static let passive: JSString = "passive" + @usableFromInline static let password: JSString = "password" + @usableFromInline static let pathname: JSString = "pathname" + @usableFromInline static let pattern: JSString = "pattern" + @usableFromInline static let patternMismatch: JSString = "patternMismatch" + @usableFromInline static let pause: JSString = "pause" + @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" + @usableFromInline static let paused: JSString = "paused" + @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" + @usableFromInline static let pending: JSString = "pending" + @usableFromInline static let performance: JSString = "performance" + @usableFromInline static let persist: JSString = "persist" + @usableFromInline static let persisted: JSString = "persisted" + @usableFromInline static let personalbar: JSString = "personalbar" + @usableFromInline static let phase: JSString = "phase" + @usableFromInline static let ping: JSString = "ping" + @usableFromInline static let pipeThrough: JSString = "pipeThrough" + @usableFromInline static let pipeTo: JSString = "pipeTo" + @usableFromInline static let placeholder: JSString = "placeholder" + @usableFromInline static let platform: JSString = "platform" + @usableFromInline static let play: JSString = "play" + @usableFromInline static let playState: JSString = "playState" + @usableFromInline static let playbackRate: JSString = "playbackRate" + @usableFromInline static let played: JSString = "played" + @usableFromInline static let playsInline: JSString = "playsInline" + @usableFromInline static let plugins: JSString = "plugins" + @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" + @usableFromInline static let port: JSString = "port" + @usableFromInline static let port1: JSString = "port1" + @usableFromInline static let port2: JSString = "port2" + @usableFromInline static let ports: JSString = "ports" + @usableFromInline static let position: JSString = "position" + @usableFromInline static let postMessage: JSString = "postMessage" + @usableFromInline static let poster: JSString = "poster" + @usableFromInline static let preMultiplySelf: JSString = "preMultiplySelf" + @usableFromInline static let prefix: JSString = "prefix" + @usableFromInline static let preload: JSString = "preload" + @usableFromInline static let preloadResponse: JSString = "preloadResponse" + @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" + @usableFromInline static let prepend: JSString = "prepend" + @usableFromInline static let preservesPitch: JSString = "preservesPitch" + @usableFromInline static let prevValue: JSString = "prevValue" + @usableFromInline static let preventAbort: JSString = "preventAbort" + @usableFromInline static let preventCancel: JSString = "preventCancel" + @usableFromInline static let preventClose: JSString = "preventClose" + @usableFromInline static let preventDefault: JSString = "preventDefault" + @usableFromInline static let preventScroll: JSString = "preventScroll" + @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" + @usableFromInline static let previousNode: JSString = "previousNode" + @usableFromInline static let previousSibling: JSString = "previousSibling" + @usableFromInline static let print: JSString = "print" + @usableFromInline static let product: JSString = "product" + @usableFromInline static let productSub: JSString = "productSub" + @usableFromInline static let progress: JSString = "progress" + @usableFromInline static let promise: JSString = "promise" + @usableFromInline static let prompt: JSString = "prompt" + @usableFromInline static let `protocol`: JSString = "protocol" + @usableFromInline static let pseudoElement: JSString = "pseudoElement" + @usableFromInline static let publicId: JSString = "publicId" + @usableFromInline static let pull: JSString = "pull" + @usableFromInline static let pushState: JSString = "pushState" + @usableFromInline static let put: JSString = "put" + @usableFromInline static let putImageData: JSString = "putImageData" + @usableFromInline static let quadraticCurveTo: JSString = "quadraticCurveTo" + @usableFromInline static let quality: JSString = "quality" + @usableFromInline static let queryCommandEnabled: JSString = "queryCommandEnabled" + @usableFromInline static let queryCommandIndeterm: JSString = "queryCommandIndeterm" + @usableFromInline static let queryCommandState: JSString = "queryCommandState" + @usableFromInline static let queryCommandSupported: JSString = "queryCommandSupported" + @usableFromInline static let queryCommandValue: JSString = "queryCommandValue" + @usableFromInline static let querySelector: JSString = "querySelector" + @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" + @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" + @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" + @usableFromInline static let read: JSString = "read" + @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" + @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" + @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" + @usableFromInline static let readAsText: JSString = "readAsText" + @usableFromInline static let readOnly: JSString = "readOnly" + @usableFromInline static let readable: JSString = "readable" + @usableFromInline static let readableType: JSString = "readableType" + @usableFromInline static let ready: JSString = "ready" + @usableFromInline static let readyState: JSString = "readyState" + @usableFromInline static let reason: JSString = "reason" + @usableFromInline static let rect: JSString = "rect" + @usableFromInline static let redirect: JSString = "redirect" + @usableFromInline static let redirected: JSString = "redirected" + @usableFromInline static let referenceNode: JSString = "referenceNode" + @usableFromInline static let referrer: JSString = "referrer" + @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" + @usableFromInline static let refresh: JSString = "refresh" + @usableFromInline static let register: JSString = "register" + @usableFromInline static let registerProtocolHandler: JSString = "registerProtocolHandler" + @usableFromInline static let rel: JSString = "rel" + @usableFromInline static let relList: JSString = "relList" + @usableFromInline static let relatedNode: JSString = "relatedNode" + @usableFromInline static let relatedTarget: JSString = "relatedTarget" + @usableFromInline static let releaseEvents: JSString = "releaseEvents" + @usableFromInline static let releaseLock: JSString = "releaseLock" + @usableFromInline static let reload: JSString = "reload" + @usableFromInline static let remove: JSString = "remove" + @usableFromInline static let removeAttribute: JSString = "removeAttribute" + @usableFromInline static let removeAttributeNS: JSString = "removeAttributeNS" + @usableFromInline static let removeAttributeNode: JSString = "removeAttributeNode" + @usableFromInline static let removeChild: JSString = "removeChild" + @usableFromInline static let removeCue: JSString = "removeCue" + @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" + @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" + @usableFromInline static let removeParameter: JSString = "removeParameter" + @usableFromInline static let removedNodes: JSString = "removedNodes" + @usableFromInline static let `repeat`: JSString = "repeat" + @usableFromInline static let replace: JSString = "replace" + @usableFromInline static let replaceChild: JSString = "replaceChild" + @usableFromInline static let replaceChildren: JSString = "replaceChildren" + @usableFromInline static let replaceData: JSString = "replaceData" + @usableFromInline static let replaceState: JSString = "replaceState" + @usableFromInline static let replaceWith: JSString = "replaceWith" + @usableFromInline static let replacesClientId: JSString = "replacesClientId" + @usableFromInline static let reportError: JSString = "reportError" + @usableFromInline static let reportValidity: JSString = "reportValidity" + @usableFromInline static let request: JSString = "request" + @usableFromInline static let requestSubmit: JSString = "requestSubmit" + @usableFromInline static let required: JSString = "required" + @usableFromInline static let reset: JSString = "reset" + @usableFromInline static let resetTransform: JSString = "resetTransform" + @usableFromInline static let resizeHeight: JSString = "resizeHeight" + @usableFromInline static let resizeQuality: JSString = "resizeQuality" + @usableFromInline static let resizeWidth: JSString = "resizeWidth" + @usableFromInline static let respond: JSString = "respond" + @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" + @usableFromInline static let response: JSString = "response" + @usableFromInline static let responseText: JSString = "responseText" + @usableFromInline static let responseType: JSString = "responseType" + @usableFromInline static let responseURL: JSString = "responseURL" + @usableFromInline static let responseXML: JSString = "responseXML" + @usableFromInline static let restore: JSString = "restore" + @usableFromInline static let result: JSString = "result" + @usableFromInline static let resultType: JSString = "resultType" + @usableFromInline static let resultingClientId: JSString = "resultingClientId" + @usableFromInline static let returnValue: JSString = "returnValue" + @usableFromInline static let rev: JSString = "rev" + @usableFromInline static let reverse: JSString = "reverse" + @usableFromInline static let reversed: JSString = "reversed" + @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" + @usableFromInline static let right: JSString = "right" + @usableFromInline static let role: JSString = "role" + @usableFromInline static let root: JSString = "root" + @usableFromInline static let rotate: JSString = "rotate" + @usableFromInline static let rotateAxisAngle: JSString = "rotateAxisAngle" + @usableFromInline static let rotateAxisAngleSelf: JSString = "rotateAxisAngleSelf" + @usableFromInline static let rotateFromVector: JSString = "rotateFromVector" + @usableFromInline static let rotateFromVectorSelf: JSString = "rotateFromVectorSelf" + @usableFromInline static let rotateSelf: JSString = "rotateSelf" + @usableFromInline static let roundRect: JSString = "roundRect" + @usableFromInline static let rowIndex: JSString = "rowIndex" + @usableFromInline static let rowSpan: JSString = "rowSpan" + @usableFromInline static let rows: JSString = "rows" + @usableFromInline static let rules: JSString = "rules" + @usableFromInline static let sandbox: JSString = "sandbox" + @usableFromInline static let save: JSString = "save" + @usableFromInline static let scale: JSString = "scale" + @usableFromInline static let scale3d: JSString = "scale3d" + @usableFromInline static let scale3dSelf: JSString = "scale3dSelf" + @usableFromInline static let scaleNonUniform: JSString = "scaleNonUniform" + @usableFromInline static let scaleSelf: JSString = "scaleSelf" + @usableFromInline static let scheme: JSString = "scheme" + @usableFromInline static let scope: JSString = "scope" + @usableFromInline static let screenX: JSString = "screenX" + @usableFromInline static let screenY: JSString = "screenY" + @usableFromInline static let scriptURL: JSString = "scriptURL" + @usableFromInline static let scripts: JSString = "scripts" + @usableFromInline static let scrollAmount: JSString = "scrollAmount" + @usableFromInline static let scrollDelay: JSString = "scrollDelay" + @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" + @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" + @usableFromInline static let scrollbars: JSString = "scrollbars" + @usableFromInline static let scrolling: JSString = "scrolling" + @usableFromInline static let search: JSString = "search" + @usableFromInline static let searchParams: JSString = "searchParams" + @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" + @usableFromInline static let seekable: JSString = "seekable" + @usableFromInline static let seeking: JSString = "seeking" + @usableFromInline static let select: JSString = "select" + @usableFromInline static let selectNode: JSString = "selectNode" + @usableFromInline static let selectNodeContents: JSString = "selectNodeContents" + @usableFromInline static let selected: JSString = "selected" + @usableFromInline static let selectedIndex: JSString = "selectedIndex" + @usableFromInline static let selectedOptions: JSString = "selectedOptions" + @usableFromInline static let selectionDirection: JSString = "selectionDirection" + @usableFromInline static let selectionEnd: JSString = "selectionEnd" + @usableFromInline static let selectionStart: JSString = "selectionStart" + @usableFromInline static let send: JSString = "send" + @usableFromInline static let serviceWorker: JSString = "serviceWorker" + @usableFromInline static let sessionStorage: JSString = "sessionStorage" + @usableFromInline static let set: JSString = "set" + @usableFromInline static let setAttribute: JSString = "setAttribute" + @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" + @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" + @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" + @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" + @usableFromInline static let setData: JSString = "setData" + @usableFromInline static let setDragImage: JSString = "setDragImage" + @usableFromInline static let setEnd: JSString = "setEnd" + @usableFromInline static let setEndAfter: JSString = "setEndAfter" + @usableFromInline static let setEndBefore: JSString = "setEndBefore" + @usableFromInline static let setFormValue: JSString = "setFormValue" + @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" + @usableFromInline static let setInterval: JSString = "setInterval" + @usableFromInline static let setKeyframes: JSString = "setKeyframes" + @usableFromInline static let setLineDash: JSString = "setLineDash" + @usableFromInline static let setMatrixValue: JSString = "setMatrixValue" + @usableFromInline static let setNamedItem: JSString = "setNamedItem" + @usableFromInline static let setNamedItemNS: JSString = "setNamedItemNS" + @usableFromInline static let setParameter: JSString = "setParameter" + @usableFromInline static let setRangeText: JSString = "setRangeText" + @usableFromInline static let setRequestHeader: JSString = "setRequestHeader" + @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" + @usableFromInline static let setStart: JSString = "setStart" + @usableFromInline static let setStartAfter: JSString = "setStartAfter" + @usableFromInline static let setStartBefore: JSString = "setStartBefore" + @usableFromInline static let setTimeout: JSString = "setTimeout" + @usableFromInline static let setTransform: JSString = "setTransform" + @usableFromInline static let setValidity: JSString = "setValidity" + @usableFromInline static let shadowBlur: JSString = "shadowBlur" + @usableFromInline static let shadowColor: JSString = "shadowColor" + @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" + @usableFromInline static let shadowOffsetY: JSString = "shadowOffsetY" + @usableFromInline static let shadowRoot: JSString = "shadowRoot" + @usableFromInline static let shape: JSString = "shape" + @usableFromInline static let shiftKey: JSString = "shiftKey" + @usableFromInline static let show: JSString = "show" + @usableFromInline static let showModal: JSString = "showModal" + @usableFromInline static let showPicker: JSString = "showPicker" + @usableFromInline static let signal: JSString = "signal" + @usableFromInline static let singleNodeValue: JSString = "singleNodeValue" + @usableFromInline static let size: JSString = "size" + @usableFromInline static let sizes: JSString = "sizes" + @usableFromInline static let skewX: JSString = "skewX" + @usableFromInline static let skewXSelf: JSString = "skewXSelf" + @usableFromInline static let skewY: JSString = "skewY" + @usableFromInline static let skewYSelf: JSString = "skewYSelf" + @usableFromInline static let slice: JSString = "slice" + @usableFromInline static let slot: JSString = "slot" + @usableFromInline static let slotAssignment: JSString = "slotAssignment" + @usableFromInline static let snapshotItem: JSString = "snapshotItem" + @usableFromInline static let snapshotLength: JSString = "snapshotLength" + @usableFromInline static let sort: JSString = "sort" + @usableFromInline static let source: JSString = "source" + @usableFromInline static let span: JSString = "span" + @usableFromInline static let specified: JSString = "specified" + @usableFromInline static let spellcheck: JSString = "spellcheck" + @usableFromInline static let splitText: JSString = "splitText" + @usableFromInline static let src: JSString = "src" + @usableFromInline static let srcElement: JSString = "srcElement" + @usableFromInline static let srcdoc: JSString = "srcdoc" + @usableFromInline static let srclang: JSString = "srclang" + @usableFromInline static let srcset: JSString = "srcset" + @usableFromInline static let standby: JSString = "standby" + @usableFromInline static let start: JSString = "start" + @usableFromInline static let startContainer: JSString = "startContainer" + @usableFromInline static let startMessages: JSString = "startMessages" + @usableFromInline static let startOffset: JSString = "startOffset" + @usableFromInline static let startTime: JSString = "startTime" + @usableFromInline static let state: JSString = "state" + @usableFromInline static let status: JSString = "status" + @usableFromInline static let statusText: JSString = "statusText" + @usableFromInline static let statusbar: JSString = "statusbar" + @usableFromInline static let step: JSString = "step" + @usableFromInline static let stepDown: JSString = "stepDown" + @usableFromInline static let stepMismatch: JSString = "stepMismatch" + @usableFromInline static let stepUp: JSString = "stepUp" + @usableFromInline static let stop: JSString = "stop" + @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" + @usableFromInline static let stopPropagation: JSString = "stopPropagation" + @usableFromInline static let storageArea: JSString = "storageArea" + @usableFromInline static let stringValue: JSString = "stringValue" + @usableFromInline static let stroke: JSString = "stroke" + @usableFromInline static let strokeRect: JSString = "strokeRect" + @usableFromInline static let strokeStyle: JSString = "strokeStyle" + @usableFromInline static let strokeText: JSString = "strokeText" + @usableFromInline static let structuredClone: JSString = "structuredClone" + @usableFromInline static let submit: JSString = "submit" + @usableFromInline static let submitter: JSString = "submitter" + @usableFromInline static let substringData: JSString = "substringData" + @usableFromInline static let subtree: JSString = "subtree" + @usableFromInline static let suffixes: JSString = "suffixes" + @usableFromInline static let summary: JSString = "summary" + @usableFromInline static let supports: JSString = "supports" + @usableFromInline static let surroundContents: JSString = "surroundContents" + @usableFromInline static let systemId: JSString = "systemId" + @usableFromInline static let tBodies: JSString = "tBodies" + @usableFromInline static let tFoot: JSString = "tFoot" + @usableFromInline static let tHead: JSString = "tHead" + @usableFromInline static let tabIndex: JSString = "tabIndex" + @usableFromInline static let table: JSString = "table" + @usableFromInline static let tagName: JSString = "tagName" + @usableFromInline static let taintEnabled: JSString = "taintEnabled" + @usableFromInline static let takeRecords: JSString = "takeRecords" + @usableFromInline static let target: JSString = "target" + @usableFromInline static let targetOrigin: JSString = "targetOrigin" + @usableFromInline static let tee: JSString = "tee" + @usableFromInline static let terminate: JSString = "terminate" + @usableFromInline static let text: JSString = "text" + @usableFromInline static let textAlign: JSString = "textAlign" + @usableFromInline static let textBaseline: JSString = "textBaseline" + @usableFromInline static let textContent: JSString = "textContent" + @usableFromInline static let textLength: JSString = "textLength" + @usableFromInline static let textRendering: JSString = "textRendering" + @usableFromInline static let textTracks: JSString = "textTracks" + @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" + @usableFromInline static let time: JSString = "time" + @usableFromInline static let timeEnd: JSString = "timeEnd" + @usableFromInline static let timeLog: JSString = "timeLog" + @usableFromInline static let timeOrigin: JSString = "timeOrigin" + @usableFromInline static let timeStamp: JSString = "timeStamp" + @usableFromInline static let timeline: JSString = "timeline" + @usableFromInline static let timeout: JSString = "timeout" + @usableFromInline static let title: JSString = "title" + @usableFromInline static let toDataURL: JSString = "toDataURL" + @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" + @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" + @usableFromInline static let toJSON: JSString = "toJSON" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let toggle: JSString = "toggle" + @usableFromInline static let toggleAttribute: JSString = "toggleAttribute" + @usableFromInline static let tooLong: JSString = "tooLong" + @usableFromInline static let tooShort: JSString = "tooShort" + @usableFromInline static let toolbar: JSString = "toolbar" + @usableFromInline static let top: JSString = "top" + @usableFromInline static let total: JSString = "total" + @usableFromInline static let trace: JSString = "trace" + @usableFromInline static let track: JSString = "track" + @usableFromInline static let transfer: JSString = "transfer" + @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" + @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" + @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" + @usableFromInline static let transform: JSString = "transform" + @usableFromInline static let transformPoint: JSString = "transformPoint" + @usableFromInline static let transformToDocument: JSString = "transformToDocument" + @usableFromInline static let transformToFragment: JSString = "transformToFragment" + @usableFromInline static let translate: JSString = "translate" + @usableFromInline static let translateSelf: JSString = "translateSelf" + @usableFromInline static let trueSpeed: JSString = "trueSpeed" + @usableFromInline static let type: JSString = "type" + @usableFromInline static let typeMismatch: JSString = "typeMismatch" + @usableFromInline static let types: JSString = "types" + @usableFromInline static let unregister: JSString = "unregister" + @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" + @usableFromInline static let update: JSString = "update" + @usableFromInline static let updatePlaybackRate: JSString = "updatePlaybackRate" + @usableFromInline static let updateTiming: JSString = "updateTiming" + @usableFromInline static let updateViaCache: JSString = "updateViaCache" + @usableFromInline static let upgrade: JSString = "upgrade" + @usableFromInline static let upload: JSString = "upload" + @usableFromInline static let url: JSString = "url" + @usableFromInline static let useMap: JSString = "useMap" + @usableFromInline static let userAgent: JSString = "userAgent" + @usableFromInline static let username: JSString = "username" + @usableFromInline static let vAlign: JSString = "vAlign" + @usableFromInline static let vLink: JSString = "vLink" + @usableFromInline static let valid: JSString = "valid" + @usableFromInline static let validationMessage: JSString = "validationMessage" + @usableFromInline static let validity: JSString = "validity" + @usableFromInline static let value: JSString = "value" + @usableFromInline static let valueAsDate: JSString = "valueAsDate" + @usableFromInline static let valueAsNumber: JSString = "valueAsNumber" + @usableFromInline static let valueMissing: JSString = "valueMissing" + @usableFromInline static let valueType: JSString = "valueType" + @usableFromInline static let vendor: JSString = "vendor" + @usableFromInline static let vendorSub: JSString = "vendorSub" + @usableFromInline static let version: JSString = "version" + @usableFromInline static let videoHeight: JSString = "videoHeight" + @usableFromInline static let videoTracks: JSString = "videoTracks" + @usableFromInline static let videoWidth: JSString = "videoWidth" + @usableFromInline static let view: JSString = "view" + @usableFromInline static let visibilityState: JSString = "visibilityState" + @usableFromInline static let visible: JSString = "visible" + @usableFromInline static let vlinkColor: JSString = "vlinkColor" + @usableFromInline static let volume: JSString = "volume" + @usableFromInline static let vspace: JSString = "vspace" + @usableFromInline static let w: JSString = "w" + @usableFromInline static let waiting: JSString = "waiting" + @usableFromInline static let warn: JSString = "warn" + @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" + @usableFromInline static let whatToShow: JSString = "whatToShow" + @usableFromInline static let whenDefined: JSString = "whenDefined" + @usableFromInline static let which: JSString = "which" + @usableFromInline static let wholeText: JSString = "wholeText" + @usableFromInline static let width: JSString = "width" + @usableFromInline static let willReadFrequently: JSString = "willReadFrequently" + @usableFromInline static let willValidate: JSString = "willValidate" + @usableFromInline static let window: JSString = "window" + @usableFromInline static let withCredentials: JSString = "withCredentials" + @usableFromInline static let wordSpacing: JSString = "wordSpacing" + @usableFromInline static let wrap: JSString = "wrap" + @usableFromInline static let writable: JSString = "writable" + @usableFromInline static let writableType: JSString = "writableType" + @usableFromInline static let write: JSString = "write" + @usableFromInline static let writeln: JSString = "writeln" + @usableFromInline static let x: JSString = "x" + @usableFromInline static let y: JSString = "y" + @usableFromInline static let z: JSString = "z" +} + +public protocol Any_ArrayBuffer_or_String: ConvertibleToJSValue {} +extension ArrayBuffer: Any_ArrayBuffer_or_String {} +extension String: Any_ArrayBuffer_or_String {} + +public enum ArrayBuffer_or_String: JSValueCompatible, Any_ArrayBuffer_or_String { + case arrayBuffer(ArrayBuffer) + case string(String) + + var arrayBuffer: ArrayBuffer? { + switch self { + case let .arrayBuffer(arrayBuffer): return arrayBuffer + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let arrayBuffer: ArrayBuffer = value.fromJSValue() { + return .arrayBuffer(arrayBuffer) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .arrayBuffer(arrayBuffer): + return arrayBuffer.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_AudioTrack_or_TextTrack_or_VideoTrack: ConvertibleToJSValue {} +extension AudioTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} +extension TextTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} +extension VideoTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} + +public enum AudioTrack_or_TextTrack_or_VideoTrack: JSValueCompatible, Any_AudioTrack_or_TextTrack_or_VideoTrack { + case audioTrack(AudioTrack) + case textTrack(TextTrack) + case videoTrack(VideoTrack) + + var audioTrack: AudioTrack? { + switch self { + case let .audioTrack(audioTrack): return audioTrack + default: return nil + } + } + + var textTrack: TextTrack? { + switch self { + case let .textTrack(textTrack): return textTrack + default: return nil + } + } + + var videoTrack: VideoTrack? { + switch self { + case let .videoTrack(videoTrack): return videoTrack + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let audioTrack: AudioTrack = value.fromJSValue() { + return .audioTrack(audioTrack) + } + if let textTrack: TextTrack = value.fromJSValue() { + return .textTrack(textTrack) + } + if let videoTrack: VideoTrack = value.fromJSValue() { + return .videoTrack(videoTrack) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .audioTrack(audioTrack): + return audioTrack.jsValue + case let .textTrack(textTrack): + return textTrack.jsValue + case let .videoTrack(videoTrack): + return videoTrack.jsValue + } + } +} + +public protocol Any_BlobPart: ConvertibleToJSValue {} +extension Blob: Any_BlobPart {} +extension BufferSource: Any_BlobPart {} +extension String: Any_BlobPart {} + +public enum BlobPart: JSValueCompatible, Any_BlobPart { + case blob(Blob) + case bufferSource(BufferSource) + case string(String) + + var blob: Blob? { + switch self { + case let .blob(blob): return blob + default: return nil + } + } + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let blob: Blob = value.fromJSValue() { + return .blob(blob) + } + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .blob(blob): + return blob.jsValue + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_BufferSource: ConvertibleToJSValue {} +extension ArrayBuffer: Any_BufferSource {} +extension ArrayBufferView: Any_BufferSource {} + +public enum BufferSource: JSValueCompatible, Any_BufferSource { + case arrayBuffer(ArrayBuffer) + case arrayBufferView(ArrayBufferView) + + var arrayBuffer: ArrayBuffer? { + switch self { + case let .arrayBuffer(arrayBuffer): return arrayBuffer + default: return nil + } + } + + var arrayBufferView: ArrayBufferView? { + switch self { + case let .arrayBufferView(arrayBufferView): return arrayBufferView + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let arrayBuffer: ArrayBuffer = value.fromJSValue() { + return .arrayBuffer(arrayBuffer) + } + if let arrayBufferView: ArrayBufferView = value.fromJSValue() { + return .arrayBufferView(arrayBufferView) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .arrayBuffer(arrayBuffer): + return arrayBuffer.jsValue + case let .arrayBufferView(arrayBufferView): + return arrayBufferView.jsValue + } + } +} + +public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} +extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} +extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} + +public enum CanvasFilterInput_or_seq_of_CanvasFilterInput: JSValueCompatible, Any_CanvasFilterInput_or_seq_of_CanvasFilterInput { + case canvasFilterInput(CanvasFilterInput) + case seq_of_CanvasFilterInput([CanvasFilterInput]) + + var canvasFilterInput: CanvasFilterInput? { + switch self { + case let .canvasFilterInput(canvasFilterInput): return canvasFilterInput + default: return nil + } + } + + var seq_of_CanvasFilterInput: [CanvasFilterInput]? { + switch self { + case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): return seq_of_CanvasFilterInput + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasFilterInput: CanvasFilterInput = value.fromJSValue() { + return .canvasFilterInput(canvasFilterInput) + } + if let seq_of_CanvasFilterInput: [CanvasFilterInput] = value.fromJSValue() { + return .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasFilterInput(canvasFilterInput): + return canvasFilterInput.jsValue + case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): + return seq_of_CanvasFilterInput.jsValue + } + } +} + +public protocol Any_CanvasFilter_or_String: ConvertibleToJSValue {} +extension CanvasFilter: Any_CanvasFilter_or_String {} +extension String: Any_CanvasFilter_or_String {} + +public enum CanvasFilter_or_String: JSValueCompatible, Any_CanvasFilter_or_String { + case canvasFilter(CanvasFilter) + case string(String) + + var canvasFilter: CanvasFilter? { + switch self { + case let .canvasFilter(canvasFilter): return canvasFilter + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasFilter: CanvasFilter = value.fromJSValue() { + return .canvasFilter(canvasFilter) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasFilter(canvasFilter): + return canvasFilter.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_CanvasGradient_or_CanvasPattern_or_String: ConvertibleToJSValue {} +extension CanvasGradient: Any_CanvasGradient_or_CanvasPattern_or_String {} +extension CanvasPattern: Any_CanvasGradient_or_CanvasPattern_or_String {} +extension String: Any_CanvasGradient_or_CanvasPattern_or_String {} + +public enum CanvasGradient_or_CanvasPattern_or_String: JSValueCompatible, Any_CanvasGradient_or_CanvasPattern_or_String { + case canvasGradient(CanvasGradient) + case canvasPattern(CanvasPattern) + case string(String) + + var canvasGradient: CanvasGradient? { + switch self { + case let .canvasGradient(canvasGradient): return canvasGradient + default: return nil + } + } + + var canvasPattern: CanvasPattern? { + switch self { + case let .canvasPattern(canvasPattern): return canvasPattern + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasGradient: CanvasGradient = value.fromJSValue() { + return .canvasGradient(canvasGradient) + } + if let canvasPattern: CanvasPattern = value.fromJSValue() { + return .canvasPattern(canvasPattern) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasGradient(canvasGradient): + return canvasGradient.jsValue + case let .canvasPattern(canvasPattern): + return canvasPattern.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: ConvertibleToJSValue {} +extension CompositeOperationOrAuto: Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto {} +extension Array: Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto where Element == CompositeOperationOrAuto {} + +public enum CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: JSValueCompatible, Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto { + case compositeOperationOrAuto(CompositeOperationOrAuto) + case seq_of_CompositeOperationOrAuto([CompositeOperationOrAuto]) + + var compositeOperationOrAuto: CompositeOperationOrAuto? { + switch self { + case let .compositeOperationOrAuto(compositeOperationOrAuto): return compositeOperationOrAuto + default: return nil + } + } + + var seq_of_CompositeOperationOrAuto: [CompositeOperationOrAuto]? { + switch self { + case let .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto): return seq_of_CompositeOperationOrAuto + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let compositeOperationOrAuto: CompositeOperationOrAuto = value.fromJSValue() { + return .compositeOperationOrAuto(compositeOperationOrAuto) + } + if let seq_of_CompositeOperationOrAuto: [CompositeOperationOrAuto] = value.fromJSValue() { + return .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .compositeOperationOrAuto(compositeOperationOrAuto): + return compositeOperationOrAuto.jsValue + case let .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto): + return seq_of_CompositeOperationOrAuto.jsValue + } + } +} + +public protocol Any_DOMPointInit_or_Double: ConvertibleToJSValue {} +extension DOMPointInit: Any_DOMPointInit_or_Double {} +extension Double: Any_DOMPointInit_or_Double {} + +public enum DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double { + case domPointInit(DOMPointInit) + case double(Double) + + var domPointInit: DOMPointInit? { + switch self { + case let .domPointInit(domPointInit): return domPointInit + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let domPointInit: DOMPointInit = value.fromJSValue() { + return .domPointInit(domPointInit) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .domPointInit(domPointInit): + return domPointInit.jsValue + case let .double(double): + return double.jsValue + } + } +} + +public protocol Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: ConvertibleToJSValue {} +extension DOMPointInit: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} +extension Double: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} +extension Array: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double where Element == DOMPointInit_or_Double {} + +public enum DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double { + case domPointInit(DOMPointInit) + case double(Double) + case seq_of_DOMPointInit_or_Double([DOMPointInit_or_Double]) + + var domPointInit: DOMPointInit? { + switch self { + case let .domPointInit(domPointInit): return domPointInit + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double]? { + switch self { + case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): return seq_of_DOMPointInit_or_Double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let domPointInit: DOMPointInit = value.fromJSValue() { + return .domPointInit(domPointInit) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { + return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .domPointInit(domPointInit): + return domPointInit.jsValue + case let .double(double): + return double.jsValue + case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): + return seq_of_DOMPointInit_or_Double.jsValue + } + } +} + +public protocol Any_Document_or_XMLHttpRequestBodyInit: ConvertibleToJSValue {} +extension Document: Any_Document_or_XMLHttpRequestBodyInit {} +extension XMLHttpRequestBodyInit: Any_Document_or_XMLHttpRequestBodyInit {} + +public enum Document_or_XMLHttpRequestBodyInit: JSValueCompatible, Any_Document_or_XMLHttpRequestBodyInit { + case document(Document) + case xmlHttpRequestBodyInit(XMLHttpRequestBodyInit) + + var document: Document? { + switch self { + case let .document(document): return document + default: return nil + } + } + + var xmlHttpRequestBodyInit: XMLHttpRequestBodyInit? { + switch self { + case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): return xmlHttpRequestBodyInit + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let document: Document = value.fromJSValue() { + return .document(document) + } + if let xmlHttpRequestBodyInit: XMLHttpRequestBodyInit = value.fromJSValue() { + return .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .document(document): + return document.jsValue + case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): + return xmlHttpRequestBodyInit.jsValue + } + } +} + +public protocol Any_Double_or_KeyframeAnimationOptions: ConvertibleToJSValue {} +extension Double: Any_Double_or_KeyframeAnimationOptions {} +extension KeyframeAnimationOptions: Any_Double_or_KeyframeAnimationOptions {} + +public enum Double_or_KeyframeAnimationOptions: JSValueCompatible, Any_Double_or_KeyframeAnimationOptions { + case double(Double) + case keyframeAnimationOptions(KeyframeAnimationOptions) + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var keyframeAnimationOptions: KeyframeAnimationOptions? { + switch self { + case let .keyframeAnimationOptions(keyframeAnimationOptions): return keyframeAnimationOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let keyframeAnimationOptions: KeyframeAnimationOptions = value.fromJSValue() { + return .keyframeAnimationOptions(keyframeAnimationOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .double(double): + return double.jsValue + case let .keyframeAnimationOptions(keyframeAnimationOptions): + return keyframeAnimationOptions.jsValue + } + } +} + +public protocol Any_Double_or_KeyframeEffectOptions: ConvertibleToJSValue {} +extension Double: Any_Double_or_KeyframeEffectOptions {} +extension KeyframeEffectOptions: Any_Double_or_KeyframeEffectOptions {} + +public enum Double_or_KeyframeEffectOptions: JSValueCompatible, Any_Double_or_KeyframeEffectOptions { + case double(Double) + case keyframeEffectOptions(KeyframeEffectOptions) + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var keyframeEffectOptions: KeyframeEffectOptions? { + switch self { + case let .keyframeEffectOptions(keyframeEffectOptions): return keyframeEffectOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let keyframeEffectOptions: KeyframeEffectOptions = value.fromJSValue() { + return .keyframeEffectOptions(keyframeEffectOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .double(double): + return double.jsValue + case let .keyframeEffectOptions(keyframeEffectOptions): + return keyframeEffectOptions.jsValue + } + } +} + +public protocol Any_Double_or_String: ConvertibleToJSValue {} +extension Double: Any_Double_or_String {} +extension String: Any_Double_or_String {} + +public enum Double_or_String: JSValueCompatible, Any_Double_or_String { + case double(Double) + case string(String) + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .double(double): + return double.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} +extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} +extension String: Any_ElementCreationOptions_or_String {} + +public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { + case elementCreationOptions(ElementCreationOptions) + case string(String) + + var elementCreationOptions: ElementCreationOptions? { + switch self { + case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { + return .elementCreationOptions(elementCreationOptions) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .elementCreationOptions(elementCreationOptions): + return elementCreationOptions.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} +extension Element: Any_Element_or_HTMLCollection {} +extension HTMLCollection: Any_Element_or_HTMLCollection {} + +public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { + case element(Element) + case htmlCollection(HTMLCollection) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var htmlCollection: HTMLCollection? { + switch self { + case let .htmlCollection(htmlCollection): return htmlCollection + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let htmlCollection: HTMLCollection = value.fromJSValue() { + return .htmlCollection(htmlCollection) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .element(element): + return element.jsValue + case let .htmlCollection(htmlCollection): + return htmlCollection.jsValue + } + } +} + +public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} +extension Element: Any_Element_or_RadioNodeList {} +extension RadioNodeList: Any_Element_or_RadioNodeList {} + +public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { + case element(Element) + case radioNodeList(RadioNodeList) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var radioNodeList: RadioNodeList? { + switch self { + case let .radioNodeList(radioNodeList): return radioNodeList + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let radioNodeList: RadioNodeList = value.fromJSValue() { + return .radioNodeList(radioNodeList) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .element(element): + return element.jsValue + case let .radioNodeList(radioNodeList): + return radioNodeList.jsValue + } + } +} + +public protocol Any_Element_or_Text: ConvertibleToJSValue {} +extension Element: Any_Element_or_Text {} +extension Text: Any_Element_or_Text {} + +public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { + case element(Element) + case text(Text) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var text: Text? { + switch self { + case let .text(text): return text + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let text: Text = value.fromJSValue() { + return .text(text) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .element(element): + return element.jsValue + case let .text(text): + return text.jsValue + } + } +} + +public protocol Any_Event_or_String: ConvertibleToJSValue {} +extension Event: Any_Event_or_String {} +extension String: Any_Event_or_String {} + +public enum Event_or_String: JSValueCompatible, Any_Event_or_String { + case event(Event) + case string(String) + + var event: Event? { + switch self { + case let .event(event): return event + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let event: Event = value.fromJSValue() { + return .event(event) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .event(event): + return event.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} +extension File: Any_File_or_FormData_or_String {} +extension FormData: Any_File_or_FormData_or_String {} +extension String: Any_File_or_FormData_or_String {} + +public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { + case file(File) + case formData(FormData) + case string(String) + + var file: File? { + switch self { + case let .file(file): return file + default: return nil + } + } + + var formData: FormData? { + switch self { + case let .formData(formData): return formData + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let file: File = value.fromJSValue() { + return .file(file) + } + if let formData: FormData = value.fromJSValue() { + return .formData(formData) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .file(file): + return file.jsValue + case let .formData(formData): + return formData.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_FormDataEntryValue: ConvertibleToJSValue {} +extension File: Any_FormDataEntryValue {} +extension String: Any_FormDataEntryValue {} + +public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { + case file(File) + case string(String) + + var file: File? { + switch self { + case let .file(file): return file + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let file: File = value.fromJSValue() { + return .file(file) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .file(file): + return file.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} +extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} +extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} + +public enum HTMLCanvasElement_or_OffscreenCanvas: JSValueCompatible, Any_HTMLCanvasElement_or_OffscreenCanvas { + case htmlCanvasElement(HTMLCanvasElement) + case offscreenCanvas(OffscreenCanvas) + + var htmlCanvasElement: HTMLCanvasElement? { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement + default: return nil + } + } + + var offscreenCanvas: OffscreenCanvas? { + switch self { + case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { + return .htmlCanvasElement(htmlCanvasElement) + } + if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { + return .offscreenCanvas(offscreenCanvas) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): + return htmlCanvasElement.jsValue + case let .offscreenCanvas(offscreenCanvas): + return offscreenCanvas.jsValue + } + } +} + +public protocol Any_HTMLElement_or_Int32: ConvertibleToJSValue {} +extension HTMLElement: Any_HTMLElement_or_Int32 {} +extension Int32: Any_HTMLElement_or_Int32 {} + +public enum HTMLElement_or_Int32: JSValueCompatible, Any_HTMLElement_or_Int32 { + case htmlElement(HTMLElement) + case int32(Int32) + + var htmlElement: HTMLElement? { + switch self { + case let .htmlElement(htmlElement): return htmlElement + default: return nil + } + } + + var int32: Int32? { + switch self { + case let .int32(int32): return int32 + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlElement: HTMLElement = value.fromJSValue() { + return .htmlElement(htmlElement) + } + if let int32: Int32 = value.fromJSValue() { + return .int32(int32) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlElement(htmlElement): + return htmlElement.jsValue + case let .int32(int32): + return int32.jsValue + } + } +} + +public protocol Any_HTMLOptGroupElement_or_HTMLOptionElement: ConvertibleToJSValue {} +extension HTMLOptGroupElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} +extension HTMLOptionElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} + +public enum HTMLOptGroupElement_or_HTMLOptionElement: JSValueCompatible, Any_HTMLOptGroupElement_or_HTMLOptionElement { + case htmlOptGroupElement(HTMLOptGroupElement) + case htmlOptionElement(HTMLOptionElement) + + var htmlOptGroupElement: HTMLOptGroupElement? { + switch self { + case let .htmlOptGroupElement(htmlOptGroupElement): return htmlOptGroupElement + default: return nil + } + } + + var htmlOptionElement: HTMLOptionElement? { + switch self { + case let .htmlOptionElement(htmlOptionElement): return htmlOptionElement + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlOptGroupElement: HTMLOptGroupElement = value.fromJSValue() { + return .htmlOptGroupElement(htmlOptGroupElement) + } + if let htmlOptionElement: HTMLOptionElement = value.fromJSValue() { + return .htmlOptionElement(htmlOptionElement) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlOptGroupElement(htmlOptGroupElement): + return htmlOptGroupElement.jsValue + case let .htmlOptionElement(htmlOptionElement): + return htmlOptionElement.jsValue + } + } +} + +public protocol Any_HeadersInit: ConvertibleToJSValue {} +extension Dictionary: Any_HeadersInit where Key == String, Value == String {} +extension Array: Any_HeadersInit where Element == [String] {} + +public enum HeadersInit: JSValueCompatible, Any_HeadersInit { + case record_String_to_String([String: String]) + case seq_of_seq_of_String([[String]]) + + var record_String_to_String: [String: String]? { + switch self { + case let .record_String_to_String(record_String_to_String): return record_String_to_String + default: return nil + } + } + + var seq_of_seq_of_String: [[String]]? { + switch self { + case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let record_String_to_String: [String: String] = value.fromJSValue() { + return .record_String_to_String(record_String_to_String) + } + if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { + return .seq_of_seq_of_String(seq_of_seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .record_String_to_String(record_String_to_String): + return record_String_to_String.jsValue + case let .seq_of_seq_of_String(seq_of_seq_of_String): + return seq_of_seq_of_String.jsValue + } + } +} + +public protocol Any_ImageBitmapSource: ConvertibleToJSValue {} +extension Blob: Any_ImageBitmapSource {} +extension CanvasImageSource: Any_ImageBitmapSource {} +extension ImageData: Any_ImageBitmapSource {} + +public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource { + case blob(Blob) + case canvasImageSource(CanvasImageSource) + case imageData(ImageData) + + var blob: Blob? { + switch self { + case let .blob(blob): return blob + default: return nil + } + } + + var canvasImageSource: CanvasImageSource? { + switch self { + case let .canvasImageSource(canvasImageSource): return canvasImageSource + default: return nil + } + } + + var imageData: ImageData? { + switch self { + case let .imageData(imageData): return imageData + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let blob: Blob = value.fromJSValue() { + return .blob(blob) + } + if let canvasImageSource: CanvasImageSource = value.fromJSValue() { + return .canvasImageSource(canvasImageSource) + } + if let imageData: ImageData = value.fromJSValue() { + return .imageData(imageData) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .blob(blob): + return blob.jsValue + case let .canvasImageSource(canvasImageSource): + return canvasImageSource.jsValue + case let .imageData(imageData): + return imageData.jsValue + } + } +} + +public protocol Any_MessageEventSource: ConvertibleToJSValue {} +extension MessagePort: Any_MessageEventSource {} +extension ServiceWorker: Any_MessageEventSource {} +extension WindowProxy: Any_MessageEventSource {} + +public enum MessageEventSource: JSValueCompatible, Any_MessageEventSource { + case messagePort(MessagePort) + case serviceWorker(ServiceWorker) + case windowProxy(WindowProxy) + + var messagePort: MessagePort? { + switch self { + case let .messagePort(messagePort): return messagePort + default: return nil + } + } + + var serviceWorker: ServiceWorker? { + switch self { + case let .serviceWorker(serviceWorker): return serviceWorker + default: return nil + } + } + + var windowProxy: WindowProxy? { + switch self { + case let .windowProxy(windowProxy): return windowProxy + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let messagePort: MessagePort = value.fromJSValue() { + return .messagePort(messagePort) + } + if let serviceWorker: ServiceWorker = value.fromJSValue() { + return .serviceWorker(serviceWorker) + } + if let windowProxy: WindowProxy = value.fromJSValue() { + return .windowProxy(windowProxy) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .messagePort(messagePort): + return messagePort.jsValue + case let .serviceWorker(serviceWorker): + return serviceWorker.jsValue + case let .windowProxy(windowProxy): + return windowProxy.jsValue + } + } +} + +public protocol Any_Node_or_String: ConvertibleToJSValue {} +extension Node: Any_Node_or_String {} +extension String: Any_Node_or_String {} + +public enum Node_or_String: JSValueCompatible, Any_Node_or_String { + case node(Node) + case string(String) + + var node: Node? { + switch self { + case let .node(node): return node + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let node: Node = value.fromJSValue() { + return .node(node) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .node(node): + return node.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_Path2D_or_String: ConvertibleToJSValue {} +extension Path2D: Any_Path2D_or_String {} +extension String: Any_Path2D_or_String {} + +public enum Path2D_or_String: JSValueCompatible, Any_Path2D_or_String { + case path2D(Path2D) + case string(String) + + var path2D: Path2D? { + switch self { + case let .path2D(path2D): return path2D + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let path2D: Path2D = value.fromJSValue() { + return .path2D(path2D) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .path2D(path2D): + return path2D.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_ReadableStreamController: ConvertibleToJSValue {} +extension ReadableByteStreamController: Any_ReadableStreamController {} +extension ReadableStreamDefaultController: Any_ReadableStreamController {} + +public enum ReadableStreamController: JSValueCompatible, Any_ReadableStreamController { + case readableByteStreamController(ReadableByteStreamController) + case readableStreamDefaultController(ReadableStreamDefaultController) + + var readableByteStreamController: ReadableByteStreamController? { + switch self { + case let .readableByteStreamController(readableByteStreamController): return readableByteStreamController + default: return nil + } + } + + var readableStreamDefaultController: ReadableStreamDefaultController? { + switch self { + case let .readableStreamDefaultController(readableStreamDefaultController): return readableStreamDefaultController + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let readableByteStreamController: ReadableByteStreamController = value.fromJSValue() { + return .readableByteStreamController(readableByteStreamController) + } + if let readableStreamDefaultController: ReadableStreamDefaultController = value.fromJSValue() { + return .readableStreamDefaultController(readableStreamDefaultController) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .readableByteStreamController(readableByteStreamController): + return readableByteStreamController.jsValue + case let .readableStreamDefaultController(readableStreamDefaultController): + return readableStreamDefaultController.jsValue + } + } +} + +public protocol Any_ReadableStreamReader: ConvertibleToJSValue {} +extension ReadableStreamBYOBReader: Any_ReadableStreamReader {} +extension ReadableStreamDefaultReader: Any_ReadableStreamReader {} + +public enum ReadableStreamReader: JSValueCompatible, Any_ReadableStreamReader { + case readableStreamBYOBReader(ReadableStreamBYOBReader) + case readableStreamDefaultReader(ReadableStreamDefaultReader) + + var readableStreamBYOBReader: ReadableStreamBYOBReader? { + switch self { + case let .readableStreamBYOBReader(readableStreamBYOBReader): return readableStreamBYOBReader + default: return nil + } + } + + var readableStreamDefaultReader: ReadableStreamDefaultReader? { + switch self { + case let .readableStreamDefaultReader(readableStreamDefaultReader): return readableStreamDefaultReader + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let readableStreamBYOBReader: ReadableStreamBYOBReader = value.fromJSValue() { + return .readableStreamBYOBReader(readableStreamBYOBReader) + } + if let readableStreamDefaultReader: ReadableStreamDefaultReader = value.fromJSValue() { + return .readableStreamDefaultReader(readableStreamDefaultReader) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .readableStreamBYOBReader(readableStreamBYOBReader): + return readableStreamBYOBReader.jsValue + case let .readableStreamDefaultReader(readableStreamDefaultReader): + return readableStreamDefaultReader.jsValue + } + } +} + +public protocol Any_RequestInfo: ConvertibleToJSValue {} +extension Request: Any_RequestInfo {} +extension String: Any_RequestInfo {} + +public enum RequestInfo: JSValueCompatible, Any_RequestInfo { + case request(Request) + case string(String) + + var request: Request? { + switch self { + case let .request(request): return request + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let request: Request = value.fromJSValue() { + return .request(request) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .request(request): + return request.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_String_or_WorkerOptions: ConvertibleToJSValue {} +extension String: Any_String_or_WorkerOptions {} +extension WorkerOptions: Any_String_or_WorkerOptions {} + +public enum String_or_WorkerOptions: JSValueCompatible, Any_String_or_WorkerOptions { + case string(String) + case workerOptions(WorkerOptions) + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var workerOptions: WorkerOptions? { + switch self { + case let .workerOptions(workerOptions): return workerOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let string: String = value.fromJSValue() { + return .string(string) + } + if let workerOptions: WorkerOptions = value.fromJSValue() { + return .workerOptions(workerOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .string(string): + return string.jsValue + case let .workerOptions(workerOptions): + return workerOptions.jsValue + } + } +} + +public protocol Any_String_or_record_String_to_String_or_seq_of_seq_of_String: ConvertibleToJSValue {} +extension String: Any_String_or_record_String_to_String_or_seq_of_seq_of_String {} +extension Dictionary: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Key == String, Value == String {} +extension Array: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Element == [String] {} + +public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCompatible, Any_String_or_record_String_to_String_or_seq_of_seq_of_String { + case string(String) + case record_String_to_String([String: String]) + case seq_of_seq_of_String([[String]]) + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var record_String_to_String: [String: String]? { + switch self { + case let .record_String_to_String(record_String_to_String): return record_String_to_String + default: return nil + } + } + + var seq_of_seq_of_String: [[String]]? { + switch self { + case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let string: String = value.fromJSValue() { + return .string(string) + } + if let record_String_to_String: [String: String] = value.fromJSValue() { + return .record_String_to_String(record_String_to_String) + } + if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { + return .seq_of_seq_of_String(seq_of_seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .string(string): + return string.jsValue + case let .record_String_to_String(record_String_to_String): + return record_String_to_String.jsValue + case let .seq_of_seq_of_String(seq_of_seq_of_String): + return seq_of_seq_of_String.jsValue + } + } +} + +public protocol Any_String_or_seq_of_Double: ConvertibleToJSValue {} +extension String: Any_String_or_seq_of_Double {} +extension Array: Any_String_or_seq_of_Double where Element == Double {} + +public enum String_or_seq_of_Double: JSValueCompatible, Any_String_or_seq_of_Double { + case string(String) + case seq_of_Double([Double]) + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var seq_of_Double: [Double]? { + switch self { + case let .seq_of_Double(seq_of_Double): return seq_of_Double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let string: String = value.fromJSValue() { + return .string(string) + } + if let seq_of_Double: [Double] = value.fromJSValue() { + return .seq_of_Double(seq_of_Double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .string(string): + return string.jsValue + case let .seq_of_Double(seq_of_Double): + return seq_of_Double.jsValue + } + } +} + +public protocol Any_String_or_seq_of_String: ConvertibleToJSValue {} +extension String: Any_String_or_seq_of_String {} +extension Array: Any_String_or_seq_of_String where Element == String {} + +public enum String_or_seq_of_String: JSValueCompatible, Any_String_or_seq_of_String { + case string(String) + case seq_of_String([String]) + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var seq_of_String: [String]? { + switch self { + case let .seq_of_String(seq_of_String): return seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let string: String = value.fromJSValue() { + return .string(string) + } + if let seq_of_String: [String] = value.fromJSValue() { + return .seq_of_String(seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .string(string): + return string.jsValue + case let .seq_of_String(seq_of_String): + return seq_of_String.jsValue + } + } +} + +public protocol Any_TimerHandler: ConvertibleToJSValue {} +extension JSFunction: Any_TimerHandler {} +extension String: Any_TimerHandler {} + +public enum TimerHandler: JSValueCompatible, Any_TimerHandler { + case jsFunction(JSFunction) + case string(String) + + var jsFunction: JSFunction? { + switch self { + case let .jsFunction(jsFunction): return jsFunction + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let jsFunction: JSFunction = value.fromJSValue() { + return .jsFunction(jsFunction) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .jsFunction(jsFunction): + return jsFunction.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} +extension Blob: Any_XMLHttpRequestBodyInit {} +extension BufferSource: Any_XMLHttpRequestBodyInit {} +extension FormData: Any_XMLHttpRequestBodyInit {} +extension String: Any_XMLHttpRequestBodyInit {} +extension URLSearchParams: Any_XMLHttpRequestBodyInit {} + +public enum XMLHttpRequestBodyInit: JSValueCompatible, Any_XMLHttpRequestBodyInit { + case blob(Blob) + case bufferSource(BufferSource) + case formData(FormData) + case string(String) + case urlSearchParams(URLSearchParams) + + var blob: Blob? { + switch self { + case let .blob(blob): return blob + default: return nil + } + } + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var formData: FormData? { + switch self { + case let .formData(formData): return formData + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var urlSearchParams: URLSearchParams? { + switch self { + case let .urlSearchParams(urlSearchParams): return urlSearchParams + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let blob: Blob = value.fromJSValue() { + return .blob(blob) + } + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let formData: FormData = value.fromJSValue() { + return .formData(formData) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + if let urlSearchParams: URLSearchParams = value.fromJSValue() { + return .urlSearchParams(urlSearchParams) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .blob(blob): + return blob.jsValue + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .formData(formData): + return formData.jsValue + case let .string(string): + return string.jsValue + case let .urlSearchParams(urlSearchParams): + return urlSearchParams.jsValue + } + } +} + +public protocol Any_nullable_Double_or_seq_of_nullable_Double: ConvertibleToJSValue {} +extension Optional: Any_nullable_Double_or_seq_of_nullable_Double where Wrapped == Double {} +extension Array: Any_nullable_Double_or_seq_of_nullable_Double where Element == Double? {} + +public enum nullable_Double_or_seq_of_nullable_Double: JSValueCompatible, Any_nullable_Double_or_seq_of_nullable_Double { + case nullable_Double(Double?) + case seq_of_nullable_Double([Double?]) + + var nullable_Double: Double?? { + switch self { + case let .nullable_Double(nullable_Double): return nullable_Double + default: return nil + } + } + + var seq_of_nullable_Double: [Double?]? { + switch self { + case let .seq_of_nullable_Double(seq_of_nullable_Double): return seq_of_nullable_Double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let nullable_Double: Double? = value.fromJSValue() { + return .nullable_Double(nullable_Double) + } + if let seq_of_nullable_Double: [Double?] = value.fromJSValue() { + return .seq_of_nullable_Double(seq_of_nullable_Double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .nullable_Double(nullable_Double): + return nullable_Double.jsValue + case let .seq_of_nullable_Double(seq_of_nullable_Double): + return seq_of_nullable_Double.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/GenericTransformStream.swift b/Sources/DOMKit/WebIDL/GenericTransformStream.swift deleted file mode 100644 index a5773286..00000000 --- a/Sources/DOMKit/WebIDL/GenericTransformStream.swift +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol GenericTransformStream: JSBridgedClass {} -public extension GenericTransformStream { - @inlinable var readable: ReadableStream { ReadonlyAttribute[Strings.readable, in: jsObject] } - - @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/GetAnimationsOptions.swift b/Sources/DOMKit/WebIDL/GetAnimationsOptions.swift deleted file mode 100644 index 7acb68cd..00000000 --- a/Sources/DOMKit/WebIDL/GetAnimationsOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class GetAnimationsOptions: BridgedDictionary { - public convenience init(subtree: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.subtree] = subtree.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var subtree: Bool -} diff --git a/Sources/DOMKit/WebIDL/GetRootNodeOptions.swift b/Sources/DOMKit/WebIDL/GetRootNodeOptions.swift deleted file mode 100644 index 642eaae9..00000000 --- a/Sources/DOMKit/WebIDL/GetRootNodeOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class GetRootNodeOptions: BridgedDictionary { - public convenience init(composed: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.composed] = composed.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var composed: Bool -} diff --git a/Sources/DOMKit/WebIDL/GlobalEventHandlers.swift b/Sources/DOMKit/WebIDL/GlobalEventHandlers.swift deleted file mode 100644 index b2acb292..00000000 --- a/Sources/DOMKit/WebIDL/GlobalEventHandlers.swift +++ /dev/null @@ -1,347 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol GlobalEventHandlers: JSBridgedClass {} -public extension GlobalEventHandlers { - @inlinable var onabort: EventHandler { - get { ClosureAttribute1Optional[Strings.onabort, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onabort, in: jsObject] = newValue } - } - - @inlinable var onauxclick: EventHandler { - get { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] = newValue } - } - - @inlinable var onblur: EventHandler { - get { ClosureAttribute1Optional[Strings.onblur, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onblur, in: jsObject] = newValue } - } - - @inlinable var oncancel: EventHandler { - get { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] = newValue } - } - - @inlinable var oncanplay: EventHandler { - get { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] = newValue } - } - - @inlinable var oncanplaythrough: EventHandler { - get { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] = newValue } - } - - @inlinable var onchange: EventHandler { - get { ClosureAttribute1Optional[Strings.onchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onchange, in: jsObject] = newValue } - } - - @inlinable var onclick: EventHandler { - get { ClosureAttribute1Optional[Strings.onclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onclick, in: jsObject] = newValue } - } - - @inlinable var onclose: EventHandler { - get { ClosureAttribute1Optional[Strings.onclose, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onclose, in: jsObject] = newValue } - } - - @inlinable var oncontextlost: EventHandler { - get { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] = newValue } - } - - @inlinable var oncontextmenu: EventHandler { - get { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] = newValue } - } - - @inlinable var oncontextrestored: EventHandler { - get { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] = newValue } - } - - @inlinable var oncuechange: EventHandler { - get { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] = newValue } - } - - @inlinable var ondblclick: EventHandler { - get { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] = newValue } - } - - @inlinable var ondrag: EventHandler { - get { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] = newValue } - } - - @inlinable var ondragend: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] = newValue } - } - - @inlinable var ondragenter: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] = newValue } - } - - @inlinable var ondragleave: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] = newValue } - } - - @inlinable var ondragover: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] = newValue } - } - - @inlinable var ondragstart: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] = newValue } - } - - @inlinable var ondrop: EventHandler { - get { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] = newValue } - } - - @inlinable var ondurationchange: EventHandler { - get { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] = newValue } - } - - @inlinable var onemptied: EventHandler { - get { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] = newValue } - } - - @inlinable var onended: EventHandler { - get { ClosureAttribute1Optional[Strings.onended, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onended, in: jsObject] = newValue } - } - - @inlinable var onerror: OnErrorEventHandler { - get { ClosureAttribute5Optional[Strings.onerror, in: jsObject] } - nonmutating set { ClosureAttribute5Optional[Strings.onerror, in: jsObject] = newValue } - } - - @inlinable var onfocus: EventHandler { - get { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] = newValue } - } - - @inlinable var onformdata: EventHandler { - get { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] = newValue } - } - - @inlinable var oninput: EventHandler { - get { ClosureAttribute1Optional[Strings.oninput, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oninput, in: jsObject] = newValue } - } - - @inlinable var oninvalid: EventHandler { - get { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] = newValue } - } - - @inlinable var onkeydown: EventHandler { - get { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] = newValue } - } - - @inlinable var onkeypress: EventHandler { - get { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] = newValue } - } - - @inlinable var onkeyup: EventHandler { - get { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] = newValue } - } - - @inlinable var onload: EventHandler { - get { ClosureAttribute1Optional[Strings.onload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onload, in: jsObject] = newValue } - } - - @inlinable var onloadeddata: EventHandler { - get { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] = newValue } - } - - @inlinable var onloadedmetadata: EventHandler { - get { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] = newValue } - } - - @inlinable var onloadstart: EventHandler { - get { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] = newValue } - } - - @inlinable var onmousedown: EventHandler { - get { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] = newValue } - } - - @inlinable var onmouseenter: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] = newValue } - } - - @inlinable var onmouseleave: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] = newValue } - } - - @inlinable var onmousemove: EventHandler { - get { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] = newValue } - } - - @inlinable var onmouseout: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] = newValue } - } - - @inlinable var onmouseover: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] = newValue } - } - - @inlinable var onmouseup: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] = newValue } - } - - @inlinable var onpause: EventHandler { - get { ClosureAttribute1Optional[Strings.onpause, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpause, in: jsObject] = newValue } - } - - @inlinable var onplay: EventHandler { - get { ClosureAttribute1Optional[Strings.onplay, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onplay, in: jsObject] = newValue } - } - - @inlinable var onplaying: EventHandler { - get { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] = newValue } - } - - @inlinable var onprogress: EventHandler { - get { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] = newValue } - } - - @inlinable var onratechange: EventHandler { - get { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] = newValue } - } - - @inlinable var onreset: EventHandler { - get { ClosureAttribute1Optional[Strings.onreset, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onreset, in: jsObject] = newValue } - } - - @inlinable var onresize: EventHandler { - get { ClosureAttribute1Optional[Strings.onresize, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onresize, in: jsObject] = newValue } - } - - @inlinable var onscroll: EventHandler { - get { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] = newValue } - } - - @inlinable var onsecuritypolicyviolation: EventHandler { - get { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] = newValue } - } - - @inlinable var onseeked: EventHandler { - get { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] = newValue } - } - - @inlinable var onseeking: EventHandler { - get { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] = newValue } - } - - @inlinable var onselect: EventHandler { - get { ClosureAttribute1Optional[Strings.onselect, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onselect, in: jsObject] = newValue } - } - - @inlinable var onslotchange: EventHandler { - get { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] = newValue } - } - - @inlinable var onstalled: EventHandler { - get { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] = newValue } - } - - @inlinable var onsubmit: EventHandler { - get { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] = newValue } - } - - @inlinable var onsuspend: EventHandler { - get { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] = newValue } - } - - @inlinable var ontimeupdate: EventHandler { - get { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] = newValue } - } - - @inlinable var ontoggle: EventHandler { - get { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] = newValue } - } - - @inlinable var onvolumechange: EventHandler { - get { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] = newValue } - } - - @inlinable var onwaiting: EventHandler { - get { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationend: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationiteration: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationstart: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] = newValue } - } - - @inlinable var onwebkittransitionend: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] = newValue } - } - - @inlinable var onwheel: EventHandler { - get { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLAllCollection.swift b/Sources/DOMKit/WebIDL/HTMLAllCollection.swift deleted file mode 100644 index 6aec5e93..00000000 --- a/Sources/DOMKit/WebIDL/HTMLAllCollection.swift +++ /dev/null @@ -1,31 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLAllCollection: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLAllCollection].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element { - jsObject[key].fromJSValue()! - } - - @inlinable public subscript(key: String) -> Element_or_HTMLCollection? { - jsObject[key].fromJSValue() - } - - @inlinable public func item(nameOrIndex: String? = nil) -> Element_or_HTMLCollection? { - let this = jsObject - return this[Strings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLAnchorElement.swift b/Sources/DOMKit/WebIDL/HTMLAnchorElement.swift deleted file mode 100644 index be82d0bf..00000000 --- a/Sources/DOMKit/WebIDL/HTMLAnchorElement.swift +++ /dev/null @@ -1,72 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLAnchorElement: HTMLElement, HTMLHyperlinkElementUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAnchorElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) - _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) - _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) - _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var download: String - - @ReadWriteAttribute - public var ping: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var hreflang: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var coords: String - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var rev: String - - @ReadWriteAttribute - public var shape: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLAreaElement.swift b/Sources/DOMKit/WebIDL/HTMLAreaElement.swift deleted file mode 100644 index edb88a62..00000000 --- a/Sources/DOMKit/WebIDL/HTMLAreaElement.swift +++ /dev/null @@ -1,56 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLAreaElement: HTMLElement, HTMLHyperlinkElementUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAreaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) - _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) - _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) - _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _noHref = ReadWriteAttribute(jsObject: jsObject, name: Strings.noHref) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var coords: String - - @ReadWriteAttribute - public var shape: String - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var download: String - - @ReadWriteAttribute - public var ping: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var noHref: Bool -} diff --git a/Sources/DOMKit/WebIDL/HTMLAudioElement.swift b/Sources/DOMKit/WebIDL/HTMLAudioElement.swift deleted file mode 100644 index 18ef1c2d..00000000 --- a/Sources/DOMKit/WebIDL/HTMLAudioElement.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLAudioElement: HTMLMediaElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAudioElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLBRElement.swift b/Sources/DOMKit/WebIDL/HTMLBRElement.swift deleted file mode 100644 index 909dc0e8..00000000 --- a/Sources/DOMKit/WebIDL/HTMLBRElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLBRElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBRElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _clear = ReadWriteAttribute(jsObject: jsObject, name: Strings.clear) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var clear: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLBaseElement.swift b/Sources/DOMKit/WebIDL/HTMLBaseElement.swift deleted file mode 100644 index 706fd766..00000000 --- a/Sources/DOMKit/WebIDL/HTMLBaseElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLBaseElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBaseElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var href: String - - @ReadWriteAttribute - public var target: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLBodyElement.swift b/Sources/DOMKit/WebIDL/HTMLBodyElement.swift deleted file mode 100644 index 2597a3cb..00000000 --- a/Sources/DOMKit/WebIDL/HTMLBodyElement.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLBodyElement: HTMLElement, WindowEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBodyElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _link = ReadWriteAttribute(jsObject: jsObject, name: Strings.link) - _vLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.vLink) - _aLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.aLink) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _background = ReadWriteAttribute(jsObject: jsObject, name: Strings.background) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var link: String - - @ReadWriteAttribute - public var vLink: String - - @ReadWriteAttribute - public var aLink: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var background: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLButtonElement.swift b/Sources/DOMKit/WebIDL/HTMLButtonElement.swift deleted file mode 100644 index 2b7112a4..00000000 --- a/Sources/DOMKit/WebIDL/HTMLButtonElement.swift +++ /dev/null @@ -1,87 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLButtonElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLButtonElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) - _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) - _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) - _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) - _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var formAction: String - - @ReadWriteAttribute - public var formEnctype: String - - @ReadWriteAttribute - public var formMethod: String - - @ReadWriteAttribute - public var formNoValidate: Bool - - @ReadWriteAttribute - public var formTarget: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} diff --git a/Sources/DOMKit/WebIDL/HTMLCanvasElement.swift b/Sources/DOMKit/WebIDL/HTMLCanvasElement.swift deleted file mode 100644 index 6d29b873..00000000 --- a/Sources/DOMKit/WebIDL/HTMLCanvasElement.swift +++ /dev/null @@ -1,41 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLCanvasElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLCanvasElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @inlinable public func getContext(contextId: String, options: JSValue? = nil) -> RenderingContext? { - let this = jsObject - return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toDataURL(type: String? = nil, quality: JSValue? = nil) -> String { - let this = jsObject - return this[Strings.toDataURL].function!(this: this, arguments: [type?.jsValue ?? .undefined, quality?.jsValue ?? .undefined]).fromJSValue()! - } - - // XXX: member 'toBlob' is ignored - - @inlinable public func transferControlToOffscreen() -> OffscreenCanvas { - let this = jsObject - return this[Strings.transferControlToOffscreen].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLCanvasElement_or_OffscreenCanvas.swift b/Sources/DOMKit/WebIDL/HTMLCanvasElement_or_OffscreenCanvas.swift deleted file mode 100644 index 99288d31..00000000 --- a/Sources/DOMKit/WebIDL/HTMLCanvasElement_or_OffscreenCanvas.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} -extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} - -public enum HTMLCanvasElement_or_OffscreenCanvas: JSValueCompatible, Any_HTMLCanvasElement_or_OffscreenCanvas { - case htmlCanvasElement(HTMLCanvasElement) - case offscreenCanvas(OffscreenCanvas) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLCollection.swift b/Sources/DOMKit/WebIDL/HTMLCollection.swift deleted file mode 100644 index 4597482a..00000000 --- a/Sources/DOMKit/WebIDL/HTMLCollection.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLCollection: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLCollection].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Element? { - jsObject[key].fromJSValue() - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLDListElement.swift b/Sources/DOMKit/WebIDL/HTMLDListElement.swift deleted file mode 100644 index 084fa859..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDListElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} diff --git a/Sources/DOMKit/WebIDL/HTMLDataElement.swift b/Sources/DOMKit/WebIDL/HTMLDataElement.swift deleted file mode 100644 index 7366bf0c..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDataElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDataElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLDataListElement.swift b/Sources/DOMKit/WebIDL/HTMLDataListElement.swift deleted file mode 100644 index 84ec303e..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDataListElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDataListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var options: HTMLCollection -} diff --git a/Sources/DOMKit/WebIDL/HTMLDetailsElement.swift b/Sources/DOMKit/WebIDL/HTMLDetailsElement.swift deleted file mode 100644 index a0383357..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDetailsElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDetailsElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDetailsElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var open: Bool -} diff --git a/Sources/DOMKit/WebIDL/HTMLDialogElement.swift b/Sources/DOMKit/WebIDL/HTMLDialogElement.swift deleted file mode 100644 index cbd398b3..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDialogElement.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDialogElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDialogElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) - _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var open: Bool - - @ReadWriteAttribute - public var returnValue: String - - @inlinable public func show() { - let this = jsObject - _ = this[Strings.show].function!(this: this, arguments: []) - } - - @inlinable public func showModal() { - let this = jsObject - _ = this[Strings.showModal].function!(this: this, arguments: []) - } - - @inlinable public func close(returnValue: String? = nil) { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: [returnValue?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLDirectoryElement.swift b/Sources/DOMKit/WebIDL/HTMLDirectoryElement.swift deleted file mode 100644 index 840849e5..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDirectoryElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDirectoryElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDirectoryElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} diff --git a/Sources/DOMKit/WebIDL/HTMLDivElement.swift b/Sources/DOMKit/WebIDL/HTMLDivElement.swift deleted file mode 100644 index 437437a4..00000000 --- a/Sources/DOMKit/WebIDL/HTMLDivElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLDivElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDivElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLElement.swift b/Sources/DOMKit/WebIDL/HTMLElement.swift deleted file mode 100644 index fd504169..00000000 --- a/Sources/DOMKit/WebIDL/HTMLElement.swift +++ /dev/null @@ -1,78 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) - _lang = ReadWriteAttribute(jsObject: jsObject, name: Strings.lang) - _translate = ReadWriteAttribute(jsObject: jsObject, name: Strings.translate) - _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) - _hidden = ReadWriteAttribute(jsObject: jsObject, name: Strings.hidden) - _inert = ReadWriteAttribute(jsObject: jsObject, name: Strings.inert) - _accessKey = ReadWriteAttribute(jsObject: jsObject, name: Strings.accessKey) - _accessKeyLabel = ReadonlyAttribute(jsObject: jsObject, name: Strings.accessKeyLabel) - _draggable = ReadWriteAttribute(jsObject: jsObject, name: Strings.draggable) - _spellcheck = ReadWriteAttribute(jsObject: jsObject, name: Strings.spellcheck) - _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) - _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) - _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var title: String - - @ReadWriteAttribute - public var lang: String - - @ReadWriteAttribute - public var translate: Bool - - @ReadWriteAttribute - public var dir: String - - @ReadWriteAttribute - public var hidden: Bool - - @ReadWriteAttribute - public var inert: Bool - - @inlinable public func click() { - let this = jsObject - _ = this[Strings.click].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var accessKey: String - - @ReadonlyAttribute - public var accessKeyLabel: String - - @ReadWriteAttribute - public var draggable: Bool - - @ReadWriteAttribute - public var spellcheck: Bool - - @ReadWriteAttribute - public var autocapitalize: String - - @ReadWriteAttribute - public var innerText: String - - @ReadWriteAttribute - public var outerText: String - - @inlinable public func attachInternals() -> ElementInternals { - let this = jsObject - return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLElement_or_Int32.swift b/Sources/DOMKit/WebIDL/HTMLElement_or_Int32.swift deleted file mode 100644 index d32bd33d..00000000 --- a/Sources/DOMKit/WebIDL/HTMLElement_or_Int32.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_HTMLElement_or_Int32: ConvertibleToJSValue {} -extension HTMLElement: Any_HTMLElement_or_Int32 {} -extension Int32: Any_HTMLElement_or_Int32 {} - -public enum HTMLElement_or_Int32: JSValueCompatible, Any_HTMLElement_or_Int32 { - case htmlElement(HTMLElement) - case int32(Int32) - - var htmlElement: HTMLElement? { - switch self { - case let .htmlElement(htmlElement): return htmlElement - default: return nil - } - } - - var int32: Int32? { - switch self { - case let .int32(int32): return int32 - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlElement: HTMLElement = value.fromJSValue() { - return .htmlElement(htmlElement) - } - if let int32: Int32 = value.fromJSValue() { - return .int32(int32) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlElement(htmlElement): - return htmlElement.jsValue - case let .int32(int32): - return int32.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLEmbedElement.swift b/Sources/DOMKit/WebIDL/HTMLEmbedElement.swift deleted file mode 100644 index e5f0d228..00000000 --- a/Sources/DOMKit/WebIDL/HTMLEmbedElement.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLEmbedElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLEmbedElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var name: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLFieldSetElement.swift b/Sources/DOMKit/WebIDL/HTMLFieldSetElement.swift deleted file mode 100644 index 9cff89b1..00000000 --- a/Sources/DOMKit/WebIDL/HTMLFieldSetElement.swift +++ /dev/null @@ -1,63 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLFieldSetElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFieldSetElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var elements: HTMLCollection - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLFontElement.swift b/Sources/DOMKit/WebIDL/HTMLFontElement.swift deleted file mode 100644 index f3c7b5ab..00000000 --- a/Sources/DOMKit/WebIDL/HTMLFontElement.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLFontElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFontElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) - _face = ReadWriteAttribute(jsObject: jsObject, name: Strings.face) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var color: String - - @ReadWriteAttribute - public var face: String - - @ReadWriteAttribute - public var size: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLFormControlsCollection.swift b/Sources/DOMKit/WebIDL/HTMLFormControlsCollection.swift deleted file mode 100644 index bc0a9c1e..00000000 --- a/Sources/DOMKit/WebIDL/HTMLFormControlsCollection.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLFormControlsCollection: HTMLCollection { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormControlsCollection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public subscript(key: String) -> Element_or_RadioNodeList? { - jsObject[key].fromJSValue() - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLFormElement.swift b/Sources/DOMKit/WebIDL/HTMLFormElement.swift deleted file mode 100644 index 4f10d86d..00000000 --- a/Sources/DOMKit/WebIDL/HTMLFormElement.swift +++ /dev/null @@ -1,101 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLFormElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _acceptCharset = ReadWriteAttribute(jsObject: jsObject, name: Strings.acceptCharset) - _action = ReadWriteAttribute(jsObject: jsObject, name: Strings.action) - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _enctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.enctype) - _encoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.encoding) - _method = ReadWriteAttribute(jsObject: jsObject, name: Strings.method) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _noValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.noValidate) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var acceptCharset: String - - @ReadWriteAttribute - public var action: String - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var enctype: String - - @ReadWriteAttribute - public var encoding: String - - @ReadWriteAttribute - public var method: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var noValidate: Bool - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadonlyAttribute - public var elements: HTMLFormControlsCollection - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element { - jsObject[key].fromJSValue()! - } - - @inlinable public subscript(key: String) -> Element_or_RadioNodeList { - jsObject[key].fromJSValue()! - } - - @inlinable public func submit() { - let this = jsObject - _ = this[Strings.submit].function!(this: this, arguments: []) - } - - @inlinable public func requestSubmit(submitter: HTMLElement? = nil) { - let this = jsObject - _ = this[Strings.requestSubmit].function!(this: this, arguments: [submitter?.jsValue ?? .undefined]) - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLFrameElement.swift b/Sources/DOMKit/WebIDL/HTMLFrameElement.swift deleted file mode 100644 index 7c0f3bf5..00000000 --- a/Sources/DOMKit/WebIDL/HTMLFrameElement.swift +++ /dev/null @@ -1,56 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLFrameElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) - _noResize = ReadWriteAttribute(jsObject: jsObject, name: Strings.noResize) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) - _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) - _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var scrolling: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var frameBorder: String - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var noResize: Bool - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @ReadWriteAttribute - public var marginHeight: String - - @ReadWriteAttribute - public var marginWidth: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLFrameSetElement.swift b/Sources/DOMKit/WebIDL/HTMLFrameSetElement.swift deleted file mode 100644 index 01d50eb6..00000000 --- a/Sources/DOMKit/WebIDL/HTMLFrameSetElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLFrameSetElement: HTMLElement, WindowEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameSetElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) - _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cols: String - - @ReadWriteAttribute - public var rows: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLHRElement.swift b/Sources/DOMKit/WebIDL/HTMLHRElement.swift deleted file mode 100644 index e9030cd1..00000000 --- a/Sources/DOMKit/WebIDL/HTMLHRElement.swift +++ /dev/null @@ -1,36 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLHRElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHRElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) - _noShade = ReadWriteAttribute(jsObject: jsObject, name: Strings.noShade) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var color: String - - @ReadWriteAttribute - public var noShade: Bool - - @ReadWriteAttribute - public var size: String - - @ReadWriteAttribute - public var width: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLHeadElement.swift b/Sources/DOMKit/WebIDL/HTMLHeadElement.swift deleted file mode 100644 index 4a2e8d24..00000000 --- a/Sources/DOMKit/WebIDL/HTMLHeadElement.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLHeadElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLHeadingElement.swift b/Sources/DOMKit/WebIDL/HTMLHeadingElement.swift deleted file mode 100644 index 5420f27b..00000000 --- a/Sources/DOMKit/WebIDL/HTMLHeadingElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLHeadingElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadingElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLHtmlElement.swift b/Sources/DOMKit/WebIDL/HTMLHtmlElement.swift deleted file mode 100644 index b7d8e824..00000000 --- a/Sources/DOMKit/WebIDL/HTMLHtmlElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLHtmlElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHtmlElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _version = ReadWriteAttribute(jsObject: jsObject, name: Strings.version) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var version: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLHyperlinkElementUtils.swift b/Sources/DOMKit/WebIDL/HTMLHyperlinkElementUtils.swift deleted file mode 100644 index 37ed259e..00000000 --- a/Sources/DOMKit/WebIDL/HTMLHyperlinkElementUtils.swift +++ /dev/null @@ -1,59 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol HTMLHyperlinkElementUtils: JSBridgedClass {} -public extension HTMLHyperlinkElementUtils { - @inlinable var href: String { - get { ReadWriteAttribute[Strings.href, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.href, in: jsObject] = newValue } - } - - @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } - - @inlinable var `protocol`: String { - get { ReadWriteAttribute[Strings.protocol, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.protocol, in: jsObject] = newValue } - } - - @inlinable var username: String { - get { ReadWriteAttribute[Strings.username, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.username, in: jsObject] = newValue } - } - - @inlinable var password: String { - get { ReadWriteAttribute[Strings.password, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.password, in: jsObject] = newValue } - } - - @inlinable var host: String { - get { ReadWriteAttribute[Strings.host, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.host, in: jsObject] = newValue } - } - - @inlinable var hostname: String { - get { ReadWriteAttribute[Strings.hostname, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.hostname, in: jsObject] = newValue } - } - - @inlinable var port: String { - get { ReadWriteAttribute[Strings.port, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.port, in: jsObject] = newValue } - } - - @inlinable var pathname: String { - get { ReadWriteAttribute[Strings.pathname, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.pathname, in: jsObject] = newValue } - } - - @inlinable var search: String { - get { ReadWriteAttribute[Strings.search, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.search, in: jsObject] = newValue } - } - - @inlinable var hash: String { - get { ReadWriteAttribute[Strings.hash, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.hash, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLIFrameElement.swift b/Sources/DOMKit/WebIDL/HTMLIFrameElement.swift deleted file mode 100644 index 3f2be596..00000000 --- a/Sources/DOMKit/WebIDL/HTMLIFrameElement.swift +++ /dev/null @@ -1,93 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLIFrameElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLIFrameElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _srcdoc = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcdoc) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _sandbox = ReadonlyAttribute(jsObject: jsObject, name: Strings.sandbox) - _allow = ReadWriteAttribute(jsObject: jsObject, name: Strings.allow) - _allowFullscreen = ReadWriteAttribute(jsObject: jsObject, name: Strings.allowFullscreen) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) - _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) - _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) - _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srcdoc: String - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var sandbox: DOMTokenList - - @ReadWriteAttribute - public var allow: String - - @ReadWriteAttribute - public var allowFullscreen: Bool - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var loading: String - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var scrolling: String - - @ReadWriteAttribute - public var frameBorder: String - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var marginHeight: String - - @ReadWriteAttribute - public var marginWidth: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLImageElement.swift b/Sources/DOMKit/WebIDL/HTMLImageElement.swift deleted file mode 100644 index 6fb16310..00000000 --- a/Sources/DOMKit/WebIDL/HTMLImageElement.swift +++ /dev/null @@ -1,120 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLImageElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLImageElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) - _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) - _isMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.isMap) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _naturalWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalWidth) - _naturalHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalHeight) - _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) - _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _decoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.decoding) - _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _lowsrc = ReadWriteAttribute(jsObject: jsObject, name: Strings.lowsrc) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) - _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srcset: String - - @ReadWriteAttribute - public var sizes: String - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var useMap: String - - @ReadWriteAttribute - public var isMap: Bool - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var naturalWidth: UInt32 - - @ReadonlyAttribute - public var naturalHeight: UInt32 - - @ReadonlyAttribute - public var complete: Bool - - @ReadonlyAttribute - public var currentSrc: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var decoding: String - - @ReadWriteAttribute - public var loading: String - - @inlinable public func decode() -> JSPromise { - let this = jsObject - return this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func decode() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var lowsrc: String - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var border: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLInputElement.swift b/Sources/DOMKit/WebIDL/HTMLInputElement.swift deleted file mode 100644 index d20d436e..00000000 --- a/Sources/DOMKit/WebIDL/HTMLInputElement.swift +++ /dev/null @@ -1,246 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLInputElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLInputElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _accept = ReadWriteAttribute(jsObject: jsObject, name: Strings.accept) - _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _defaultChecked = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultChecked) - _checked = ReadWriteAttribute(jsObject: jsObject, name: Strings.checked) - _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _files = ReadWriteAttribute(jsObject: jsObject, name: Strings.files) - _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) - _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) - _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) - _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) - _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _indeterminate = ReadWriteAttribute(jsObject: jsObject, name: Strings.indeterminate) - _list = ReadonlyAttribute(jsObject: jsObject, name: Strings.list) - _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) - _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) - _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) - _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) - _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _pattern = ReadWriteAttribute(jsObject: jsObject, name: Strings.pattern) - _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) - _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) - _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _step = ReadWriteAttribute(jsObject: jsObject, name: Strings.step) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _valueAsDate = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsDate) - _valueAsNumber = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsNumber) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) - _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) - _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var accept: String - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var defaultChecked: Bool - - @ReadWriteAttribute - public var checked: Bool - - @ReadWriteAttribute - public var dirName: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var files: FileList? - - @ReadWriteAttribute - public var formAction: String - - @ReadWriteAttribute - public var formEnctype: String - - @ReadWriteAttribute - public var formMethod: String - - @ReadWriteAttribute - public var formNoValidate: Bool - - @ReadWriteAttribute - public var formTarget: String - - @ReadWriteAttribute - public var height: UInt32 - - @ReadWriteAttribute - public var indeterminate: Bool - - @ReadonlyAttribute - public var list: HTMLElement? - - @ReadWriteAttribute - public var max: String - - @ReadWriteAttribute - public var maxLength: Int32 - - @ReadWriteAttribute - public var min: String - - @ReadWriteAttribute - public var minLength: Int32 - - @ReadWriteAttribute - public var multiple: Bool - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var pattern: String - - @ReadWriteAttribute - public var placeholder: String - - @ReadWriteAttribute - public var readOnly: Bool - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var size: UInt32 - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var step: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var valueAsDate: JSObject? - - @ReadWriteAttribute - public var valueAsNumber: Double - - @ReadWriteAttribute - public var width: UInt32 - - @inlinable public func stepUp(n: Int32? = nil) { - let this = jsObject - _ = this[Strings.stepUp].function!(this: this, arguments: [n?.jsValue ?? .undefined]) - } - - @inlinable public func stepDown(n: Int32? = nil) { - let this = jsObject - _ = this[Strings.stepDown].function!(this: this, arguments: [n?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList? - - @inlinable public func select() { - let this = jsObject - _ = this[Strings.select].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var selectionStart: UInt32? - - @ReadWriteAttribute - public var selectionEnd: UInt32? - - @ReadWriteAttribute - public var selectionDirection: String? - - @inlinable public func setRangeText(replacement: String) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) - } - - @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) - } - - @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { - let this = jsObject - _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) - } - - @inlinable public func showPicker() { - let this = jsObject - _ = this[Strings.showPicker].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var useMap: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLLIElement.swift b/Sources/DOMKit/WebIDL/HTMLLIElement.swift deleted file mode 100644 index e3b89ece..00000000 --- a/Sources/DOMKit/WebIDL/HTMLLIElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLLIElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLIElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Int32 - - @ReadWriteAttribute - public var type: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLLabelElement.swift b/Sources/DOMKit/WebIDL/HTMLLabelElement.swift deleted file mode 100644 index 5140458b..00000000 --- a/Sources/DOMKit/WebIDL/HTMLLabelElement.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLLabelElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLabelElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) - _control = ReadonlyAttribute(jsObject: jsObject, name: Strings.control) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var htmlFor: String - - @ReadonlyAttribute - public var control: HTMLElement? -} diff --git a/Sources/DOMKit/WebIDL/HTMLLegendElement.swift b/Sources/DOMKit/WebIDL/HTMLLegendElement.swift deleted file mode 100644 index af091033..00000000 --- a/Sources/DOMKit/WebIDL/HTMLLegendElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLLegendElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLegendElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var align: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLLinkElement.swift b/Sources/DOMKit/WebIDL/HTMLLinkElement.swift deleted file mode 100644 index 78cffb76..00000000 --- a/Sources/DOMKit/WebIDL/HTMLLinkElement.swift +++ /dev/null @@ -1,88 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLLinkElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLinkElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _as = ReadWriteAttribute(jsObject: jsObject, name: Strings.as) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) - _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _sizes = ReadonlyAttribute(jsObject: jsObject, name: Strings.sizes) - _imageSrcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSrcset) - _imageSizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSizes) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) - _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var href: String - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var rel: String - - @ReadWriteAttribute - public var `as`: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var hreflang: String - - @ReadWriteAttribute - public var type: String - - @ReadonlyAttribute - public var sizes: DOMTokenList - - @ReadWriteAttribute - public var imageSrcset: String - - @ReadWriteAttribute - public var imageSizes: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @ReadWriteAttribute - public var disabled: Bool - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var rev: String - - @ReadWriteAttribute - public var target: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLMapElement.swift b/Sources/DOMKit/WebIDL/HTMLMapElement.swift deleted file mode 100644 index 47389672..00000000 --- a/Sources/DOMKit/WebIDL/HTMLMapElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLMapElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMapElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _areas = ReadonlyAttribute(jsObject: jsObject, name: Strings.areas) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var areas: HTMLCollection -} diff --git a/Sources/DOMKit/WebIDL/HTMLMarqueeElement.swift b/Sources/DOMKit/WebIDL/HTMLMarqueeElement.swift deleted file mode 100644 index 9747d62c..00000000 --- a/Sources/DOMKit/WebIDL/HTMLMarqueeElement.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLMarqueeElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMarqueeElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _behavior = ReadWriteAttribute(jsObject: jsObject, name: Strings.behavior) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _direction = ReadWriteAttribute(jsObject: jsObject, name: Strings.direction) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) - _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) - _scrollAmount = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollAmount) - _scrollDelay = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollDelay) - _trueSpeed = ReadWriteAttribute(jsObject: jsObject, name: Strings.trueSpeed) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var behavior: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var direction: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var loop: Int32 - - @ReadWriteAttribute - public var scrollAmount: UInt32 - - @ReadWriteAttribute - public var scrollDelay: UInt32 - - @ReadWriteAttribute - public var trueSpeed: Bool - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var width: String - - @inlinable public func start() { - let this = jsObject - _ = this[Strings.start].function!(this: this, arguments: []) - } - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLMediaElement.swift b/Sources/DOMKit/WebIDL/HTMLMediaElement.swift deleted file mode 100644 index fe74c1b3..00000000 --- a/Sources/DOMKit/WebIDL/HTMLMediaElement.swift +++ /dev/null @@ -1,182 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLMediaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMediaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _networkState = ReadonlyAttribute(jsObject: jsObject, name: Strings.networkState) - _preload = ReadWriteAttribute(jsObject: jsObject, name: Strings.preload) - _buffered = ReadonlyAttribute(jsObject: jsObject, name: Strings.buffered) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _seeking = ReadonlyAttribute(jsObject: jsObject, name: Strings.seeking) - _currentTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentTime) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _paused = ReadonlyAttribute(jsObject: jsObject, name: Strings.paused) - _defaultPlaybackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultPlaybackRate) - _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) - _preservesPitch = ReadWriteAttribute(jsObject: jsObject, name: Strings.preservesPitch) - _played = ReadonlyAttribute(jsObject: jsObject, name: Strings.played) - _seekable = ReadonlyAttribute(jsObject: jsObject, name: Strings.seekable) - _ended = ReadonlyAttribute(jsObject: jsObject, name: Strings.ended) - _autoplay = ReadWriteAttribute(jsObject: jsObject, name: Strings.autoplay) - _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) - _controls = ReadWriteAttribute(jsObject: jsObject, name: Strings.controls) - _volume = ReadWriteAttribute(jsObject: jsObject, name: Strings.volume) - _muted = ReadWriteAttribute(jsObject: jsObject, name: Strings.muted) - _defaultMuted = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultMuted) - _audioTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioTracks) - _videoTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoTracks) - _textTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.textTracks) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var error: MediaError? - - @ReadWriteAttribute - public var src: String - - // XXX: member 'srcObject' is ignored - - @ReadonlyAttribute - public var currentSrc: String - - @ReadWriteAttribute - public var crossOrigin: String? - - public static let NETWORK_EMPTY: UInt16 = 0 - - public static let NETWORK_IDLE: UInt16 = 1 - - public static let NETWORK_LOADING: UInt16 = 2 - - public static let NETWORK_NO_SOURCE: UInt16 = 3 - - @ReadonlyAttribute - public var networkState: UInt16 - - @ReadWriteAttribute - public var preload: String - - @ReadonlyAttribute - public var buffered: TimeRanges - - @inlinable public func load() { - let this = jsObject - _ = this[Strings.load].function!(this: this, arguments: []) - } - - @inlinable public func canPlayType(type: String) -> CanPlayTypeResult { - let this = jsObject - return this[Strings.canPlayType].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - public static let HAVE_NOTHING: UInt16 = 0 - - public static let HAVE_METADATA: UInt16 = 1 - - public static let HAVE_CURRENT_DATA: UInt16 = 2 - - public static let HAVE_FUTURE_DATA: UInt16 = 3 - - public static let HAVE_ENOUGH_DATA: UInt16 = 4 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var seeking: Bool - - @ReadWriteAttribute - public var currentTime: Double - - @inlinable public func fastSeek(time: Double) { - let this = jsObject - _ = this[Strings.fastSeek].function!(this: this, arguments: [time.jsValue]) - } - - @ReadonlyAttribute - public var duration: Double - - @inlinable public func getStartDate() -> JSObject { - let this = jsObject - return this[Strings.getStartDate].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var paused: Bool - - @ReadWriteAttribute - public var defaultPlaybackRate: Double - - @ReadWriteAttribute - public var playbackRate: Double - - @ReadWriteAttribute - public var preservesPitch: Bool - - @ReadonlyAttribute - public var played: TimeRanges - - @ReadonlyAttribute - public var seekable: TimeRanges - - @ReadonlyAttribute - public var ended: Bool - - @ReadWriteAttribute - public var autoplay: Bool - - @ReadWriteAttribute - public var loop: Bool - - @inlinable public func play() -> JSPromise { - let this = jsObject - return this[Strings.play].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func play() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.play].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func pause() { - let this = jsObject - _ = this[Strings.pause].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var controls: Bool - - @ReadWriteAttribute - public var volume: Double - - @ReadWriteAttribute - public var muted: Bool - - @ReadWriteAttribute - public var defaultMuted: Bool - - @ReadonlyAttribute - public var audioTracks: AudioTrackList - - @ReadonlyAttribute - public var videoTracks: VideoTrackList - - @ReadonlyAttribute - public var textTracks: TextTrackList - - @inlinable public func addTextTrack(kind: TextTrackKind, label: String? = nil, language: String? = nil) -> TextTrack { - let this = jsObject - return this[Strings.addTextTrack].function!(this: this, arguments: [kind.jsValue, label?.jsValue ?? .undefined, language?.jsValue ?? .undefined]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLMenuElement.swift b/Sources/DOMKit/WebIDL/HTMLMenuElement.swift deleted file mode 100644 index 633819a0..00000000 --- a/Sources/DOMKit/WebIDL/HTMLMenuElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLMenuElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMenuElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} diff --git a/Sources/DOMKit/WebIDL/HTMLMetaElement.swift b/Sources/DOMKit/WebIDL/HTMLMetaElement.swift deleted file mode 100644 index 1874c76c..00000000 --- a/Sources/DOMKit/WebIDL/HTMLMetaElement.swift +++ /dev/null @@ -1,36 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLMetaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMetaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _httpEquiv = ReadWriteAttribute(jsObject: jsObject, name: Strings.httpEquiv) - _content = ReadWriteAttribute(jsObject: jsObject, name: Strings.content) - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _scheme = ReadWriteAttribute(jsObject: jsObject, name: Strings.scheme) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var httpEquiv: String - - @ReadWriteAttribute - public var content: String - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var scheme: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLMeterElement.swift b/Sources/DOMKit/WebIDL/HTMLMeterElement.swift deleted file mode 100644 index 111eac84..00000000 --- a/Sources/DOMKit/WebIDL/HTMLMeterElement.swift +++ /dev/null @@ -1,44 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLMeterElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMeterElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) - _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) - _low = ReadWriteAttribute(jsObject: jsObject, name: Strings.low) - _high = ReadWriteAttribute(jsObject: jsObject, name: Strings.high) - _optimum = ReadWriteAttribute(jsObject: jsObject, name: Strings.optimum) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Double - - @ReadWriteAttribute - public var min: Double - - @ReadWriteAttribute - public var max: Double - - @ReadWriteAttribute - public var low: Double - - @ReadWriteAttribute - public var high: Double - - @ReadWriteAttribute - public var optimum: Double - - @ReadonlyAttribute - public var labels: NodeList -} diff --git a/Sources/DOMKit/WebIDL/HTMLModElement.swift b/Sources/DOMKit/WebIDL/HTMLModElement.swift deleted file mode 100644 index 7b4ebe9f..00000000 --- a/Sources/DOMKit/WebIDL/HTMLModElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLModElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLModElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) - _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cite: String - - @ReadWriteAttribute - public var dateTime: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLOListElement.swift b/Sources/DOMKit/WebIDL/HTMLOListElement.swift deleted file mode 100644 index edc55fef..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOListElement.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLOListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _reversed = ReadWriteAttribute(jsObject: jsObject, name: Strings.reversed) - _start = ReadWriteAttribute(jsObject: jsObject, name: Strings.start) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var reversed: Bool - - @ReadWriteAttribute - public var start: Int32 - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var compact: Bool -} diff --git a/Sources/DOMKit/WebIDL/HTMLObjectElement.swift b/Sources/DOMKit/WebIDL/HTMLObjectElement.swift deleted file mode 100644 index 9ac6eb2b..00000000 --- a/Sources/DOMKit/WebIDL/HTMLObjectElement.swift +++ /dev/null @@ -1,124 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLObjectElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLObjectElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _archive = ReadWriteAttribute(jsObject: jsObject, name: Strings.archive) - _code = ReadWriteAttribute(jsObject: jsObject, name: Strings.code) - _declare = ReadWriteAttribute(jsObject: jsObject, name: Strings.declare) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) - _standby = ReadWriteAttribute(jsObject: jsObject, name: Strings.standby) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) - _codeBase = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeBase) - _codeType = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeType) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) - _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var data: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var archive: String - - @ReadWriteAttribute - public var code: String - - @ReadWriteAttribute - public var declare: Bool - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var standby: String - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var codeBase: String - - @ReadWriteAttribute - public var codeType: String - - @ReadWriteAttribute - public var useMap: String - - @ReadWriteAttribute - public var border: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLOptGroupElement.swift b/Sources/DOMKit/WebIDL/HTMLOptGroupElement.swift deleted file mode 100644 index 32c1e198..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOptGroupElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLOptGroupElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptGroupElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadWriteAttribute - public var label: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLOptGroupElement_or_HTMLOptionElement.swift b/Sources/DOMKit/WebIDL/HTMLOptGroupElement_or_HTMLOptionElement.swift deleted file mode 100644 index 470cc23f..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOptGroupElement_or_HTMLOptionElement.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_HTMLOptGroupElement_or_HTMLOptionElement: ConvertibleToJSValue {} -extension HTMLOptGroupElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} -extension HTMLOptionElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} - -public enum HTMLOptGroupElement_or_HTMLOptionElement: JSValueCompatible, Any_HTMLOptGroupElement_or_HTMLOptionElement { - case htmlOptGroupElement(HTMLOptGroupElement) - case htmlOptionElement(HTMLOptionElement) - - var htmlOptGroupElement: HTMLOptGroupElement? { - switch self { - case let .htmlOptGroupElement(htmlOptGroupElement): return htmlOptGroupElement - default: return nil - } - } - - var htmlOptionElement: HTMLOptionElement? { - switch self { - case let .htmlOptionElement(htmlOptionElement): return htmlOptionElement - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlOptGroupElement: HTMLOptGroupElement = value.fromJSValue() { - return .htmlOptGroupElement(htmlOptGroupElement) - } - if let htmlOptionElement: HTMLOptionElement = value.fromJSValue() { - return .htmlOptionElement(htmlOptionElement) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlOptGroupElement(htmlOptGroupElement): - return htmlOptGroupElement.jsValue - case let .htmlOptionElement(htmlOptionElement): - return htmlOptionElement.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLOptionElement.swift b/Sources/DOMKit/WebIDL/HTMLOptionElement.swift deleted file mode 100644 index 7b45c2cc..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOptionElement.swift +++ /dev/null @@ -1,48 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLOptionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) - _defaultSelected = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultSelected) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _index = ReadonlyAttribute(jsObject: jsObject, name: Strings.index) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var label: String - - @ReadWriteAttribute - public var defaultSelected: Bool - - @ReadWriteAttribute - public var selected: Bool - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var text: String - - @ReadonlyAttribute - public var index: Int32 -} diff --git a/Sources/DOMKit/WebIDL/HTMLOptionsCollection.swift b/Sources/DOMKit/WebIDL/HTMLOptionsCollection.swift deleted file mode 100644 index 3b6256af..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOptionsCollection.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLOptionsCollection: HTMLCollection { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionsCollection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) - super.init(unsafelyWrapping: jsObject) - } - - @usableFromInline let _length: ReadWriteAttribute - @inlinable override public var length: UInt32 { - get { _length.wrappedValue } - set { _length.wrappedValue = newValue } - } - - // XXX: unsupported setter for keys of type UInt32 - - @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { - let this = jsObject - _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) - } - - @inlinable public func remove(index: Int32) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var selectedIndex: Int32 -} diff --git a/Sources/DOMKit/WebIDL/HTMLOrSVGElement.swift b/Sources/DOMKit/WebIDL/HTMLOrSVGElement.swift deleted file mode 100644 index 867d1ed9..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOrSVGElement.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol HTMLOrSVGElement: JSBridgedClass {} -public extension HTMLOrSVGElement { - @inlinable var dataset: DOMStringMap { ReadonlyAttribute[Strings.dataset, in: jsObject] } - - @inlinable var nonce: String { - get { ReadWriteAttribute[Strings.nonce, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.nonce, in: jsObject] = newValue } - } - - @inlinable var autofocus: Bool { - get { ReadWriteAttribute[Strings.autofocus, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.autofocus, in: jsObject] = newValue } - } - - @inlinable var tabIndex: Int32 { - get { ReadWriteAttribute[Strings.tabIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.tabIndex, in: jsObject] = newValue } - } - - @inlinable func focus(options: FocusOptions? = nil) { - let this = jsObject - _ = this[Strings.focus].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable func blur() { - let this = jsObject - _ = this[Strings.blur].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLOutputElement.swift b/Sources/DOMKit/WebIDL/HTMLOutputElement.swift deleted file mode 100644 index 02c11f69..00000000 --- a/Sources/DOMKit/WebIDL/HTMLOutputElement.swift +++ /dev/null @@ -1,71 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLOutputElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOutputElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _htmlFor = ReadonlyAttribute(jsObject: jsObject, name: Strings.htmlFor) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var htmlFor: DOMTokenList - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} diff --git a/Sources/DOMKit/WebIDL/HTMLParagraphElement.swift b/Sources/DOMKit/WebIDL/HTMLParagraphElement.swift deleted file mode 100644 index 11aeed63..00000000 --- a/Sources/DOMKit/WebIDL/HTMLParagraphElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLParagraphElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParagraphElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLParamElement.swift b/Sources/DOMKit/WebIDL/HTMLParamElement.swift deleted file mode 100644 index 25181450..00000000 --- a/Sources/DOMKit/WebIDL/HTMLParamElement.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLParamElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParamElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _valueType = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueType) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var valueType: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLPictureElement.swift b/Sources/DOMKit/WebIDL/HTMLPictureElement.swift deleted file mode 100644 index 1c41e52a..00000000 --- a/Sources/DOMKit/WebIDL/HTMLPictureElement.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLPictureElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPictureElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLPreElement.swift b/Sources/DOMKit/WebIDL/HTMLPreElement.swift deleted file mode 100644 index e4baf35f..00000000 --- a/Sources/DOMKit/WebIDL/HTMLPreElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLPreElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPreElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: Int32 -} diff --git a/Sources/DOMKit/WebIDL/HTMLProgressElement.swift b/Sources/DOMKit/WebIDL/HTMLProgressElement.swift deleted file mode 100644 index b976c2e9..00000000 --- a/Sources/DOMKit/WebIDL/HTMLProgressElement.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLProgressElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLProgressElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) - _position = ReadonlyAttribute(jsObject: jsObject, name: Strings.position) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Double - - @ReadWriteAttribute - public var max: Double - - @ReadonlyAttribute - public var position: Double - - @ReadonlyAttribute - public var labels: NodeList -} diff --git a/Sources/DOMKit/WebIDL/HTMLQuoteElement.swift b/Sources/DOMKit/WebIDL/HTMLQuoteElement.swift deleted file mode 100644 index a898cf8e..00000000 --- a/Sources/DOMKit/WebIDL/HTMLQuoteElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLQuoteElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLQuoteElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cite: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLScriptElement.swift b/Sources/DOMKit/WebIDL/HTMLScriptElement.swift deleted file mode 100644 index a9094699..00000000 --- a/Sources/DOMKit/WebIDL/HTMLScriptElement.swift +++ /dev/null @@ -1,73 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLScriptElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLScriptElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _noModule = ReadWriteAttribute(jsObject: jsObject, name: Strings.noModule) - _async = ReadWriteAttribute(jsObject: jsObject, name: Strings.async) - _defer = ReadWriteAttribute(jsObject: jsObject, name: Strings.defer) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) - _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) - _event = ReadWriteAttribute(jsObject: jsObject, name: Strings.event) - _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var noModule: Bool - - @ReadWriteAttribute - public var async: Bool - - @ReadWriteAttribute - public var `defer`: Bool - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @inlinable public static func supports(type: String) -> Bool { - let this = constructor - return this[Strings.supports].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var event: String - - @ReadWriteAttribute - public var htmlFor: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLSelectElement.swift b/Sources/DOMKit/WebIDL/HTMLSelectElement.swift deleted file mode 100644 index 926d37f6..00000000 --- a/Sources/DOMKit/WebIDL/HTMLSelectElement.swift +++ /dev/null @@ -1,125 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLSelectElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSelectElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) - _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) - _selectedOptions = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedOptions) - _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var multiple: Bool - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var size: UInt32 - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var options: HTMLOptionsCollection - - @ReadWriteAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> HTMLOptionElement? { - jsObject[key].fromJSValue() - } - - @inlinable public func namedItem(name: String) -> HTMLOptionElement? { - let this = jsObject - return this[Strings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { - let this = jsObject - _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) - } - - @inlinable public func remove() { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: []) - } - - @inlinable public func remove(index: Int32) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) - } - - // XXX: unsupported setter for keys of type UInt32 - - @ReadonlyAttribute - public var selectedOptions: HTMLCollection - - @ReadWriteAttribute - public var selectedIndex: Int32 - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} diff --git a/Sources/DOMKit/WebIDL/HTMLSlotElement.swift b/Sources/DOMKit/WebIDL/HTMLSlotElement.swift deleted file mode 100644 index a3806034..00000000 --- a/Sources/DOMKit/WebIDL/HTMLSlotElement.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLSlotElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSlotElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @inlinable public func assignedNodes(options: AssignedNodesOptions? = nil) -> [Node] { - let this = jsObject - return this[Strings.assignedNodes].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func assignedElements(options: AssignedNodesOptions? = nil) -> [Element] { - let this = jsObject - return this[Strings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func assign(nodes: Element_or_Text...) { - let this = jsObject - _ = this[Strings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLSourceElement.swift b/Sources/DOMKit/WebIDL/HTMLSourceElement.swift deleted file mode 100644 index 6edd2ebb..00000000 --- a/Sources/DOMKit/WebIDL/HTMLSourceElement.swift +++ /dev/null @@ -1,44 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLSourceElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSourceElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) - _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var srcset: String - - @ReadWriteAttribute - public var sizes: String - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/HTMLSpanElement.swift b/Sources/DOMKit/WebIDL/HTMLSpanElement.swift deleted file mode 100644 index 6a91c7f1..00000000 --- a/Sources/DOMKit/WebIDL/HTMLSpanElement.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLSpanElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSpanElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLStyleElement.swift b/Sources/DOMKit/WebIDL/HTMLStyleElement.swift deleted file mode 100644 index adabe306..00000000 --- a/Sources/DOMKit/WebIDL/HTMLStyleElement.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLStyleElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLStyleElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var media: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @ReadWriteAttribute - public var type: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTableCaptionElement.swift b/Sources/DOMKit/WebIDL/HTMLTableCaptionElement.swift deleted file mode 100644 index 20c6c3e0..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTableCaptionElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTableCaptionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCaptionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTableCellElement.swift b/Sources/DOMKit/WebIDL/HTMLTableCellElement.swift deleted file mode 100644 index 424c1e41..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTableCellElement.swift +++ /dev/null @@ -1,76 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTableCellElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCellElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _colSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.colSpan) - _rowSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.rowSpan) - _headers = ReadWriteAttribute(jsObject: jsObject, name: Strings.headers) - _cellIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.cellIndex) - _scope = ReadWriteAttribute(jsObject: jsObject, name: Strings.scope) - _abbr = ReadWriteAttribute(jsObject: jsObject, name: Strings.abbr) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _axis = ReadWriteAttribute(jsObject: jsObject, name: Strings.axis) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _noWrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.noWrap) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var colSpan: UInt32 - - @ReadWriteAttribute - public var rowSpan: UInt32 - - @ReadWriteAttribute - public var headers: String - - @ReadonlyAttribute - public var cellIndex: Int32 - - @ReadWriteAttribute - public var scope: String - - @ReadWriteAttribute - public var abbr: String - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var axis: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var noWrap: Bool - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var bgColor: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTableColElement.swift b/Sources/DOMKit/WebIDL/HTMLTableColElement.swift deleted file mode 100644 index eeffb588..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTableColElement.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTableColElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableColElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _span = ReadWriteAttribute(jsObject: jsObject, name: Strings.span) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var span: UInt32 - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var width: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTableElement.swift b/Sources/DOMKit/WebIDL/HTMLTableElement.swift deleted file mode 100644 index b6ac1f84..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTableElement.swift +++ /dev/null @@ -1,117 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTableElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _caption = ReadWriteAttribute(jsObject: jsObject, name: Strings.caption) - _tHead = ReadWriteAttribute(jsObject: jsObject, name: Strings.tHead) - _tFoot = ReadWriteAttribute(jsObject: jsObject, name: Strings.tFoot) - _tBodies = ReadonlyAttribute(jsObject: jsObject, name: Strings.tBodies) - _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - _frame = ReadWriteAttribute(jsObject: jsObject, name: Strings.frame) - _rules = ReadWriteAttribute(jsObject: jsObject, name: Strings.rules) - _summary = ReadWriteAttribute(jsObject: jsObject, name: Strings.summary) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _cellPadding = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellPadding) - _cellSpacing = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellSpacing) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var caption: HTMLTableCaptionElement? - - @inlinable public func createCaption() -> HTMLTableCaptionElement { - let this = jsObject - return this[Strings.createCaption].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteCaption() { - let this = jsObject - _ = this[Strings.deleteCaption].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var tHead: HTMLTableSectionElement? - - @inlinable public func createTHead() -> HTMLTableSectionElement { - let this = jsObject - return this[Strings.createTHead].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteTHead() { - let this = jsObject - _ = this[Strings.deleteTHead].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var tFoot: HTMLTableSectionElement? - - @inlinable public func createTFoot() -> HTMLTableSectionElement { - let this = jsObject - return this[Strings.createTFoot].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteTFoot() { - let this = jsObject - _ = this[Strings.deleteTFoot].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var tBodies: HTMLCollection - - @inlinable public func createTBody() -> HTMLTableSectionElement { - let this = jsObject - return this[Strings.createTBody].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var rows: HTMLCollection - - @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { - let this = jsObject - return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteRow(index: Int32) { - let this = jsObject - _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var border: String - - @ReadWriteAttribute - public var frame: String - - @ReadWriteAttribute - public var rules: String - - @ReadWriteAttribute - public var summary: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var cellPadding: String - - @ReadWriteAttribute - public var cellSpacing: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTableRowElement.swift b/Sources/DOMKit/WebIDL/HTMLTableRowElement.swift deleted file mode 100644 index 418cf8d9..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTableRowElement.swift +++ /dev/null @@ -1,58 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTableRowElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableRowElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _rowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.rowIndex) - _sectionRowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.sectionRowIndex) - _cells = ReadonlyAttribute(jsObject: jsObject, name: Strings.cells) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var rowIndex: Int32 - - @ReadonlyAttribute - public var sectionRowIndex: Int32 - - @ReadonlyAttribute - public var cells: HTMLCollection - - @inlinable public func insertCell(index: Int32? = nil) -> HTMLTableCellElement { - let this = jsObject - return this[Strings.insertCell].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteCell(index: Int32) { - let this = jsObject - _ = this[Strings.deleteCell].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var bgColor: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTableSectionElement.swift b/Sources/DOMKit/WebIDL/HTMLTableSectionElement.swift deleted file mode 100644 index 4b820996..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTableSectionElement.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTableSectionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableSectionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var rows: HTMLCollection - - @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { - let this = jsObject - return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteRow(index: Int32) { - let this = jsObject - _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTemplateElement.swift b/Sources/DOMKit/WebIDL/HTMLTemplateElement.swift deleted file mode 100644 index 0c417be9..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTemplateElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTemplateElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTemplateElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _content = ReadonlyAttribute(jsObject: jsObject, name: Strings.content) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var content: DocumentFragment -} diff --git a/Sources/DOMKit/WebIDL/HTMLTextAreaElement.swift b/Sources/DOMKit/WebIDL/HTMLTextAreaElement.swift deleted file mode 100644 index b9b973d6..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTextAreaElement.swift +++ /dev/null @@ -1,147 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTextAreaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTextAreaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) - _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) - _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) - _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) - _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) - _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) - _wrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.wrap) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _textLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.textLength) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) - _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) - _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var cols: UInt32 - - @ReadWriteAttribute - public var dirName: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var maxLength: Int32 - - @ReadWriteAttribute - public var minLength: Int32 - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var placeholder: String - - @ReadWriteAttribute - public var readOnly: Bool - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var rows: UInt32 - - @ReadWriteAttribute - public var wrap: String - - @ReadonlyAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var textLength: UInt32 - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList - - @inlinable public func select() { - let this = jsObject - _ = this[Strings.select].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var selectionStart: UInt32 - - @ReadWriteAttribute - public var selectionEnd: UInt32 - - @ReadWriteAttribute - public var selectionDirection: String - - @inlinable public func setRangeText(replacement: String) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) - } - - @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) - } - - @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { - let this = jsObject - _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLTimeElement.swift b/Sources/DOMKit/WebIDL/HTMLTimeElement.swift deleted file mode 100644 index 3c030c96..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTimeElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTimeElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTimeElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var dateTime: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTitleElement.swift b/Sources/DOMKit/WebIDL/HTMLTitleElement.swift deleted file mode 100644 index a3276414..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTitleElement.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTitleElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTitleElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var text: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLTrackElement.swift b/Sources/DOMKit/WebIDL/HTMLTrackElement.swift deleted file mode 100644 index e40690bc..00000000 --- a/Sources/DOMKit/WebIDL/HTMLTrackElement.swift +++ /dev/null @@ -1,52 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLTrackElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTrackElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadWriteAttribute(jsObject: jsObject, name: Strings.kind) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _srclang = ReadWriteAttribute(jsObject: jsObject, name: Strings.srclang) - _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) - _default = ReadWriteAttribute(jsObject: jsObject, name: Strings.default) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var kind: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srclang: String - - @ReadWriteAttribute - public var label: String - - @ReadWriteAttribute - public var `default`: Bool - - public static let NONE: UInt16 = 0 - - public static let LOADING: UInt16 = 1 - - public static let LOADED: UInt16 = 2 - - public static let ERROR: UInt16 = 3 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var track: TextTrack -} diff --git a/Sources/DOMKit/WebIDL/HTMLUListElement.swift b/Sources/DOMKit/WebIDL/HTMLUListElement.swift deleted file mode 100644 index 58fc845f..00000000 --- a/Sources/DOMKit/WebIDL/HTMLUListElement.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLUListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool - - @ReadWriteAttribute - public var type: String -} diff --git a/Sources/DOMKit/WebIDL/HTMLUnknownElement.swift b/Sources/DOMKit/WebIDL/HTMLUnknownElement.swift deleted file mode 100644 index 4fd853fa..00000000 --- a/Sources/DOMKit/WebIDL/HTMLUnknownElement.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLUnknownElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUnknownElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/HTMLVideoElement.swift b/Sources/DOMKit/WebIDL/HTMLVideoElement.swift deleted file mode 100644 index b194737d..00000000 --- a/Sources/DOMKit/WebIDL/HTMLVideoElement.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HTMLVideoElement: HTMLMediaElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLVideoElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _videoWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoWidth) - _videoHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoHeight) - _poster = ReadWriteAttribute(jsObject: jsObject, name: Strings.poster) - _playsInline = ReadWriteAttribute(jsObject: jsObject, name: Strings.playsInline) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var videoWidth: UInt32 - - @ReadonlyAttribute - public var videoHeight: UInt32 - - @ReadWriteAttribute - public var poster: String - - @ReadWriteAttribute - public var playsInline: Bool -} diff --git a/Sources/DOMKit/WebIDL/HashChangeEvent.swift b/Sources/DOMKit/WebIDL/HashChangeEvent.swift deleted file mode 100644 index 47779d59..00000000 --- a/Sources/DOMKit/WebIDL/HashChangeEvent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HashChangeEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HashChangeEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _oldURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldURL) - _newURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.newURL) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: HashChangeEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var oldURL: String - - @ReadonlyAttribute - public var newURL: String -} diff --git a/Sources/DOMKit/WebIDL/HashChangeEventInit.swift b/Sources/DOMKit/WebIDL/HashChangeEventInit.swift deleted file mode 100644 index e9a91bc2..00000000 --- a/Sources/DOMKit/WebIDL/HashChangeEventInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class HashChangeEventInit: BridgedDictionary { - public convenience init(oldURL: String, newURL: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.oldURL] = oldURL.jsValue - object[Strings.newURL] = newURL.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _oldURL = ReadWriteAttribute(jsObject: object, name: Strings.oldURL) - _newURL = ReadWriteAttribute(jsObject: object, name: Strings.newURL) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var oldURL: String - - @ReadWriteAttribute - public var newURL: String -} diff --git a/Sources/DOMKit/WebIDL/Headers.swift b/Sources/DOMKit/WebIDL/Headers.swift deleted file mode 100644 index a34995c9..00000000 --- a/Sources/DOMKit/WebIDL/Headers.swift +++ /dev/null @@ -1,48 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Headers: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Headers].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(init: HeadersInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} diff --git a/Sources/DOMKit/WebIDL/HeadersInit.swift b/Sources/DOMKit/WebIDL/HeadersInit.swift deleted file mode 100644 index ca6a8236..00000000 --- a/Sources/DOMKit/WebIDL/HeadersInit.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_HeadersInit: ConvertibleToJSValue {} -extension Dictionary: Any_HeadersInit where Key == String, Value == String {} -extension Array: Any_HeadersInit where Element == [String] {} - -public enum HeadersInit: JSValueCompatible, Any_HeadersInit { - case record_String_to_String([String: String]) - case seq_of_seq_of_String([[String]]) - - var record_String_to_String: [String: String]? { - switch self { - case let .record_String_to_String(record_String_to_String): return record_String_to_String - default: return nil - } - } - - var seq_of_seq_of_String: [[String]]? { - switch self { - case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let record_String_to_String: [String: String] = value.fromJSValue() { - return .record_String_to_String(record_String_to_String) - } - if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { - return .seq_of_seq_of_String(seq_of_seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .record_String_to_String(record_String_to_String): - return record_String_to_String.jsValue - case let .seq_of_seq_of_String(seq_of_seq_of_String): - return seq_of_seq_of_String.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/History.swift b/Sources/DOMKit/WebIDL/History.swift deleted file mode 100644 index 4295ed2d..00000000 --- a/Sources/DOMKit/WebIDL/History.swift +++ /dev/null @@ -1,51 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class History: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.History].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _scrollRestoration = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollRestoration) - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @ReadWriteAttribute - public var scrollRestoration: ScrollRestoration - - @ReadonlyAttribute - public var state: JSValue - - @inlinable public func go(delta: Int32? = nil) { - let this = jsObject - _ = this[Strings.go].function!(this: this, arguments: [delta?.jsValue ?? .undefined]) - } - - @inlinable public func back() { - let this = jsObject - _ = this[Strings.back].function!(this: this, arguments: []) - } - - @inlinable public func forward() { - let this = jsObject - _ = this[Strings.forward].function!(this: this, arguments: []) - } - - @inlinable public func pushState(data: JSValue, unused: String, url: String? = nil) { - let this = jsObject - _ = this[Strings.pushState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) - } - - @inlinable public func replaceState(data: JSValue, unused: String, url: String? = nil) { - let this = jsObject - _ = this[Strings.replaceState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/ImageBitmap.swift b/Sources/DOMKit/WebIDL/ImageBitmap.swift deleted file mode 100644 index bb780a8c..00000000 --- a/Sources/DOMKit/WebIDL/ImageBitmap.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageBitmap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var width: UInt32 - - @ReadonlyAttribute - public var height: UInt32 - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/ImageBitmapOptions.swift b/Sources/DOMKit/WebIDL/ImageBitmapOptions.swift deleted file mode 100644 index 77156700..00000000 --- a/Sources/DOMKit/WebIDL/ImageBitmapOptions.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageBitmapOptions: BridgedDictionary { - public convenience init(imageOrientation: ImageOrientation, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, resizeWidth: UInt32, resizeHeight: UInt32, resizeQuality: ResizeQuality) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.imageOrientation] = imageOrientation.jsValue - object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue - object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue - object[Strings.resizeWidth] = resizeWidth.jsValue - object[Strings.resizeHeight] = resizeHeight.jsValue - object[Strings.resizeQuality] = resizeQuality.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _imageOrientation = ReadWriteAttribute(jsObject: object, name: Strings.imageOrientation) - _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) - _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) - _resizeWidth = ReadWriteAttribute(jsObject: object, name: Strings.resizeWidth) - _resizeHeight = ReadWriteAttribute(jsObject: object, name: Strings.resizeHeight) - _resizeQuality = ReadWriteAttribute(jsObject: object, name: Strings.resizeQuality) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var imageOrientation: ImageOrientation - - @ReadWriteAttribute - public var premultiplyAlpha: PremultiplyAlpha - - @ReadWriteAttribute - public var colorSpaceConversion: ColorSpaceConversion - - @ReadWriteAttribute - public var resizeWidth: UInt32 - - @ReadWriteAttribute - public var resizeHeight: UInt32 - - @ReadWriteAttribute - public var resizeQuality: ResizeQuality -} diff --git a/Sources/DOMKit/WebIDL/ImageBitmapRenderingContext.swift b/Sources/DOMKit/WebIDL/ImageBitmapRenderingContext.swift deleted file mode 100644 index 041cb8c7..00000000 --- a/Sources/DOMKit/WebIDL/ImageBitmapRenderingContext.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageBitmapRenderingContext: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmapRenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var canvas: HTMLCanvasElement_or_OffscreenCanvas - - @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { - let this = jsObject - _ = this[Strings.transferFromImageBitmap].function!(this: this, arguments: [bitmap.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/ImageBitmapRenderingContextSettings.swift b/Sources/DOMKit/WebIDL/ImageBitmapRenderingContextSettings.swift deleted file mode 100644 index 129ab258..00000000 --- a/Sources/DOMKit/WebIDL/ImageBitmapRenderingContextSettings.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageBitmapRenderingContextSettings: BridgedDictionary { - public convenience init(alpha: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageBitmapSource.swift b/Sources/DOMKit/WebIDL/ImageBitmapSource.swift deleted file mode 100644 index a6b7f91c..00000000 --- a/Sources/DOMKit/WebIDL/ImageBitmapSource.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ImageBitmapSource: ConvertibleToJSValue {} -extension Blob: Any_ImageBitmapSource {} -extension CanvasImageSource: Any_ImageBitmapSource {} -extension ImageData: Any_ImageBitmapSource {} - -public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource { - case blob(Blob) - case canvasImageSource(CanvasImageSource) - case imageData(ImageData) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var canvasImageSource: CanvasImageSource? { - switch self { - case let .canvasImageSource(canvasImageSource): return canvasImageSource - default: return nil - } - } - - var imageData: ImageData? { - switch self { - case let .imageData(imageData): return imageData - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let canvasImageSource: CanvasImageSource = value.fromJSValue() { - return .canvasImageSource(canvasImageSource) - } - if let imageData: ImageData = value.fromJSValue() { - return .imageData(imageData) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .canvasImageSource(canvasImageSource): - return canvasImageSource.jsValue - case let .imageData(imageData): - return imageData.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ImageData.swift b/Sources/DOMKit/WebIDL/ImageData.swift deleted file mode 100644 index 2ad76a59..00000000 --- a/Sources/DOMKit/WebIDL/ImageData.swift +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageData: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) - self.jsObject = jsObject - } - - @inlinable public convenience init(sw: UInt32, sh: UInt32, settings: ImageDataSettings? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(data: Uint8ClampedArray, sw: UInt32, sh: UInt32? = nil, settings: ImageDataSettings? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, sw.jsValue, sh?.jsValue ?? .undefined, settings?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var width: UInt32 - - @ReadonlyAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var data: Uint8ClampedArray - - @ReadonlyAttribute - public var colorSpace: PredefinedColorSpace -} diff --git a/Sources/DOMKit/WebIDL/ImageDataSettings.swift b/Sources/DOMKit/WebIDL/ImageDataSettings.swift deleted file mode 100644 index 6e784521..00000000 --- a/Sources/DOMKit/WebIDL/ImageDataSettings.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDataSettings: BridgedDictionary { - public convenience init(colorSpace: PredefinedColorSpace) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.colorSpace] = colorSpace.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace -} diff --git a/Sources/DOMKit/WebIDL/ImageEncodeOptions.swift b/Sources/DOMKit/WebIDL/ImageEncodeOptions.swift deleted file mode 100644 index f3263062..00000000 --- a/Sources/DOMKit/WebIDL/ImageEncodeOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageEncodeOptions: BridgedDictionary { - public convenience init(type: String, quality: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.quality] = quality.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _quality = ReadWriteAttribute(jsObject: object, name: Strings.quality) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var quality: Double -} diff --git a/Sources/DOMKit/WebIDL/ImageOrientation.swift b/Sources/DOMKit/WebIDL/ImageOrientation.swift deleted file mode 100644 index f8a5f79d..00000000 --- a/Sources/DOMKit/WebIDL/ImageOrientation.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ImageOrientation: JSString, JSValueCompatible { - case none = "none" - case flipY = "flipY" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ImageSmoothingQuality.swift b/Sources/DOMKit/WebIDL/ImageSmoothingQuality.swift deleted file mode 100644 index 16cce588..00000000 --- a/Sources/DOMKit/WebIDL/ImageSmoothingQuality.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ImageSmoothingQuality: JSString, JSValueCompatible { - case low = "low" - case medium = "medium" - case high = "high" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/InputEvent.swift b/Sources/DOMKit/WebIDL/InputEvent.swift deleted file mode 100644 index 9c528a5c..00000000 --- a/Sources/DOMKit/WebIDL/InputEvent.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class InputEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) - _inputType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputType) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: InputEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: String? - - @ReadonlyAttribute - public var isComposing: Bool - - @ReadonlyAttribute - public var inputType: String -} diff --git a/Sources/DOMKit/WebIDL/InputEventInit.swift b/Sources/DOMKit/WebIDL/InputEventInit.swift deleted file mode 100644 index 7f6f4ebd..00000000 --- a/Sources/DOMKit/WebIDL/InputEventInit.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class InputEventInit: BridgedDictionary { - public convenience init(data: String?, isComposing: Bool, inputType: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.isComposing] = isComposing.jsValue - object[Strings.inputType] = inputType.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) - _inputType = ReadWriteAttribute(jsObject: object, name: Strings.inputType) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: String? - - @ReadWriteAttribute - public var isComposing: Bool - - @ReadWriteAttribute - public var inputType: String -} diff --git a/Sources/DOMKit/WebIDL/KeyboardEvent.swift b/Sources/DOMKit/WebIDL/KeyboardEvent.swift deleted file mode 100644 index 7f3b07a7..00000000 --- a/Sources/DOMKit/WebIDL/KeyboardEvent.swift +++ /dev/null @@ -1,88 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class KeyboardEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) - _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) - _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) - _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) - _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) - _repeat = ReadonlyAttribute(jsObject: jsObject, name: Strings.repeat) - _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) - _charCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.charCode) - _keyCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.keyCode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: KeyboardEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - public static let DOM_KEY_LOCATION_STANDARD: UInt32 = 0x00 - - public static let DOM_KEY_LOCATION_LEFT: UInt32 = 0x01 - - public static let DOM_KEY_LOCATION_RIGHT: UInt32 = 0x02 - - public static let DOM_KEY_LOCATION_NUMPAD: UInt32 = 0x03 - - @ReadonlyAttribute - public var key: String - - @ReadonlyAttribute - public var code: String - - @ReadonlyAttribute - public var location: UInt32 - - @ReadonlyAttribute - public var ctrlKey: Bool - - @ReadonlyAttribute - public var shiftKey: Bool - - @ReadonlyAttribute - public var altKey: Bool - - @ReadonlyAttribute - public var metaKey: Bool - - @ReadonlyAttribute - public var `repeat`: Bool - - @ReadonlyAttribute - public var isComposing: Bool - - @inlinable public func getModifierState(keyArg: String) -> Bool { - let this = jsObject - return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! - } - - @inlinable public func initKeyboardEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, keyArg: String? = nil, locationArg: UInt32? = nil, ctrlKey: Bool? = nil, altKey: Bool? = nil, shiftKey: Bool? = nil, metaKey: Bool? = nil) { - let _arg0 = typeArg.jsValue - let _arg1 = bubblesArg?.jsValue ?? .undefined - let _arg2 = cancelableArg?.jsValue ?? .undefined - let _arg3 = viewArg?.jsValue ?? .undefined - let _arg4 = keyArg?.jsValue ?? .undefined - let _arg5 = locationArg?.jsValue ?? .undefined - let _arg6 = ctrlKey?.jsValue ?? .undefined - let _arg7 = altKey?.jsValue ?? .undefined - let _arg8 = shiftKey?.jsValue ?? .undefined - let _arg9 = metaKey?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initKeyboardEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @ReadonlyAttribute - public var charCode: UInt32 - - @ReadonlyAttribute - public var keyCode: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/KeyboardEventInit.swift b/Sources/DOMKit/WebIDL/KeyboardEventInit.swift deleted file mode 100644 index 2dc21725..00000000 --- a/Sources/DOMKit/WebIDL/KeyboardEventInit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class KeyboardEventInit: BridgedDictionary { - public convenience init(key: String, code: String, location: UInt32, repeat: Bool, isComposing: Bool, charCode: UInt32, keyCode: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.key] = key.jsValue - object[Strings.code] = code.jsValue - object[Strings.location] = location.jsValue - object[Strings.repeat] = `repeat`.jsValue - object[Strings.isComposing] = isComposing.jsValue - object[Strings.charCode] = charCode.jsValue - object[Strings.keyCode] = keyCode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _key = ReadWriteAttribute(jsObject: object, name: Strings.key) - _code = ReadWriteAttribute(jsObject: object, name: Strings.code) - _location = ReadWriteAttribute(jsObject: object, name: Strings.location) - _repeat = ReadWriteAttribute(jsObject: object, name: Strings.repeat) - _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) - _charCode = ReadWriteAttribute(jsObject: object, name: Strings.charCode) - _keyCode = ReadWriteAttribute(jsObject: object, name: Strings.keyCode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var key: String - - @ReadWriteAttribute - public var code: String - - @ReadWriteAttribute - public var location: UInt32 - - @ReadWriteAttribute - public var `repeat`: Bool - - @ReadWriteAttribute - public var isComposing: Bool - - @ReadWriteAttribute - public var charCode: UInt32 - - @ReadWriteAttribute - public var keyCode: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/KeyframeAnimationOptions.swift b/Sources/DOMKit/WebIDL/KeyframeAnimationOptions.swift deleted file mode 100644 index 0568c226..00000000 --- a/Sources/DOMKit/WebIDL/KeyframeAnimationOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class KeyframeAnimationOptions: BridgedDictionary { - public convenience init(id: String, timeline: AnimationTimeline?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.id] = id.jsValue - object[Strings.timeline] = timeline.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _id = ReadWriteAttribute(jsObject: object, name: Strings.id) - _timeline = ReadWriteAttribute(jsObject: object, name: Strings.timeline) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var timeline: AnimationTimeline? -} diff --git a/Sources/DOMKit/WebIDL/KeyframeEffect.swift b/Sources/DOMKit/WebIDL/KeyframeEffect.swift deleted file mode 100644 index 9569bb56..00000000 --- a/Sources/DOMKit/WebIDL/KeyframeEffect.swift +++ /dev/null @@ -1,42 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class KeyframeEffect: AnimationEffect { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyframeEffect].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _pseudoElement = ReadWriteAttribute(jsObject: jsObject, name: Strings.pseudoElement) - _composite = ReadWriteAttribute(jsObject: jsObject, name: Strings.composite) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(target: Element?, keyframes: JSObject?, options: Double_or_KeyframeEffectOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [target.jsValue, keyframes.jsValue, options?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(source: KeyframeEffect) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [source.jsValue])) - } - - @ReadWriteAttribute - public var target: Element? - - @ReadWriteAttribute - public var pseudoElement: String? - - @ReadWriteAttribute - public var composite: CompositeOperation - - @inlinable public func getKeyframes() -> [JSObject] { - let this = jsObject - return this[Strings.getKeyframes].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setKeyframes(keyframes: JSObject?) { - let this = jsObject - _ = this[Strings.setKeyframes].function!(this: this, arguments: [keyframes.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/KeyframeEffectOptions.swift b/Sources/DOMKit/WebIDL/KeyframeEffectOptions.swift deleted file mode 100644 index d6be80df..00000000 --- a/Sources/DOMKit/WebIDL/KeyframeEffectOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class KeyframeEffectOptions: BridgedDictionary { - public convenience init(composite: CompositeOperation, pseudoElement: String?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.composite] = composite.jsValue - object[Strings.pseudoElement] = pseudoElement.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - _pseudoElement = ReadWriteAttribute(jsObject: object, name: Strings.pseudoElement) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var composite: CompositeOperation - - @ReadWriteAttribute - public var pseudoElement: String? -} diff --git a/Sources/DOMKit/WebIDL/Location.swift b/Sources/DOMKit/WebIDL/Location.swift deleted file mode 100644 index 525aa304..00000000 --- a/Sources/DOMKit/WebIDL/Location.swift +++ /dev/null @@ -1,69 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Location: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Location].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) - _ancestorOrigins = ReadonlyAttribute(jsObject: jsObject, name: Strings.ancestorOrigins) - self.jsObject = jsObject - } - - @ReadWriteAttribute - public var href: String - - @ReadonlyAttribute - public var origin: String - - @ReadWriteAttribute - public var `protocol`: String - - @ReadWriteAttribute - public var host: String - - @ReadWriteAttribute - public var hostname: String - - @ReadWriteAttribute - public var port: String - - @ReadWriteAttribute - public var pathname: String - - @ReadWriteAttribute - public var search: String - - @ReadWriteAttribute - public var hash: String - - @inlinable public func assign(url: String) { - let this = jsObject - _ = this[Strings.assign].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public func replace(url: String) { - let this = jsObject - _ = this[Strings.replace].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public func reload() { - let this = jsObject - _ = this[Strings.reload].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var ancestorOrigins: DOMStringList -} diff --git a/Sources/DOMKit/WebIDL/MediaError.swift b/Sources/DOMKit/WebIDL/MediaError.swift deleted file mode 100644 index 1c499ab5..00000000 --- a/Sources/DOMKit/WebIDL/MediaError.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaError: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaError].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - self.jsObject = jsObject - } - - public static let MEDIA_ERR_ABORTED: UInt16 = 1 - - public static let MEDIA_ERR_NETWORK: UInt16 = 2 - - public static let MEDIA_ERR_DECODE: UInt16 = 3 - - public static let MEDIA_ERR_SRC_NOT_SUPPORTED: UInt16 = 4 - - @ReadonlyAttribute - public var code: UInt16 - - @ReadonlyAttribute - public var message: String -} diff --git a/Sources/DOMKit/WebIDL/MessageChannel.swift b/Sources/DOMKit/WebIDL/MessageChannel.swift deleted file mode 100644 index e8ddfec1..00000000 --- a/Sources/DOMKit/WebIDL/MessageChannel.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MessageChannel: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MessageChannel].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _port1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port1) - _port2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port2) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var port1: MessagePort - - @ReadonlyAttribute - public var port2: MessagePort -} diff --git a/Sources/DOMKit/WebIDL/MessageEvent.swift b/Sources/DOMKit/WebIDL/MessageEvent.swift deleted file mode 100644 index d2b8bebf..00000000 --- a/Sources/DOMKit/WebIDL/MessageEvent.swift +++ /dev/null @@ -1,49 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MessageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessageEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastEventId) - _source = ReadonlyAttribute(jsObject: jsObject, name: Strings.source) - _ports = ReadonlyAttribute(jsObject: jsObject, name: Strings.ports) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: JSValue - - @ReadonlyAttribute - public var origin: String - - @ReadonlyAttribute - public var lastEventId: String - - @ReadonlyAttribute - public var source: MessageEventSource? - - @ReadonlyAttribute - public var ports: [MessagePort] - - @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = data?.jsValue ?? .undefined - let _arg4 = origin?.jsValue ?? .undefined - let _arg5 = lastEventId?.jsValue ?? .undefined - let _arg6 = source?.jsValue ?? .undefined - let _arg7 = ports?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} diff --git a/Sources/DOMKit/WebIDL/MessageEventInit.swift b/Sources/DOMKit/WebIDL/MessageEventInit.swift deleted file mode 100644 index 61761d89..00000000 --- a/Sources/DOMKit/WebIDL/MessageEventInit.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MessageEventInit: BridgedDictionary { - public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.origin] = origin.jsValue - object[Strings.lastEventId] = lastEventId.jsValue - object[Strings.source] = source.jsValue - object[Strings.ports] = ports.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) - _lastEventId = ReadWriteAttribute(jsObject: object, name: Strings.lastEventId) - _source = ReadWriteAttribute(jsObject: object, name: Strings.source) - _ports = ReadWriteAttribute(jsObject: object, name: Strings.ports) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: JSValue - - @ReadWriteAttribute - public var origin: String - - @ReadWriteAttribute - public var lastEventId: String - - @ReadWriteAttribute - public var source: MessageEventSource? - - @ReadWriteAttribute - public var ports: [MessagePort] -} diff --git a/Sources/DOMKit/WebIDL/MessageEventSource.swift b/Sources/DOMKit/WebIDL/MessageEventSource.swift deleted file mode 100644 index bbbe2129..00000000 --- a/Sources/DOMKit/WebIDL/MessageEventSource.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_MessageEventSource: ConvertibleToJSValue {} -extension MessagePort: Any_MessageEventSource {} -extension ServiceWorker: Any_MessageEventSource {} -extension WindowProxy: Any_MessageEventSource {} - -public enum MessageEventSource: JSValueCompatible, Any_MessageEventSource { - case messagePort(MessagePort) - case serviceWorker(ServiceWorker) - case windowProxy(WindowProxy) - - var messagePort: MessagePort? { - switch self { - case let .messagePort(messagePort): return messagePort - default: return nil - } - } - - var serviceWorker: ServiceWorker? { - switch self { - case let .serviceWorker(serviceWorker): return serviceWorker - default: return nil - } - } - - var windowProxy: WindowProxy? { - switch self { - case let .windowProxy(windowProxy): return windowProxy - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let messagePort: MessagePort = value.fromJSValue() { - return .messagePort(messagePort) - } - if let serviceWorker: ServiceWorker = value.fromJSValue() { - return .serviceWorker(serviceWorker) - } - if let windowProxy: WindowProxy = value.fromJSValue() { - return .windowProxy(windowProxy) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .messagePort(messagePort): - return messagePort.jsValue - case let .serviceWorker(serviceWorker): - return serviceWorker.jsValue - case let .windowProxy(windowProxy): - return windowProxy.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/MessagePort.swift b/Sources/DOMKit/WebIDL/MessagePort.swift deleted file mode 100644 index d569eccf..00000000 --- a/Sources/DOMKit/WebIDL/MessagePort.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MessagePort: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessagePort].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func start() { - let this = jsObject - _ = this[Strings.start].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/MimeType.swift b/Sources/DOMKit/WebIDL/MimeType.swift deleted file mode 100644 index 33aa20e2..00000000 --- a/Sources/DOMKit/WebIDL/MimeType.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MimeType: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeType].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) - _suffixes = ReadonlyAttribute(jsObject: jsObject, name: Strings.suffixes) - _enabledPlugin = ReadonlyAttribute(jsObject: jsObject, name: Strings.enabledPlugin) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var description: String - - @ReadonlyAttribute - public var suffixes: String - - @ReadonlyAttribute - public var enabledPlugin: Plugin -} diff --git a/Sources/DOMKit/WebIDL/MimeTypeArray.swift b/Sources/DOMKit/WebIDL/MimeTypeArray.swift deleted file mode 100644 index 8dc67b43..00000000 --- a/Sources/DOMKit/WebIDL/MimeTypeArray.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MimeTypeArray: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeTypeArray].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> MimeType? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> MimeType? { - jsObject[key].fromJSValue() - } -} diff --git a/Sources/DOMKit/WebIDL/MouseEvent.swift b/Sources/DOMKit/WebIDL/MouseEvent.swift deleted file mode 100644 index 274f1d93..00000000 --- a/Sources/DOMKit/WebIDL/MouseEvent.swift +++ /dev/null @@ -1,85 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MouseEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MouseEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) - _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) - _clientX = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientX) - _clientY = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientY) - _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) - _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) - _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) - _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) - _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) - _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) - _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MouseEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var screenX: Int32 - - @ReadonlyAttribute - public var screenY: Int32 - - @ReadonlyAttribute - public var clientX: Int32 - - @ReadonlyAttribute - public var clientY: Int32 - - @ReadonlyAttribute - public var ctrlKey: Bool - - @ReadonlyAttribute - public var shiftKey: Bool - - @ReadonlyAttribute - public var altKey: Bool - - @ReadonlyAttribute - public var metaKey: Bool - - @ReadonlyAttribute - public var button: Int16 - - @ReadonlyAttribute - public var buttons: UInt16 - - @ReadonlyAttribute - public var relatedTarget: EventTarget? - - @inlinable public func getModifierState(keyArg: String) -> Bool { - let this = jsObject - return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! - } - - @inlinable public func initMouseEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil, screenXArg: Int32? = nil, screenYArg: Int32? = nil, clientXArg: Int32? = nil, clientYArg: Int32? = nil, ctrlKeyArg: Bool? = nil, altKeyArg: Bool? = nil, shiftKeyArg: Bool? = nil, metaKeyArg: Bool? = nil, buttonArg: Int16? = nil, relatedTargetArg: EventTarget? = nil) { - let _arg0 = typeArg.jsValue - let _arg1 = bubblesArg?.jsValue ?? .undefined - let _arg2 = cancelableArg?.jsValue ?? .undefined - let _arg3 = viewArg?.jsValue ?? .undefined - let _arg4 = detailArg?.jsValue ?? .undefined - let _arg5 = screenXArg?.jsValue ?? .undefined - let _arg6 = screenYArg?.jsValue ?? .undefined - let _arg7 = clientXArg?.jsValue ?? .undefined - let _arg8 = clientYArg?.jsValue ?? .undefined - let _arg9 = ctrlKeyArg?.jsValue ?? .undefined - let _arg10 = altKeyArg?.jsValue ?? .undefined - let _arg11 = shiftKeyArg?.jsValue ?? .undefined - let _arg12 = metaKeyArg?.jsValue ?? .undefined - let _arg13 = buttonArg?.jsValue ?? .undefined - let _arg14 = relatedTargetArg?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) - } -} diff --git a/Sources/DOMKit/WebIDL/MouseEventInit.swift b/Sources/DOMKit/WebIDL/MouseEventInit.swift deleted file mode 100644 index 6878df64..00000000 --- a/Sources/DOMKit/WebIDL/MouseEventInit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MouseEventInit: BridgedDictionary { - public convenience init(screenX: Int32, screenY: Int32, clientX: Int32, clientY: Int32, button: Int16, buttons: UInt16, relatedTarget: EventTarget?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.screenX] = screenX.jsValue - object[Strings.screenY] = screenY.jsValue - object[Strings.clientX] = clientX.jsValue - object[Strings.clientY] = clientY.jsValue - object[Strings.button] = button.jsValue - object[Strings.buttons] = buttons.jsValue - object[Strings.relatedTarget] = relatedTarget.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _screenX = ReadWriteAttribute(jsObject: object, name: Strings.screenX) - _screenY = ReadWriteAttribute(jsObject: object, name: Strings.screenY) - _clientX = ReadWriteAttribute(jsObject: object, name: Strings.clientX) - _clientY = ReadWriteAttribute(jsObject: object, name: Strings.clientY) - _button = ReadWriteAttribute(jsObject: object, name: Strings.button) - _buttons = ReadWriteAttribute(jsObject: object, name: Strings.buttons) - _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var screenX: Int32 - - @ReadWriteAttribute - public var screenY: Int32 - - @ReadWriteAttribute - public var clientX: Int32 - - @ReadWriteAttribute - public var clientY: Int32 - - @ReadWriteAttribute - public var button: Int16 - - @ReadWriteAttribute - public var buttons: UInt16 - - @ReadWriteAttribute - public var relatedTarget: EventTarget? -} diff --git a/Sources/DOMKit/WebIDL/MultiCacheQueryOptions.swift b/Sources/DOMKit/WebIDL/MultiCacheQueryOptions.swift deleted file mode 100644 index 94a1f466..00000000 --- a/Sources/DOMKit/WebIDL/MultiCacheQueryOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MultiCacheQueryOptions: BridgedDictionary { - public convenience init(cacheName: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.cacheName] = cacheName.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _cacheName = ReadWriteAttribute(jsObject: object, name: Strings.cacheName) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var cacheName: String -} diff --git a/Sources/DOMKit/WebIDL/MutationEvent.swift b/Sources/DOMKit/WebIDL/MutationEvent.swift deleted file mode 100644 index d81e064e..00000000 --- a/Sources/DOMKit/WebIDL/MutationEvent.swift +++ /dev/null @@ -1,51 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MutationEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MutationEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _relatedNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedNode) - _prevValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.prevValue) - _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) - _attrName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrName) - _attrChange = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrChange) - super.init(unsafelyWrapping: jsObject) - } - - public static let MODIFICATION: UInt16 = 1 - - public static let ADDITION: UInt16 = 2 - - public static let REMOVAL: UInt16 = 3 - - @ReadonlyAttribute - public var relatedNode: Node? - - @ReadonlyAttribute - public var prevValue: String - - @ReadonlyAttribute - public var newValue: String - - @ReadonlyAttribute - public var attrName: String - - @ReadonlyAttribute - public var attrChange: UInt16 - - @inlinable public func initMutationEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, relatedNodeArg: Node? = nil, prevValueArg: String? = nil, newValueArg: String? = nil, attrNameArg: String? = nil, attrChangeArg: UInt16? = nil) { - let _arg0 = typeArg.jsValue - let _arg1 = bubblesArg?.jsValue ?? .undefined - let _arg2 = cancelableArg?.jsValue ?? .undefined - let _arg3 = relatedNodeArg?.jsValue ?? .undefined - let _arg4 = prevValueArg?.jsValue ?? .undefined - let _arg5 = newValueArg?.jsValue ?? .undefined - let _arg6 = attrNameArg?.jsValue ?? .undefined - let _arg7 = attrChangeArg?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMutationEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} diff --git a/Sources/DOMKit/WebIDL/MutationObserver.swift b/Sources/DOMKit/WebIDL/MutationObserver.swift deleted file mode 100644 index 9dd93278..00000000 --- a/Sources/DOMKit/WebIDL/MutationObserver.swift +++ /dev/null @@ -1,31 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MutationObserver: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationObserver].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - // XXX: constructor is ignored - - @inlinable public func observe(target: Node, options: MutationObserverInit? = nil) { - let this = jsObject - _ = this[Strings.observe].function!(this: this, arguments: [target.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func disconnect() { - let this = jsObject - _ = this[Strings.disconnect].function!(this: this, arguments: []) - } - - @inlinable public func takeRecords() -> [MutationRecord] { - let this = jsObject - return this[Strings.takeRecords].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MutationObserverInit.swift b/Sources/DOMKit/WebIDL/MutationObserverInit.swift deleted file mode 100644 index ae71401c..00000000 --- a/Sources/DOMKit/WebIDL/MutationObserverInit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MutationObserverInit: BridgedDictionary { - public convenience init(childList: Bool, attributes: Bool, characterData: Bool, subtree: Bool, attributeOldValue: Bool, characterDataOldValue: Bool, attributeFilter: [String]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.childList] = childList.jsValue - object[Strings.attributes] = attributes.jsValue - object[Strings.characterData] = characterData.jsValue - object[Strings.subtree] = subtree.jsValue - object[Strings.attributeOldValue] = attributeOldValue.jsValue - object[Strings.characterDataOldValue] = characterDataOldValue.jsValue - object[Strings.attributeFilter] = attributeFilter.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _childList = ReadWriteAttribute(jsObject: object, name: Strings.childList) - _attributes = ReadWriteAttribute(jsObject: object, name: Strings.attributes) - _characterData = ReadWriteAttribute(jsObject: object, name: Strings.characterData) - _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) - _attributeOldValue = ReadWriteAttribute(jsObject: object, name: Strings.attributeOldValue) - _characterDataOldValue = ReadWriteAttribute(jsObject: object, name: Strings.characterDataOldValue) - _attributeFilter = ReadWriteAttribute(jsObject: object, name: Strings.attributeFilter) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var childList: Bool - - @ReadWriteAttribute - public var attributes: Bool - - @ReadWriteAttribute - public var characterData: Bool - - @ReadWriteAttribute - public var subtree: Bool - - @ReadWriteAttribute - public var attributeOldValue: Bool - - @ReadWriteAttribute - public var characterDataOldValue: Bool - - @ReadWriteAttribute - public var attributeFilter: [String] -} diff --git a/Sources/DOMKit/WebIDL/MutationRecord.swift b/Sources/DOMKit/WebIDL/MutationRecord.swift deleted file mode 100644 index 2b7a6fa1..00000000 --- a/Sources/DOMKit/WebIDL/MutationRecord.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MutationRecord: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationRecord].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) - _addedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.addedNodes) - _removedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.removedNodes) - _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) - _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) - _attributeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeName) - _attributeNamespace = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeNamespace) - _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var target: Node - - @ReadonlyAttribute - public var addedNodes: NodeList - - @ReadonlyAttribute - public var removedNodes: NodeList - - @ReadonlyAttribute - public var previousSibling: Node? - - @ReadonlyAttribute - public var nextSibling: Node? - - @ReadonlyAttribute - public var attributeName: String? - - @ReadonlyAttribute - public var attributeNamespace: String? - - @ReadonlyAttribute - public var oldValue: String? -} diff --git a/Sources/DOMKit/WebIDL/NamedNodeMap.swift b/Sources/DOMKit/WebIDL/NamedNodeMap.swift deleted file mode 100644 index 36468f52..00000000 --- a/Sources/DOMKit/WebIDL/NamedNodeMap.swift +++ /dev/null @@ -1,51 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class NamedNodeMap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NamedNodeMap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Attr? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Attr? { - jsObject[key].fromJSValue() - } - - @inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? { - let this = jsObject - return this[Strings.getNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setNamedItem(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setNamedItem].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func setNamedItemNS(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setNamedItemNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func removeNamedItem(qualifiedName: String) -> Attr { - let this = jsObject - return this[Strings.removeNamedItem].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func removeNamedItemNS(namespace: String?, localName: String) -> Attr { - let this = jsObject - return this[Strings.removeNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/NavigationPreloadManager.swift b/Sources/DOMKit/WebIDL/NavigationPreloadManager.swift deleted file mode 100644 index 3484feb7..00000000 --- a/Sources/DOMKit/WebIDL/NavigationPreloadManager.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class NavigationPreloadManager: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NavigationPreloadManager].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func enable() -> JSPromise { - let this = jsObject - return this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func enable() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func disable() -> JSPromise { - let this = jsObject - return this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func disable() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func setHeaderValue(value: String) -> JSPromise { - let this = jsObject - return this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func setHeaderValue(value: String) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getState() -> JSPromise { - let this = jsObject - return this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getState() async throws -> NavigationPreloadState { - let this = jsObject - let _promise: JSPromise = this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/NavigationPreloadState.swift b/Sources/DOMKit/WebIDL/NavigationPreloadState.swift deleted file mode 100644 index 4aea9988..00000000 --- a/Sources/DOMKit/WebIDL/NavigationPreloadState.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class NavigationPreloadState: BridgedDictionary { - public convenience init(enabled: Bool, headerValue: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.enabled] = enabled.jsValue - object[Strings.headerValue] = headerValue.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _enabled = ReadWriteAttribute(jsObject: object, name: Strings.enabled) - _headerValue = ReadWriteAttribute(jsObject: object, name: Strings.headerValue) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var enabled: Bool - - @ReadWriteAttribute - public var headerValue: String -} diff --git a/Sources/DOMKit/WebIDL/Navigator.swift b/Sources/DOMKit/WebIDL/Navigator.swift deleted file mode 100644 index f697818a..00000000 --- a/Sources/DOMKit/WebIDL/Navigator.swift +++ /dev/null @@ -1,18 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Navigator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _serviceWorker = ReadonlyAttribute(jsObject: jsObject, name: Strings.serviceWorker) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var serviceWorker: ServiceWorkerContainer -} diff --git a/Sources/DOMKit/WebIDL/NavigatorConcurrentHardware.swift b/Sources/DOMKit/WebIDL/NavigatorConcurrentHardware.swift deleted file mode 100644 index 17b759f4..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorConcurrentHardware.swift +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorConcurrentHardware: JSBridgedClass {} -public extension NavigatorConcurrentHardware { - @inlinable var hardwareConcurrency: UInt64 { ReadonlyAttribute[Strings.hardwareConcurrency, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/NavigatorContentUtils.swift b/Sources/DOMKit/WebIDL/NavigatorContentUtils.swift deleted file mode 100644 index 02a62820..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorContentUtils.swift +++ /dev/null @@ -1,17 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorContentUtils: JSBridgedClass {} -public extension NavigatorContentUtils { - @inlinable func registerProtocolHandler(scheme: String, url: String) { - let this = jsObject - _ = this[Strings.registerProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) - } - - @inlinable func unregisterProtocolHandler(scheme: String, url: String) { - let this = jsObject - _ = this[Strings.unregisterProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/NavigatorCookies.swift b/Sources/DOMKit/WebIDL/NavigatorCookies.swift deleted file mode 100644 index 7a35664b..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorCookies.swift +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorCookies: JSBridgedClass {} -public extension NavigatorCookies { - @inlinable var cookieEnabled: Bool { ReadonlyAttribute[Strings.cookieEnabled, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/NavigatorID.swift b/Sources/DOMKit/WebIDL/NavigatorID.swift deleted file mode 100644 index e925577d..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorID.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorID: JSBridgedClass {} -public extension NavigatorID { - @inlinable var appCodeName: String { ReadonlyAttribute[Strings.appCodeName, in: jsObject] } - - @inlinable var appName: String { ReadonlyAttribute[Strings.appName, in: jsObject] } - - @inlinable var appVersion: String { ReadonlyAttribute[Strings.appVersion, in: jsObject] } - - @inlinable var platform: String { ReadonlyAttribute[Strings.platform, in: jsObject] } - - @inlinable var product: String { ReadonlyAttribute[Strings.product, in: jsObject] } - - @inlinable var productSub: String { ReadonlyAttribute[Strings.productSub, in: jsObject] } - - @inlinable var userAgent: String { ReadonlyAttribute[Strings.userAgent, in: jsObject] } - - @inlinable var vendor: String { ReadonlyAttribute[Strings.vendor, in: jsObject] } - - @inlinable var vendorSub: String { ReadonlyAttribute[Strings.vendorSub, in: jsObject] } - - @inlinable func taintEnabled() -> Bool { - let this = jsObject - return this[Strings.taintEnabled].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var oscpu: String { ReadonlyAttribute[Strings.oscpu, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/NavigatorLanguage.swift b/Sources/DOMKit/WebIDL/NavigatorLanguage.swift deleted file mode 100644 index a692466a..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorLanguage.swift +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorLanguage: JSBridgedClass {} -public extension NavigatorLanguage { - @inlinable var language: String { ReadonlyAttribute[Strings.language, in: jsObject] } - - @inlinable var languages: [String] { ReadonlyAttribute[Strings.languages, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/NavigatorOnLine.swift b/Sources/DOMKit/WebIDL/NavigatorOnLine.swift deleted file mode 100644 index 56f5b291..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorOnLine.swift +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorOnLine: JSBridgedClass {} -public extension NavigatorOnLine { - @inlinable var onLine: Bool { ReadonlyAttribute[Strings.onLine, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/NavigatorPlugins.swift b/Sources/DOMKit/WebIDL/NavigatorPlugins.swift deleted file mode 100644 index 69a000c0..00000000 --- a/Sources/DOMKit/WebIDL/NavigatorPlugins.swift +++ /dev/null @@ -1,18 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NavigatorPlugins: JSBridgedClass {} -public extension NavigatorPlugins { - @inlinable var plugins: PluginArray { ReadonlyAttribute[Strings.plugins, in: jsObject] } - - @inlinable var mimeTypes: MimeTypeArray { ReadonlyAttribute[Strings.mimeTypes, in: jsObject] } - - @inlinable func javaEnabled() -> Bool { - let this = jsObject - return this[Strings.javaEnabled].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var pdfViewerEnabled: Bool { ReadonlyAttribute[Strings.pdfViewerEnabled, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/Node.swift b/Sources/DOMKit/WebIDL/Node.swift deleted file mode 100644 index 870ce77c..00000000 --- a/Sources/DOMKit/WebIDL/Node.swift +++ /dev/null @@ -1,179 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Node: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Node].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _nodeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeType) - _nodeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeName) - _baseURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.baseURI) - _isConnected = ReadonlyAttribute(jsObject: jsObject, name: Strings.isConnected) - _ownerDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerDocument) - _parentNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentNode) - _parentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentElement) - _childNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.childNodes) - _firstChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.firstChild) - _lastChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastChild) - _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) - _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) - _nodeValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.nodeValue) - _textContent = ReadWriteAttribute(jsObject: jsObject, name: Strings.textContent) - super.init(unsafelyWrapping: jsObject) - } - - public static let ELEMENT_NODE: UInt16 = 1 - - public static let ATTRIBUTE_NODE: UInt16 = 2 - - public static let TEXT_NODE: UInt16 = 3 - - public static let CDATA_SECTION_NODE: UInt16 = 4 - - public static let ENTITY_REFERENCE_NODE: UInt16 = 5 - - public static let ENTITY_NODE: UInt16 = 6 - - public static let PROCESSING_INSTRUCTION_NODE: UInt16 = 7 - - public static let COMMENT_NODE: UInt16 = 8 - - public static let DOCUMENT_NODE: UInt16 = 9 - - public static let DOCUMENT_TYPE_NODE: UInt16 = 10 - - public static let DOCUMENT_FRAGMENT_NODE: UInt16 = 11 - - public static let NOTATION_NODE: UInt16 = 12 - - @ReadonlyAttribute - public var nodeType: UInt16 - - @ReadonlyAttribute - public var nodeName: String - - @ReadonlyAttribute - public var baseURI: String - - @ReadonlyAttribute - public var isConnected: Bool - - @ReadonlyAttribute - public var ownerDocument: Document? - - @inlinable public func getRootNode(options: GetRootNodeOptions? = nil) -> Self { - let this = jsObject - return this[Strings.getRootNode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var parentNode: Node? - - @ReadonlyAttribute - public var parentElement: Element? - - @inlinable public func hasChildNodes() -> Bool { - let this = jsObject - return this[Strings.hasChildNodes].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var childNodes: NodeList - - @ReadonlyAttribute - public var firstChild: Node? - - @ReadonlyAttribute - public var lastChild: Node? - - @ReadonlyAttribute - public var previousSibling: Node? - - @ReadonlyAttribute - public var nextSibling: Node? - - @ReadWriteAttribute - public var nodeValue: String? - - @ReadWriteAttribute - public var textContent: String? - - @inlinable public func normalize() { - let this = jsObject - _ = this[Strings.normalize].function!(this: this, arguments: []) - } - - @inlinable public func cloneNode(deep: Bool? = nil) -> Self { - let this = jsObject - return this[Strings.cloneNode].function!(this: this, arguments: [deep?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func isEqualNode(otherNode: Node?) -> Bool { - let this = jsObject - return this[Strings.isEqualNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! - } - - @inlinable public func isSameNode(otherNode: Node?) -> Bool { - let this = jsObject - return this[Strings.isSameNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! - } - - public static let DOCUMENT_POSITION_DISCONNECTED: UInt16 = 0x01 - - public static let DOCUMENT_POSITION_PRECEDING: UInt16 = 0x02 - - public static let DOCUMENT_POSITION_FOLLOWING: UInt16 = 0x04 - - public static let DOCUMENT_POSITION_CONTAINS: UInt16 = 0x08 - - public static let DOCUMENT_POSITION_CONTAINED_BY: UInt16 = 0x10 - - public static let DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: UInt16 = 0x20 - - @inlinable public func compareDocumentPosition(other: Node) -> UInt16 { - let this = jsObject - return this[Strings.compareDocumentPosition].function!(this: this, arguments: [other.jsValue]).fromJSValue()! - } - - @inlinable public func contains(other: Node?) -> Bool { - let this = jsObject - return this[Strings.contains].function!(this: this, arguments: [other.jsValue]).fromJSValue()! - } - - @inlinable public func lookupPrefix(namespace: String?) -> String? { - let this = jsObject - return this[Strings.lookupPrefix].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! - } - - @inlinable public func lookupNamespaceURI(prefix: String?) -> String? { - let this = jsObject - return this[Strings.lookupNamespaceURI].function!(this: this, arguments: [prefix.jsValue]).fromJSValue()! - } - - @inlinable public func isDefaultNamespace(namespace: String?) -> Bool { - let this = jsObject - return this[Strings.isDefaultNamespace].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! - } - - @inlinable public func insertBefore(node: Node, child: Node?) -> Self { - let this = jsObject - return this[Strings.insertBefore].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! - } - - @inlinable public func appendChild(node: Node) -> Self { - let this = jsObject - return this[Strings.appendChild].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public func replaceChild(node: Node, child: Node) -> Self { - let this = jsObject - return this[Strings.replaceChild].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! - } - - @inlinable public func removeChild(child: Node) -> Self { - let this = jsObject - return this[Strings.removeChild].function!(this: this, arguments: [child.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/NodeIterator.swift b/Sources/DOMKit/WebIDL/NodeIterator.swift deleted file mode 100644 index b3ae30eb..00000000 --- a/Sources/DOMKit/WebIDL/NodeIterator.swift +++ /dev/null @@ -1,47 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class NodeIterator: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeIterator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) - _referenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.referenceNode) - _pointerBeforeReferenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.pointerBeforeReferenceNode) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var root: Node - - @ReadonlyAttribute - public var referenceNode: Node - - @ReadonlyAttribute - public var pointerBeforeReferenceNode: Bool - - @ReadonlyAttribute - public var whatToShow: UInt32 - - // XXX: member 'filter' is ignored - - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func detach() { - let this = jsObject - _ = this[Strings.detach].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/NodeList.swift b/Sources/DOMKit/WebIDL/NodeList.swift deleted file mode 100644 index 4e3a16f4..00000000 --- a/Sources/DOMKit/WebIDL/NodeList.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class NodeList: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> Node? { - jsObject[key].fromJSValue() - } - - @ReadonlyAttribute - public var length: UInt32 - - public typealias Element = Node - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} diff --git a/Sources/DOMKit/WebIDL/Node_or_String.swift b/Sources/DOMKit/WebIDL/Node_or_String.swift deleted file mode 100644 index 9efca3bf..00000000 --- a/Sources/DOMKit/WebIDL/Node_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Node_or_String: ConvertibleToJSValue {} -extension Node: Any_Node_or_String {} -extension String: Any_Node_or_String {} - -public enum Node_or_String: JSValueCompatible, Any_Node_or_String { - case node(Node) - case string(String) - - var node: Node? { - switch self { - case let .node(node): return node - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let node: Node = value.fromJSValue() { - return .node(node) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .node(node): - return node.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/NonDocumentTypeChildNode.swift b/Sources/DOMKit/WebIDL/NonDocumentTypeChildNode.swift deleted file mode 100644 index 211c96f3..00000000 --- a/Sources/DOMKit/WebIDL/NonDocumentTypeChildNode.swift +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NonDocumentTypeChildNode: JSBridgedClass {} -public extension NonDocumentTypeChildNode { - @inlinable var previousElementSibling: Element? { ReadonlyAttribute[Strings.previousElementSibling, in: jsObject] } - - @inlinable var nextElementSibling: Element? { ReadonlyAttribute[Strings.nextElementSibling, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/NonElementParentNode.swift b/Sources/DOMKit/WebIDL/NonElementParentNode.swift deleted file mode 100644 index ebbbf429..00000000 --- a/Sources/DOMKit/WebIDL/NonElementParentNode.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol NonElementParentNode: JSBridgedClass {} -public extension NonElementParentNode { - @inlinable func getElementById(elementId: String) -> Element? { - let this = jsObject - return this[Strings.getElementById].function!(this: this, arguments: [elementId.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/OffscreenCanvas.swift b/Sources/DOMKit/WebIDL/OffscreenCanvas.swift deleted file mode 100644 index 5f03a997..00000000 --- a/Sources/DOMKit/WebIDL/OffscreenCanvas.swift +++ /dev/null @@ -1,54 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class OffscreenCanvas: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvas].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _oncontextlost = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextlost) - _oncontextrestored = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextrestored) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(width: UInt64, height: UInt64) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [width.jsValue, height.jsValue])) - } - - @ReadWriteAttribute - public var width: UInt64 - - @ReadWriteAttribute - public var height: UInt64 - - @inlinable public func getContext(contextId: OffscreenRenderingContextId, options: JSValue? = nil) -> OffscreenRenderingContext? { - let this = jsObject - return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func transferToImageBitmap() -> ImageBitmap { - let this = jsObject - return this[Strings.transferToImageBitmap].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob { - let this = jsObject - let _promise: JSPromise = this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @ClosureAttribute1Optional - public var oncontextlost: EventHandler - - @ClosureAttribute1Optional - public var oncontextrestored: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/OffscreenCanvasRenderingContext2D.swift b/Sources/DOMKit/WebIDL/OffscreenCanvasRenderingContext2D.swift deleted file mode 100644 index b37fb1fb..00000000 --- a/Sources/DOMKit/WebIDL/OffscreenCanvasRenderingContext2D.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class OffscreenCanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvasRenderingContext2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject - } - - @inlinable public func commit() { - let this = jsObject - _ = this[Strings.commit].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var canvas: OffscreenCanvas -} diff --git a/Sources/DOMKit/WebIDL/OffscreenRenderingContextId.swift b/Sources/DOMKit/WebIDL/OffscreenRenderingContextId.swift deleted file mode 100644 index a2269db5..00000000 --- a/Sources/DOMKit/WebIDL/OffscreenRenderingContextId.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum OffscreenRenderingContextId: JSString, JSValueCompatible { - case _2d = "2d" - case bitmaprenderer = "bitmaprenderer" - case webgl = "webgl" - case webgl2 = "webgl2" - case webgpu = "webgpu" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/OptionalEffectTiming.swift b/Sources/DOMKit/WebIDL/OptionalEffectTiming.swift deleted file mode 100644 index e23c1217..00000000 --- a/Sources/DOMKit/WebIDL/OptionalEffectTiming.swift +++ /dev/null @@ -1,55 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class OptionalEffectTiming: BridgedDictionary { - public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, duration: Double_or_String, direction: PlaybackDirection, easing: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.delay] = delay.jsValue - object[Strings.endDelay] = endDelay.jsValue - object[Strings.fill] = fill.jsValue - object[Strings.iterationStart] = iterationStart.jsValue - object[Strings.iterations] = iterations.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.direction] = direction.jsValue - object[Strings.easing] = easing.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) - _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) - _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) - _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) - _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var delay: Double - - @ReadWriteAttribute - public var endDelay: Double - - @ReadWriteAttribute - public var fill: FillMode - - @ReadWriteAttribute - public var iterationStart: Double - - @ReadWriteAttribute - public var iterations: Double - - @ReadWriteAttribute - public var duration: Double_or_String - - @ReadWriteAttribute - public var direction: PlaybackDirection - - @ReadWriteAttribute - public var easing: String -} diff --git a/Sources/DOMKit/WebIDL/PageTransitionEvent.swift b/Sources/DOMKit/WebIDL/PageTransitionEvent.swift deleted file mode 100644 index 9a451d49..00000000 --- a/Sources/DOMKit/WebIDL/PageTransitionEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PageTransitionEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PageTransitionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _persisted = ReadonlyAttribute(jsObject: jsObject, name: Strings.persisted) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PageTransitionEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var persisted: Bool -} diff --git a/Sources/DOMKit/WebIDL/PageTransitionEventInit.swift b/Sources/DOMKit/WebIDL/PageTransitionEventInit.swift deleted file mode 100644 index 685734a7..00000000 --- a/Sources/DOMKit/WebIDL/PageTransitionEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PageTransitionEventInit: BridgedDictionary { - public convenience init(persisted: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.persisted] = persisted.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _persisted = ReadWriteAttribute(jsObject: object, name: Strings.persisted) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var persisted: Bool -} diff --git a/Sources/DOMKit/WebIDL/ParentNode.swift b/Sources/DOMKit/WebIDL/ParentNode.swift deleted file mode 100644 index a3d4f0ac..00000000 --- a/Sources/DOMKit/WebIDL/ParentNode.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol ParentNode: JSBridgedClass {} -public extension ParentNode { - @inlinable var children: HTMLCollection { ReadonlyAttribute[Strings.children, in: jsObject] } - - @inlinable var firstElementChild: Element? { ReadonlyAttribute[Strings.firstElementChild, in: jsObject] } - - @inlinable var lastElementChild: Element? { ReadonlyAttribute[Strings.lastElementChild, in: jsObject] } - - @inlinable var childElementCount: UInt32 { ReadonlyAttribute[Strings.childElementCount, in: jsObject] } - - @inlinable func prepend(nodes: Node_or_String...) { - let this = jsObject - _ = this[Strings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func append(nodes: Node_or_String...) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func replaceChildren(nodes: Node_or_String...) { - let this = jsObject - _ = this[Strings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func querySelector(selectors: String) -> Element? { - let this = jsObject - return this[Strings.querySelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable func querySelectorAll(selectors: String) -> NodeList { - let this = jsObject - return this[Strings.querySelectorAll].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/Path2D.swift b/Sources/DOMKit/WebIDL/Path2D.swift deleted file mode 100644 index 5275df19..00000000 --- a/Sources/DOMKit/WebIDL/Path2D.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Path2D: JSBridgedClass, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Path2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(path: Path2D_or_String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) - } - - @inlinable public func addPath(path: Path2D, transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.addPath].function!(this: this, arguments: [path.jsValue, transform?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/Path2D_or_String.swift b/Sources/DOMKit/WebIDL/Path2D_or_String.swift deleted file mode 100644 index f0b175c5..00000000 --- a/Sources/DOMKit/WebIDL/Path2D_or_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Path2D_or_String: ConvertibleToJSValue {} -extension Path2D: Any_Path2D_or_String {} -extension String: Any_Path2D_or_String {} - -public enum Path2D_or_String: JSValueCompatible, Any_Path2D_or_String { - case path2D(Path2D) - case string(String) - - var path2D: Path2D? { - switch self { - case let .path2D(path2D): return path2D - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let path2D: Path2D = value.fromJSValue() { - return .path2D(path2D) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .path2D(path2D): - return path2D.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Performance.swift b/Sources/DOMKit/WebIDL/Performance.swift deleted file mode 100644 index 37f8c687..00000000 --- a/Sources/DOMKit/WebIDL/Performance.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Performance: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Performance].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _timeOrigin = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeOrigin) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func now() -> DOMHighResTimeStamp { - let this = jsObject - return this[Strings.now].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var timeOrigin: DOMHighResTimeStamp - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/PlaybackDirection.swift b/Sources/DOMKit/WebIDL/PlaybackDirection.swift deleted file mode 100644 index ca639aea..00000000 --- a/Sources/DOMKit/WebIDL/PlaybackDirection.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum PlaybackDirection: JSString, JSValueCompatible { - case normal = "normal" - case reverse = "reverse" - case alternate = "alternate" - case alternateReverse = "alternate-reverse" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Plugin.swift b/Sources/DOMKit/WebIDL/Plugin.swift deleted file mode 100644 index 920bb6e0..00000000 --- a/Sources/DOMKit/WebIDL/Plugin.swift +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Plugin: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Plugin].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) - _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var description: String - - @ReadonlyAttribute - public var filename: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> MimeType? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> MimeType? { - jsObject[key].fromJSValue() - } -} diff --git a/Sources/DOMKit/WebIDL/PluginArray.swift b/Sources/DOMKit/WebIDL/PluginArray.swift deleted file mode 100644 index 0a21853a..00000000 --- a/Sources/DOMKit/WebIDL/PluginArray.swift +++ /dev/null @@ -1,31 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PluginArray: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.PluginArray].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public func refresh() { - let this = jsObject - _ = this[Strings.refresh].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Plugin? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Plugin? { - jsObject[key].fromJSValue() - } -} diff --git a/Sources/DOMKit/WebIDL/PopStateEvent.swift b/Sources/DOMKit/WebIDL/PopStateEvent.swift deleted file mode 100644 index cbfd0e55..00000000 --- a/Sources/DOMKit/WebIDL/PopStateEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PopStateEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PopStateEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PopStateEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var state: JSValue -} diff --git a/Sources/DOMKit/WebIDL/PopStateEventInit.swift b/Sources/DOMKit/WebIDL/PopStateEventInit.swift deleted file mode 100644 index f0814184..00000000 --- a/Sources/DOMKit/WebIDL/PopStateEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PopStateEventInit: BridgedDictionary { - public convenience init(state: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.state] = state.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _state = ReadWriteAttribute(jsObject: object, name: Strings.state) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var state: JSValue -} diff --git a/Sources/DOMKit/WebIDL/PredefinedColorSpace.swift b/Sources/DOMKit/WebIDL/PredefinedColorSpace.swift deleted file mode 100644 index 67727b3f..00000000 --- a/Sources/DOMKit/WebIDL/PredefinedColorSpace.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum PredefinedColorSpace: JSString, JSValueCompatible { - case srgb = "srgb" - case displayP3 = "display-p3" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/PremultiplyAlpha.swift b/Sources/DOMKit/WebIDL/PremultiplyAlpha.swift deleted file mode 100644 index 92f71592..00000000 --- a/Sources/DOMKit/WebIDL/PremultiplyAlpha.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum PremultiplyAlpha: JSString, JSValueCompatible { - case none = "none" - case premultiply = "premultiply" - case `default` = "default" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ProcessingInstruction.swift b/Sources/DOMKit/WebIDL/ProcessingInstruction.swift deleted file mode 100644 index 15913be1..00000000 --- a/Sources/DOMKit/WebIDL/ProcessingInstruction.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ProcessingInstruction: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProcessingInstruction].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var target: String -} diff --git a/Sources/DOMKit/WebIDL/ProgressEvent.swift b/Sources/DOMKit/WebIDL/ProgressEvent.swift deleted file mode 100644 index 2bc0d2a2..00000000 --- a/Sources/DOMKit/WebIDL/ProgressEvent.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ProgressEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProgressEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _lengthComputable = ReadonlyAttribute(jsObject: jsObject, name: Strings.lengthComputable) - _loaded = ReadonlyAttribute(jsObject: jsObject, name: Strings.loaded) - _total = ReadonlyAttribute(jsObject: jsObject, name: Strings.total) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: ProgressEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var lengthComputable: Bool - - @ReadonlyAttribute - public var loaded: UInt64 - - @ReadonlyAttribute - public var total: UInt64 -} diff --git a/Sources/DOMKit/WebIDL/ProgressEventInit.swift b/Sources/DOMKit/WebIDL/ProgressEventInit.swift deleted file mode 100644 index cefb4961..00000000 --- a/Sources/DOMKit/WebIDL/ProgressEventInit.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ProgressEventInit: BridgedDictionary { - public convenience init(lengthComputable: Bool, loaded: UInt64, total: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.lengthComputable] = lengthComputable.jsValue - object[Strings.loaded] = loaded.jsValue - object[Strings.total] = total.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _lengthComputable = ReadWriteAttribute(jsObject: object, name: Strings.lengthComputable) - _loaded = ReadWriteAttribute(jsObject: object, name: Strings.loaded) - _total = ReadWriteAttribute(jsObject: object, name: Strings.total) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var lengthComputable: Bool - - @ReadWriteAttribute - public var loaded: UInt64 - - @ReadWriteAttribute - public var total: UInt64 -} diff --git a/Sources/DOMKit/WebIDL/PromiseRejectionEvent.swift b/Sources/DOMKit/WebIDL/PromiseRejectionEvent.swift deleted file mode 100644 index 1be7f2e4..00000000 --- a/Sources/DOMKit/WebIDL/PromiseRejectionEvent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PromiseRejectionEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PromiseRejectionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _promise = ReadonlyAttribute(jsObject: jsObject, name: Strings.promise) - _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PromiseRejectionEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var promise: JSPromise - - @ReadonlyAttribute - public var reason: JSValue -} diff --git a/Sources/DOMKit/WebIDL/PromiseRejectionEventInit.swift b/Sources/DOMKit/WebIDL/PromiseRejectionEventInit.swift deleted file mode 100644 index 5ee0fc8d..00000000 --- a/Sources/DOMKit/WebIDL/PromiseRejectionEventInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PromiseRejectionEventInit: BridgedDictionary { - public convenience init(promise: JSPromise, reason: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.promise] = promise.jsValue - object[Strings.reason] = reason.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _promise = ReadWriteAttribute(jsObject: object, name: Strings.promise) - _reason = ReadWriteAttribute(jsObject: object, name: Strings.reason) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var promise: JSPromise - - @ReadWriteAttribute - public var reason: JSValue -} diff --git a/Sources/DOMKit/WebIDL/QueuingStrategy.swift b/Sources/DOMKit/WebIDL/QueuingStrategy.swift deleted file mode 100644 index 03b8b2e9..00000000 --- a/Sources/DOMKit/WebIDL/QueuingStrategy.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class QueuingStrategy: BridgedDictionary { - public convenience init(highWaterMark: Double, size: @escaping QueuingStrategySize) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.highWaterMark] = highWaterMark.jsValue - ClosureAttribute1[Strings.size, in: object] = size - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) - _size = ClosureAttribute1(jsObject: object, name: Strings.size) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var highWaterMark: Double - - @ClosureAttribute1 - public var size: QueuingStrategySize -} diff --git a/Sources/DOMKit/WebIDL/QueuingStrategyInit.swift b/Sources/DOMKit/WebIDL/QueuingStrategyInit.swift deleted file mode 100644 index 2a51a702..00000000 --- a/Sources/DOMKit/WebIDL/QueuingStrategyInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class QueuingStrategyInit: BridgedDictionary { - public convenience init(highWaterMark: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.highWaterMark] = highWaterMark.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var highWaterMark: Double -} diff --git a/Sources/DOMKit/WebIDL/RadioNodeList.swift b/Sources/DOMKit/WebIDL/RadioNodeList.swift deleted file mode 100644 index 60a188a6..00000000 --- a/Sources/DOMKit/WebIDL/RadioNodeList.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class RadioNodeList: NodeList { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.RadioNodeList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var value: String -} diff --git a/Sources/DOMKit/WebIDL/Range.swift b/Sources/DOMKit/WebIDL/Range.swift deleted file mode 100644 index aefbda5f..00000000 --- a/Sources/DOMKit/WebIDL/Range.swift +++ /dev/null @@ -1,132 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Range: AbstractRange { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Range].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _commonAncestorContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.commonAncestorContainer) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var commonAncestorContainer: Node - - @inlinable public func setStart(node: Node, offset: UInt32) { - let this = jsObject - _ = this[Strings.setStart].function!(this: this, arguments: [node.jsValue, offset.jsValue]) - } - - @inlinable public func setEnd(node: Node, offset: UInt32) { - let this = jsObject - _ = this[Strings.setEnd].function!(this: this, arguments: [node.jsValue, offset.jsValue]) - } - - @inlinable public func setStartBefore(node: Node) { - let this = jsObject - _ = this[Strings.setStartBefore].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setStartAfter(node: Node) { - let this = jsObject - _ = this[Strings.setStartAfter].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setEndBefore(node: Node) { - let this = jsObject - _ = this[Strings.setEndBefore].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setEndAfter(node: Node) { - let this = jsObject - _ = this[Strings.setEndAfter].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func collapse(toStart: Bool? = nil) { - let this = jsObject - _ = this[Strings.collapse].function!(this: this, arguments: [toStart?.jsValue ?? .undefined]) - } - - @inlinable public func selectNode(node: Node) { - let this = jsObject - _ = this[Strings.selectNode].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func selectNodeContents(node: Node) { - let this = jsObject - _ = this[Strings.selectNodeContents].function!(this: this, arguments: [node.jsValue]) - } - - public static let START_TO_START: UInt16 = 0 - - public static let START_TO_END: UInt16 = 1 - - public static let END_TO_END: UInt16 = 2 - - public static let END_TO_START: UInt16 = 3 - - @inlinable public func compareBoundaryPoints(how: UInt16, sourceRange: Range) -> Int16 { - let this = jsObject - return this[Strings.compareBoundaryPoints].function!(this: this, arguments: [how.jsValue, sourceRange.jsValue]).fromJSValue()! - } - - @inlinable public func deleteContents() { - let this = jsObject - _ = this[Strings.deleteContents].function!(this: this, arguments: []) - } - - @inlinable public func extractContents() -> DocumentFragment { - let this = jsObject - return this[Strings.extractContents].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func cloneContents() -> DocumentFragment { - let this = jsObject - return this[Strings.cloneContents].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func insertNode(node: Node) { - let this = jsObject - _ = this[Strings.insertNode].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func surroundContents(newParent: Node) { - let this = jsObject - _ = this[Strings.surroundContents].function!(this: this, arguments: [newParent.jsValue]) - } - - @inlinable public func cloneRange() -> Self { - let this = jsObject - return this[Strings.cloneRange].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func detach() { - let this = jsObject - _ = this[Strings.detach].function!(this: this, arguments: []) - } - - @inlinable public func isPointInRange(node: Node, offset: UInt32) -> Bool { - let this = jsObject - return this[Strings.isPointInRange].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! - } - - @inlinable public func comparePoint(node: Node, offset: UInt32) -> Int16 { - let this = jsObject - return this[Strings.comparePoint].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! - } - - @inlinable public func intersectsNode(node: Node) -> Bool { - let this = jsObject - return this[Strings.intersectsNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableByteStreamController.swift b/Sources/DOMKit/WebIDL/ReadableByteStreamController.swift deleted file mode 100644 index 81277212..00000000 --- a/Sources/DOMKit/WebIDL/ReadableByteStreamController.swift +++ /dev/null @@ -1,37 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableByteStreamController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableByteStreamController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _byobRequest = ReadonlyAttribute(jsObject: jsObject, name: Strings.byobRequest) - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var byobRequest: ReadableStreamBYOBRequest? - - @ReadonlyAttribute - public var desiredSize: Double? - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public func enqueue(chunk: ArrayBufferView) { - let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func error(e: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStream.swift b/Sources/DOMKit/WebIDL/ReadableStream.swift deleted file mode 100644 index c14936b2..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStream.swift +++ /dev/null @@ -1,67 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStream: JSBridgedClass, AsyncSequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStream].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) - self.jsObject = jsObject - } - - @inlinable public convenience init(underlyingSource: JSObject? = nil, strategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSource?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var locked: Bool - - @inlinable public func cancel(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func cancel(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getReader(options: ReadableStreamGetReaderOptions? = nil) -> ReadableStreamReader { - let this = jsObject - return this[Strings.getReader].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func pipeThrough(transform: ReadableWritablePair, options: StreamPipeOptions? = nil) -> Self { - let this = jsObject - return this[Strings.pipeThrough].function!(this: this, arguments: [transform.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func tee() -> [ReadableStream] { - let this = jsObject - return this[Strings.tee].function!(this: this, arguments: []).fromJSValue()! - } - - public typealias Element = JSValue - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - public func makeAsyncIterator() -> ValueIterableAsyncIterator { - ValueIterableAsyncIterator(sequence: self) - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamBYOBReadResult.swift b/Sources/DOMKit/WebIDL/ReadableStreamBYOBReadResult.swift deleted file mode 100644 index 63ef6097..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamBYOBReadResult.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamBYOBReadResult: BridgedDictionary { - public convenience init(value: ArrayBufferView?, done: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.value] = value.jsValue - object[Strings.done] = done.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _value = ReadWriteAttribute(jsObject: object, name: Strings.value) - _done = ReadWriteAttribute(jsObject: object, name: Strings.done) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var value: ArrayBufferView? - - @ReadWriteAttribute - public var done: Bool -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamBYOBReader.swift b/Sources/DOMKit/WebIDL/ReadableStreamBYOBReader.swift deleted file mode 100644 index 588d7eb2..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamBYOBReader.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamBYOBReader: JSBridgedClass, ReadableStreamGenericReader { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBReader].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(stream: ReadableStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @inlinable public func read(view: ArrayBufferView) -> JSPromise { - let this = jsObject - return this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func read(view: ArrayBufferView) async throws -> ReadableStreamBYOBReadResult { - let this = jsObject - let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func releaseLock() { - let this = jsObject - _ = this[Strings.releaseLock].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamBYOBRequest.swift b/Sources/DOMKit/WebIDL/ReadableStreamBYOBRequest.swift deleted file mode 100644 index 9a1d23f6..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamBYOBRequest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamBYOBRequest: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBRequest].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var view: ArrayBufferView? - - @inlinable public func respond(bytesWritten: UInt64) { - let this = jsObject - _ = this[Strings.respond].function!(this: this, arguments: [bytesWritten.jsValue]) - } - - @inlinable public func respondWithNewView(view: ArrayBufferView) { - let this = jsObject - _ = this[Strings.respondWithNewView].function!(this: this, arguments: [view.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamController.swift b/Sources/DOMKit/WebIDL/ReadableStreamController.swift deleted file mode 100644 index 35f64ee7..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamController.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ReadableStreamController: ConvertibleToJSValue {} -extension ReadableByteStreamController: Any_ReadableStreamController {} -extension ReadableStreamDefaultController: Any_ReadableStreamController {} - -public enum ReadableStreamController: JSValueCompatible, Any_ReadableStreamController { - case readableByteStreamController(ReadableByteStreamController) - case readableStreamDefaultController(ReadableStreamDefaultController) - - var readableByteStreamController: ReadableByteStreamController? { - switch self { - case let .readableByteStreamController(readableByteStreamController): return readableByteStreamController - default: return nil - } - } - - var readableStreamDefaultController: ReadableStreamDefaultController? { - switch self { - case let .readableStreamDefaultController(readableStreamDefaultController): return readableStreamDefaultController - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let readableByteStreamController: ReadableByteStreamController = value.fromJSValue() { - return .readableByteStreamController(readableByteStreamController) - } - if let readableStreamDefaultController: ReadableStreamDefaultController = value.fromJSValue() { - return .readableStreamDefaultController(readableStreamDefaultController) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .readableByteStreamController(readableByteStreamController): - return readableByteStreamController.jsValue - case let .readableStreamDefaultController(readableStreamDefaultController): - return readableStreamDefaultController.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamDefaultController.swift b/Sources/DOMKit/WebIDL/ReadableStreamDefaultController.swift deleted file mode 100644 index 0b2c0f9d..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamDefaultController.swift +++ /dev/null @@ -1,33 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var desiredSize: Double? - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public func enqueue(chunk: JSValue? = nil) { - let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) - } - - @inlinable public func error(e: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamDefaultReadResult.swift b/Sources/DOMKit/WebIDL/ReadableStreamDefaultReadResult.swift deleted file mode 100644 index ea49a802..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamDefaultReadResult.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamDefaultReadResult: BridgedDictionary { - public convenience init(value: JSValue, done: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.value] = value.jsValue - object[Strings.done] = done.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _value = ReadWriteAttribute(jsObject: object, name: Strings.value) - _done = ReadWriteAttribute(jsObject: object, name: Strings.done) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var value: JSValue - - @ReadWriteAttribute - public var done: Bool -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamDefaultReader.swift b/Sources/DOMKit/WebIDL/ReadableStreamDefaultReader.swift deleted file mode 100644 index b4116c98..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamDefaultReader.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamDefaultReader: JSBridgedClass, ReadableStreamGenericReader { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultReader].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(stream: ReadableStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @inlinable public func read() -> JSPromise { - let this = jsObject - return this[Strings.read].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func read() async throws -> ReadableStreamDefaultReadResult { - let this = jsObject - let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func releaseLock() { - let this = jsObject - _ = this[Strings.releaseLock].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamGenericReader.swift b/Sources/DOMKit/WebIDL/ReadableStreamGenericReader.swift deleted file mode 100644 index d3206c23..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamGenericReader.swift +++ /dev/null @@ -1,21 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol ReadableStreamGenericReader: JSBridgedClass {} -public extension ReadableStreamGenericReader { - @inlinable var closed: JSPromise { ReadonlyAttribute[Strings.closed, in: jsObject] } - - @inlinable func cancel(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func cancel(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamGetReaderOptions.swift b/Sources/DOMKit/WebIDL/ReadableStreamGetReaderOptions.swift deleted file mode 100644 index 82edb7bc..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamGetReaderOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamGetReaderOptions: BridgedDictionary { - public convenience init(mode: ReadableStreamReaderMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.mode] = mode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mode: ReadableStreamReaderMode -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamIteratorOptions.swift b/Sources/DOMKit/WebIDL/ReadableStreamIteratorOptions.swift deleted file mode 100644 index 4ba41ccb..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamIteratorOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableStreamIteratorOptions: BridgedDictionary { - public convenience init(preventCancel: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.preventCancel] = preventCancel.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventCancel: Bool -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamReader.swift b/Sources/DOMKit/WebIDL/ReadableStreamReader.swift deleted file mode 100644 index 03543e03..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamReader.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ReadableStreamReader: ConvertibleToJSValue {} -extension ReadableStreamBYOBReader: Any_ReadableStreamReader {} -extension ReadableStreamDefaultReader: Any_ReadableStreamReader {} - -public enum ReadableStreamReader: JSValueCompatible, Any_ReadableStreamReader { - case readableStreamBYOBReader(ReadableStreamBYOBReader) - case readableStreamDefaultReader(ReadableStreamDefaultReader) - - var readableStreamBYOBReader: ReadableStreamBYOBReader? { - switch self { - case let .readableStreamBYOBReader(readableStreamBYOBReader): return readableStreamBYOBReader - default: return nil - } - } - - var readableStreamDefaultReader: ReadableStreamDefaultReader? { - switch self { - case let .readableStreamDefaultReader(readableStreamDefaultReader): return readableStreamDefaultReader - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let readableStreamBYOBReader: ReadableStreamBYOBReader = value.fromJSValue() { - return .readableStreamBYOBReader(readableStreamBYOBReader) - } - if let readableStreamDefaultReader: ReadableStreamDefaultReader = value.fromJSValue() { - return .readableStreamDefaultReader(readableStreamDefaultReader) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .readableStreamBYOBReader(readableStreamBYOBReader): - return readableStreamBYOBReader.jsValue - case let .readableStreamDefaultReader(readableStreamDefaultReader): - return readableStreamDefaultReader.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamReaderMode.swift b/Sources/DOMKit/WebIDL/ReadableStreamReaderMode.swift deleted file mode 100644 index 2e2b80e3..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamReaderMode.swift +++ /dev/null @@ -1,21 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ReadableStreamReaderMode: JSString, JSValueCompatible { - case byob = "byob" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ReadableStreamType.swift b/Sources/DOMKit/WebIDL/ReadableStreamType.swift deleted file mode 100644 index a2c88e92..00000000 --- a/Sources/DOMKit/WebIDL/ReadableStreamType.swift +++ /dev/null @@ -1,21 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ReadableStreamType: JSString, JSValueCompatible { - case bytes = "bytes" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ReadableWritablePair.swift b/Sources/DOMKit/WebIDL/ReadableWritablePair.swift deleted file mode 100644 index fb2fb13b..00000000 --- a/Sources/DOMKit/WebIDL/ReadableWritablePair.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ReadableWritablePair: BridgedDictionary { - public convenience init(readable: ReadableStream, writable: WritableStream) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.readable] = readable.jsValue - object[Strings.writable] = writable.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _readable = ReadWriteAttribute(jsObject: object, name: Strings.readable) - _writable = ReadWriteAttribute(jsObject: object, name: Strings.writable) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var readable: ReadableStream - - @ReadWriteAttribute - public var writable: WritableStream -} diff --git a/Sources/DOMKit/WebIDL/ReferrerPolicy.swift b/Sources/DOMKit/WebIDL/ReferrerPolicy.swift deleted file mode 100644 index c1e36114..00000000 --- a/Sources/DOMKit/WebIDL/ReferrerPolicy.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ReferrerPolicy: JSString, JSValueCompatible { - case _empty = "" - case noReferrer = "no-referrer" - case noReferrerWhenDowngrade = "no-referrer-when-downgrade" - case sameOrigin = "same-origin" - case origin = "origin" - case strictOrigin = "strict-origin" - case originWhenCrossOrigin = "origin-when-cross-origin" - case strictOriginWhenCrossOrigin = "strict-origin-when-cross-origin" - case unsafeUrl = "unsafe-url" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/RegistrationOptions.swift b/Sources/DOMKit/WebIDL/RegistrationOptions.swift deleted file mode 100644 index 97cfe75b..00000000 --- a/Sources/DOMKit/WebIDL/RegistrationOptions.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class RegistrationOptions: BridgedDictionary { - public convenience init(scope: String, type: WorkerType, updateViaCache: ServiceWorkerUpdateViaCache) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.scope] = scope.jsValue - object[Strings.type] = type.jsValue - object[Strings.updateViaCache] = updateViaCache.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _scope = ReadWriteAttribute(jsObject: object, name: Strings.scope) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _updateViaCache = ReadWriteAttribute(jsObject: object, name: Strings.updateViaCache) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var scope: String - - @ReadWriteAttribute - public var type: WorkerType - - @ReadWriteAttribute - public var updateViaCache: ServiceWorkerUpdateViaCache -} diff --git a/Sources/DOMKit/WebIDL/Request.swift b/Sources/DOMKit/WebIDL/Request.swift deleted file mode 100644 index 39f25ce8..00000000 --- a/Sources/DOMKit/WebIDL/Request.swift +++ /dev/null @@ -1,83 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Request: JSBridgedClass, Body { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Request].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _method = ReadonlyAttribute(jsObject: jsObject, name: Strings.method) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) - _destination = ReadonlyAttribute(jsObject: jsObject, name: Strings.destination) - _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) - _referrerPolicy = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) - _credentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.credentials) - _cache = ReadonlyAttribute(jsObject: jsObject, name: Strings.cache) - _redirect = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirect) - _integrity = ReadonlyAttribute(jsObject: jsObject, name: Strings.integrity) - _keepalive = ReadonlyAttribute(jsObject: jsObject, name: Strings.keepalive) - _isReloadNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isReloadNavigation) - _isHistoryNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isHistoryNavigation) - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) - self.jsObject = jsObject - } - - @inlinable public convenience init(input: RequestInfo, init: RequestInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [input.jsValue, `init`?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var method: String - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var headers: Headers - - @ReadonlyAttribute - public var destination: RequestDestination - - @ReadonlyAttribute - public var referrer: String - - @ReadonlyAttribute - public var referrerPolicy: ReferrerPolicy - - @ReadonlyAttribute - public var mode: RequestMode - - @ReadonlyAttribute - public var credentials: RequestCredentials - - @ReadonlyAttribute - public var cache: RequestCache - - @ReadonlyAttribute - public var redirect: RequestRedirect - - @ReadonlyAttribute - public var integrity: String - - @ReadonlyAttribute - public var keepalive: Bool - - @ReadonlyAttribute - public var isReloadNavigation: Bool - - @ReadonlyAttribute - public var isHistoryNavigation: Bool - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/RequestCache.swift b/Sources/DOMKit/WebIDL/RequestCache.swift deleted file mode 100644 index 72c158ac..00000000 --- a/Sources/DOMKit/WebIDL/RequestCache.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RequestCache: JSString, JSValueCompatible { - case `default` = "default" - case noStore = "no-store" - case reload = "reload" - case noCache = "no-cache" - case forceCache = "force-cache" - case onlyIfCached = "only-if-cached" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/RequestCredentials.swift b/Sources/DOMKit/WebIDL/RequestCredentials.swift deleted file mode 100644 index 9af56520..00000000 --- a/Sources/DOMKit/WebIDL/RequestCredentials.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RequestCredentials: JSString, JSValueCompatible { - case omit = "omit" - case sameOrigin = "same-origin" - case include = "include" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/RequestDestination.swift b/Sources/DOMKit/WebIDL/RequestDestination.swift deleted file mode 100644 index 85676c49..00000000 --- a/Sources/DOMKit/WebIDL/RequestDestination.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RequestDestination: JSString, JSValueCompatible { - case _empty = "" - case audio = "audio" - case audioworklet = "audioworklet" - case document = "document" - case embed = "embed" - case font = "font" - case frame = "frame" - case iframe = "iframe" - case image = "image" - case manifest = "manifest" - case object = "object" - case paintworklet = "paintworklet" - case report = "report" - case script = "script" - case sharedworker = "sharedworker" - case style = "style" - case track = "track" - case video = "video" - case worker = "worker" - case xslt = "xslt" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/RequestInfo.swift b/Sources/DOMKit/WebIDL/RequestInfo.swift deleted file mode 100644 index 2019247c..00000000 --- a/Sources/DOMKit/WebIDL/RequestInfo.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_RequestInfo: ConvertibleToJSValue {} -extension Request: Any_RequestInfo {} -extension String: Any_RequestInfo {} - -public enum RequestInfo: JSValueCompatible, Any_RequestInfo { - case request(Request) - case string(String) - - var request: Request? { - switch self { - case let .request(request): return request - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let request: Request = value.fromJSValue() { - return .request(request) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .request(request): - return request.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/RequestInit.swift b/Sources/DOMKit/WebIDL/RequestInit.swift deleted file mode 100644 index edeebffe..00000000 --- a/Sources/DOMKit/WebIDL/RequestInit.swift +++ /dev/null @@ -1,80 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class RequestInit: BridgedDictionary { - public convenience init(method: String, headers: HeadersInit, body: BodyInit?, referrer: String, referrerPolicy: ReferrerPolicy, mode: RequestMode, credentials: RequestCredentials, cache: RequestCache, redirect: RequestRedirect, integrity: String, keepalive: Bool, signal: AbortSignal?, window: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.method] = method.jsValue - object[Strings.headers] = headers.jsValue - object[Strings.body] = body.jsValue - object[Strings.referrer] = referrer.jsValue - object[Strings.referrerPolicy] = referrerPolicy.jsValue - object[Strings.mode] = mode.jsValue - object[Strings.credentials] = credentials.jsValue - object[Strings.cache] = cache.jsValue - object[Strings.redirect] = redirect.jsValue - object[Strings.integrity] = integrity.jsValue - object[Strings.keepalive] = keepalive.jsValue - object[Strings.signal] = signal.jsValue - object[Strings.window] = window.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _method = ReadWriteAttribute(jsObject: object, name: Strings.method) - _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) - _body = ReadWriteAttribute(jsObject: object, name: Strings.body) - _referrer = ReadWriteAttribute(jsObject: object, name: Strings.referrer) - _referrerPolicy = ReadWriteAttribute(jsObject: object, name: Strings.referrerPolicy) - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - _cache = ReadWriteAttribute(jsObject: object, name: Strings.cache) - _redirect = ReadWriteAttribute(jsObject: object, name: Strings.redirect) - _integrity = ReadWriteAttribute(jsObject: object, name: Strings.integrity) - _keepalive = ReadWriteAttribute(jsObject: object, name: Strings.keepalive) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - _window = ReadWriteAttribute(jsObject: object, name: Strings.window) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var method: String - - @ReadWriteAttribute - public var headers: HeadersInit - - @ReadWriteAttribute - public var body: BodyInit? - - @ReadWriteAttribute - public var referrer: String - - @ReadWriteAttribute - public var referrerPolicy: ReferrerPolicy - - @ReadWriteAttribute - public var mode: RequestMode - - @ReadWriteAttribute - public var credentials: RequestCredentials - - @ReadWriteAttribute - public var cache: RequestCache - - @ReadWriteAttribute - public var redirect: RequestRedirect - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var keepalive: Bool - - @ReadWriteAttribute - public var signal: AbortSignal? - - @ReadWriteAttribute - public var window: JSValue -} diff --git a/Sources/DOMKit/WebIDL/RequestMode.swift b/Sources/DOMKit/WebIDL/RequestMode.swift deleted file mode 100644 index cea0dc8b..00000000 --- a/Sources/DOMKit/WebIDL/RequestMode.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RequestMode: JSString, JSValueCompatible { - case navigate = "navigate" - case sameOrigin = "same-origin" - case noCors = "no-cors" - case cors = "cors" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/RequestRedirect.swift b/Sources/DOMKit/WebIDL/RequestRedirect.swift deleted file mode 100644 index 999e4065..00000000 --- a/Sources/DOMKit/WebIDL/RequestRedirect.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RequestRedirect: JSString, JSValueCompatible { - case follow = "follow" - case error = "error" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ResizeQuality.swift b/Sources/DOMKit/WebIDL/ResizeQuality.swift deleted file mode 100644 index 2885fb64..00000000 --- a/Sources/DOMKit/WebIDL/ResizeQuality.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ResizeQuality: JSString, JSValueCompatible { - case pixelated = "pixelated" - case low = "low" - case medium = "medium" - case high = "high" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Response.swift b/Sources/DOMKit/WebIDL/Response.swift deleted file mode 100644 index 758d1166..00000000 --- a/Sources/DOMKit/WebIDL/Response.swift +++ /dev/null @@ -1,61 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Response: JSBridgedClass, Body { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Response].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _redirected = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirected) - _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) - _ok = ReadonlyAttribute(jsObject: jsObject, name: Strings.ok) - _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) - _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) - self.jsObject = jsObject - } - - @inlinable public convenience init(body: BodyInit? = nil, init: ResponseInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [body?.jsValue ?? .undefined, `init`?.jsValue ?? .undefined])) - } - - @inlinable public static func error() -> Self { - let this = constructor - return this[Strings.error].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public static func redirect(url: String, status: UInt16? = nil) -> Self { - let this = constructor - return this[Strings.redirect].function!(this: this, arguments: [url.jsValue, status?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var type: ResponseType - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var redirected: Bool - - @ReadonlyAttribute - public var status: UInt16 - - @ReadonlyAttribute - public var ok: Bool - - @ReadonlyAttribute - public var statusText: String - - @ReadonlyAttribute - public var headers: Headers - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/ResponseInit.swift b/Sources/DOMKit/WebIDL/ResponseInit.swift deleted file mode 100644 index d2da62c2..00000000 --- a/Sources/DOMKit/WebIDL/ResponseInit.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ResponseInit: BridgedDictionary { - public convenience init(status: UInt16, statusText: String, headers: HeadersInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.status] = status.jsValue - object[Strings.statusText] = statusText.jsValue - object[Strings.headers] = headers.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _status = ReadWriteAttribute(jsObject: object, name: Strings.status) - _statusText = ReadWriteAttribute(jsObject: object, name: Strings.statusText) - _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var status: UInt16 - - @ReadWriteAttribute - public var statusText: String - - @ReadWriteAttribute - public var headers: HeadersInit -} diff --git a/Sources/DOMKit/WebIDL/ResponseType.swift b/Sources/DOMKit/WebIDL/ResponseType.swift deleted file mode 100644 index 912d993a..00000000 --- a/Sources/DOMKit/WebIDL/ResponseType.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ResponseType: JSString, JSValueCompatible { - case basic = "basic" - case cors = "cors" - case `default` = "default" - case error = "error" - case opaque = "opaque" - case opaqueredirect = "opaqueredirect" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ScrollRestoration.swift b/Sources/DOMKit/WebIDL/ScrollRestoration.swift deleted file mode 100644 index 4c2ba486..00000000 --- a/Sources/DOMKit/WebIDL/ScrollRestoration.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ScrollRestoration: JSString, JSValueCompatible { - case auto = "auto" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/SelectionMode.swift b/Sources/DOMKit/WebIDL/SelectionMode.swift deleted file mode 100644 index c5434877..00000000 --- a/Sources/DOMKit/WebIDL/SelectionMode.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum SelectionMode: JSString, JSValueCompatible { - case select = "select" - case start = "start" - case end = "end" - case preserve = "preserve" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ServiceWorker.swift b/Sources/DOMKit/WebIDL/ServiceWorker.swift deleted file mode 100644 index 0ab5f4cd..00000000 --- a/Sources/DOMKit/WebIDL/ServiceWorker.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ServiceWorker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _scriptURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.scriptURL) - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _onstatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstatechange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var scriptURL: String - - @ReadonlyAttribute - public var state: ServiceWorkerState - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @ClosureAttribute1Optional - public var onstatechange: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/ServiceWorkerContainer.swift b/Sources/DOMKit/WebIDL/ServiceWorkerContainer.swift deleted file mode 100644 index 63fe6273..00000000 --- a/Sources/DOMKit/WebIDL/ServiceWorkerContainer.swift +++ /dev/null @@ -1,73 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ServiceWorkerContainer: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerContainer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _controller = ReadonlyAttribute(jsObject: jsObject, name: Strings.controller) - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _oncontrollerchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontrollerchange) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var controller: ServiceWorker? - - @ReadonlyAttribute - public var ready: JSPromise - - @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) async throws -> ServiceWorkerRegistration { - let this = jsObject - let _promise: JSPromise = this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getRegistration(clientURL: String? = nil) -> JSPromise { - let this = jsObject - return this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getRegistration(clientURL: String? = nil) async throws -> ServiceWorkerRegistration? { - let this = jsObject - let _promise: JSPromise = this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getRegistrations() -> JSPromise { - let this = jsObject - return this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getRegistrations() async throws -> [ServiceWorkerRegistration] { - let this = jsObject - let _promise: JSPromise = this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func startMessages() { - let this = jsObject - _ = this[Strings.startMessages].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var oncontrollerchange: EventHandler - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/ServiceWorkerRegistration.swift b/Sources/DOMKit/WebIDL/ServiceWorkerRegistration.swift deleted file mode 100644 index 67ea90db..00000000 --- a/Sources/DOMKit/WebIDL/ServiceWorkerRegistration.swift +++ /dev/null @@ -1,64 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ServiceWorkerRegistration: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerRegistration].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _installing = ReadonlyAttribute(jsObject: jsObject, name: Strings.installing) - _waiting = ReadonlyAttribute(jsObject: jsObject, name: Strings.waiting) - _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) - _navigationPreload = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigationPreload) - _scope = ReadonlyAttribute(jsObject: jsObject, name: Strings.scope) - _updateViaCache = ReadonlyAttribute(jsObject: jsObject, name: Strings.updateViaCache) - _onupdatefound = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onupdatefound) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var installing: ServiceWorker? - - @ReadonlyAttribute - public var waiting: ServiceWorker? - - @ReadonlyAttribute - public var active: ServiceWorker? - - @ReadonlyAttribute - public var navigationPreload: NavigationPreloadManager - - @ReadonlyAttribute - public var scope: String - - @ReadonlyAttribute - public var updateViaCache: ServiceWorkerUpdateViaCache - - @inlinable public func update() -> JSPromise { - let this = jsObject - return this[Strings.update].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func update() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.update].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func unregister() -> JSPromise { - let this = jsObject - return this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func unregister() async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @ClosureAttribute1Optional - public var onupdatefound: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/ServiceWorkerState.swift b/Sources/DOMKit/WebIDL/ServiceWorkerState.swift deleted file mode 100644 index e5bfac3b..00000000 --- a/Sources/DOMKit/WebIDL/ServiceWorkerState.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ServiceWorkerState: JSString, JSValueCompatible { - case parsed = "parsed" - case installing = "installing" - case installed = "installed" - case activating = "activating" - case activated = "activated" - case redundant = "redundant" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ServiceWorkerUpdateViaCache.swift b/Sources/DOMKit/WebIDL/ServiceWorkerUpdateViaCache.swift deleted file mode 100644 index 032f59f3..00000000 --- a/Sources/DOMKit/WebIDL/ServiceWorkerUpdateViaCache.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ServiceWorkerUpdateViaCache: JSString, JSValueCompatible { - case imports = "imports" - case all = "all" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ShadowRoot.swift b/Sources/DOMKit/WebIDL/ShadowRoot.swift deleted file mode 100644 index 524a002f..00000000 --- a/Sources/DOMKit/WebIDL/ShadowRoot.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ShadowRoot: DocumentFragment, DocumentOrShadowRoot { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ShadowRoot].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) - _delegatesFocus = ReadonlyAttribute(jsObject: jsObject, name: Strings.delegatesFocus) - _slotAssignment = ReadonlyAttribute(jsObject: jsObject, name: Strings.slotAssignment) - _host = ReadonlyAttribute(jsObject: jsObject, name: Strings.host) - _onslotchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onslotchange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var mode: ShadowRootMode - - @ReadonlyAttribute - public var delegatesFocus: Bool - - @ReadonlyAttribute - public var slotAssignment: SlotAssignmentMode - - @ReadonlyAttribute - public var host: Element - - @ClosureAttribute1Optional - public var onslotchange: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/ShadowRootInit.swift b/Sources/DOMKit/WebIDL/ShadowRootInit.swift deleted file mode 100644 index 24f7913a..00000000 --- a/Sources/DOMKit/WebIDL/ShadowRootInit.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ShadowRootInit: BridgedDictionary { - public convenience init(mode: ShadowRootMode, delegatesFocus: Bool, slotAssignment: SlotAssignmentMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.mode] = mode.jsValue - object[Strings.delegatesFocus] = delegatesFocus.jsValue - object[Strings.slotAssignment] = slotAssignment.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - _delegatesFocus = ReadWriteAttribute(jsObject: object, name: Strings.delegatesFocus) - _slotAssignment = ReadWriteAttribute(jsObject: object, name: Strings.slotAssignment) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mode: ShadowRootMode - - @ReadWriteAttribute - public var delegatesFocus: Bool - - @ReadWriteAttribute - public var slotAssignment: SlotAssignmentMode -} diff --git a/Sources/DOMKit/WebIDL/ShadowRootMode.swift b/Sources/DOMKit/WebIDL/ShadowRootMode.swift deleted file mode 100644 index 7749aa7a..00000000 --- a/Sources/DOMKit/WebIDL/ShadowRootMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ShadowRootMode: JSString, JSValueCompatible { - case open = "open" - case closed = "closed" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/SharedWorker.swift b/Sources/DOMKit/WebIDL/SharedWorker.swift deleted file mode 100644 index 152a1717..00000000 --- a/Sources/DOMKit/WebIDL/SharedWorker.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class SharedWorker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SharedWorker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _port = ReadonlyAttribute(jsObject: jsObject, name: Strings.port) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(scriptURL: String, options: String_or_WorkerOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var port: MessagePort -} diff --git a/Sources/DOMKit/WebIDL/SlotAssignmentMode.swift b/Sources/DOMKit/WebIDL/SlotAssignmentMode.swift deleted file mode 100644 index 9a4f11b1..00000000 --- a/Sources/DOMKit/WebIDL/SlotAssignmentMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum SlotAssignmentMode: JSString, JSValueCompatible { - case manual = "manual" - case named = "named" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Slottable.swift b/Sources/DOMKit/WebIDL/Slottable.swift deleted file mode 100644 index 64c060ee..00000000 --- a/Sources/DOMKit/WebIDL/Slottable.swift +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Slottable: JSBridgedClass {} -public extension Slottable { - @inlinable var assignedSlot: HTMLSlotElement? { ReadonlyAttribute[Strings.assignedSlot, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/StaticRange.swift b/Sources/DOMKit/WebIDL/StaticRange.swift deleted file mode 100644 index f8f95fe6..00000000 --- a/Sources/DOMKit/WebIDL/StaticRange.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class StaticRange: AbstractRange { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StaticRange].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(init: StaticRangeInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } -} diff --git a/Sources/DOMKit/WebIDL/StaticRangeInit.swift b/Sources/DOMKit/WebIDL/StaticRangeInit.swift deleted file mode 100644 index 45ca5d3e..00000000 --- a/Sources/DOMKit/WebIDL/StaticRangeInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class StaticRangeInit: BridgedDictionary { - public convenience init(startContainer: Node, startOffset: UInt32, endContainer: Node, endOffset: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.startContainer] = startContainer.jsValue - object[Strings.startOffset] = startOffset.jsValue - object[Strings.endContainer] = endContainer.jsValue - object[Strings.endOffset] = endOffset.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _startContainer = ReadWriteAttribute(jsObject: object, name: Strings.startContainer) - _startOffset = ReadWriteAttribute(jsObject: object, name: Strings.startOffset) - _endContainer = ReadWriteAttribute(jsObject: object, name: Strings.endContainer) - _endOffset = ReadWriteAttribute(jsObject: object, name: Strings.endOffset) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var startContainer: Node - - @ReadWriteAttribute - public var startOffset: UInt32 - - @ReadWriteAttribute - public var endContainer: Node - - @ReadWriteAttribute - public var endOffset: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/Storage.swift b/Sources/DOMKit/WebIDL/Storage.swift deleted file mode 100644 index b89232c9..00000000 --- a/Sources/DOMKit/WebIDL/Storage.swift +++ /dev/null @@ -1,36 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Storage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Storage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func key(index: UInt32) -> String? { - let this = jsObject - return this[Strings.key].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } - - @inlinable public subscript(key: String) -> String? { - jsObject[key].fromJSValue() - } - - // XXX: unsupported setter for keys of type String - - // XXX: unsupported deleter for keys of type String - - @inlinable public func clear() { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/StorageEvent.swift b/Sources/DOMKit/WebIDL/StorageEvent.swift deleted file mode 100644 index ff3503b2..00000000 --- a/Sources/DOMKit/WebIDL/StorageEvent.swift +++ /dev/null @@ -1,49 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class StorageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StorageEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) - _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) - _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _storageArea = ReadonlyAttribute(jsObject: jsObject, name: Strings.storageArea) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: StorageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var key: String? - - @ReadonlyAttribute - public var oldValue: String? - - @ReadonlyAttribute - public var newValue: String? - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var storageArea: Storage? - - @inlinable public func initStorageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, key: String? = nil, oldValue: String? = nil, newValue: String? = nil, url: String? = nil, storageArea: Storage? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = key?.jsValue ?? .undefined - let _arg4 = oldValue?.jsValue ?? .undefined - let _arg5 = newValue?.jsValue ?? .undefined - let _arg6 = url?.jsValue ?? .undefined - let _arg7 = storageArea?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initStorageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} diff --git a/Sources/DOMKit/WebIDL/StorageEventInit.swift b/Sources/DOMKit/WebIDL/StorageEventInit.swift deleted file mode 100644 index 00d17ee3..00000000 --- a/Sources/DOMKit/WebIDL/StorageEventInit.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class StorageEventInit: BridgedDictionary { - public convenience init(key: String?, oldValue: String?, newValue: String?, url: String, storageArea: Storage?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.key] = key.jsValue - object[Strings.oldValue] = oldValue.jsValue - object[Strings.newValue] = newValue.jsValue - object[Strings.url] = url.jsValue - object[Strings.storageArea] = storageArea.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _key = ReadWriteAttribute(jsObject: object, name: Strings.key) - _oldValue = ReadWriteAttribute(jsObject: object, name: Strings.oldValue) - _newValue = ReadWriteAttribute(jsObject: object, name: Strings.newValue) - _url = ReadWriteAttribute(jsObject: object, name: Strings.url) - _storageArea = ReadWriteAttribute(jsObject: object, name: Strings.storageArea) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var key: String? - - @ReadWriteAttribute - public var oldValue: String? - - @ReadWriteAttribute - public var newValue: String? - - @ReadWriteAttribute - public var url: String - - @ReadWriteAttribute - public var storageArea: Storage? -} diff --git a/Sources/DOMKit/WebIDL/StreamPipeOptions.swift b/Sources/DOMKit/WebIDL/StreamPipeOptions.swift deleted file mode 100644 index 5ef69c77..00000000 --- a/Sources/DOMKit/WebIDL/StreamPipeOptions.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class StreamPipeOptions: BridgedDictionary { - public convenience init(preventClose: Bool, preventAbort: Bool, preventCancel: Bool, signal: AbortSignal) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.preventClose] = preventClose.jsValue - object[Strings.preventAbort] = preventAbort.jsValue - object[Strings.preventCancel] = preventCancel.jsValue - object[Strings.signal] = signal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventClose = ReadWriteAttribute(jsObject: object, name: Strings.preventClose) - _preventAbort = ReadWriteAttribute(jsObject: object, name: Strings.preventAbort) - _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventClose: Bool - - @ReadWriteAttribute - public var preventAbort: Bool - - @ReadWriteAttribute - public var preventCancel: Bool - - @ReadWriteAttribute - public var signal: AbortSignal -} diff --git a/Sources/DOMKit/WebIDL/String_or_WorkerOptions.swift b/Sources/DOMKit/WebIDL/String_or_WorkerOptions.swift deleted file mode 100644 index e17ceccb..00000000 --- a/Sources/DOMKit/WebIDL/String_or_WorkerOptions.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_String_or_WorkerOptions: ConvertibleToJSValue {} -extension String: Any_String_or_WorkerOptions {} -extension WorkerOptions: Any_String_or_WorkerOptions {} - -public enum String_or_WorkerOptions: JSValueCompatible, Any_String_or_WorkerOptions { - case string(String) - case workerOptions(WorkerOptions) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var workerOptions: WorkerOptions? { - switch self { - case let .workerOptions(workerOptions): return workerOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let workerOptions: WorkerOptions = value.fromJSValue() { - return .workerOptions(workerOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .workerOptions(workerOptions): - return workerOptions.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/String_or_record_String_to_String_or_seq_of_seq_of_String.swift b/Sources/DOMKit/WebIDL/String_or_record_String_to_String_or_seq_of_seq_of_String.swift deleted file mode 100644 index fd8a1617..00000000 --- a/Sources/DOMKit/WebIDL/String_or_record_String_to_String_or_seq_of_seq_of_String.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_String_or_record_String_to_String_or_seq_of_seq_of_String: ConvertibleToJSValue {} -extension String: Any_String_or_record_String_to_String_or_seq_of_seq_of_String {} -extension Dictionary: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Key == String, Value == String {} -extension Array: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Element == [String] {} - -public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCompatible, Any_String_or_record_String_to_String_or_seq_of_seq_of_String { - case string(String) - case record_String_to_String([String: String]) - case seq_of_seq_of_String([[String]]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var record_String_to_String: [String: String]? { - switch self { - case let .record_String_to_String(record_String_to_String): return record_String_to_String - default: return nil - } - } - - var seq_of_seq_of_String: [[String]]? { - switch self { - case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let record_String_to_String: [String: String] = value.fromJSValue() { - return .record_String_to_String(record_String_to_String) - } - if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { - return .seq_of_seq_of_String(seq_of_seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .record_String_to_String(record_String_to_String): - return record_String_to_String.jsValue - case let .seq_of_seq_of_String(seq_of_seq_of_String): - return seq_of_seq_of_String.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/String_or_seq_of_Double.swift b/Sources/DOMKit/WebIDL/String_or_seq_of_Double.swift deleted file mode 100644 index 88d5c5c3..00000000 --- a/Sources/DOMKit/WebIDL/String_or_seq_of_Double.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_String_or_seq_of_Double: ConvertibleToJSValue {} -extension String: Any_String_or_seq_of_Double {} -extension Array: Any_String_or_seq_of_Double where Element == Double {} - -public enum String_or_seq_of_Double: JSValueCompatible, Any_String_or_seq_of_Double { - case string(String) - case seq_of_Double([Double]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var seq_of_Double: [Double]? { - switch self { - case let .seq_of_Double(seq_of_Double): return seq_of_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let seq_of_Double: [Double] = value.fromJSValue() { - return .seq_of_Double(seq_of_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .seq_of_Double(seq_of_Double): - return seq_of_Double.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/String_or_seq_of_String.swift b/Sources/DOMKit/WebIDL/String_or_seq_of_String.swift deleted file mode 100644 index 76ffbade..00000000 --- a/Sources/DOMKit/WebIDL/String_or_seq_of_String.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_String_or_seq_of_String: ConvertibleToJSValue {} -extension String: Any_String_or_seq_of_String {} -extension Array: Any_String_or_seq_of_String where Element == String {} - -public enum String_or_seq_of_String: JSValueCompatible, Any_String_or_seq_of_String { - case string(String) - case seq_of_String([String]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var seq_of_String: [String]? { - switch self { - case let .seq_of_String(seq_of_String): return seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let seq_of_String: [String] = value.fromJSValue() { - return .seq_of_String(seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .seq_of_String(seq_of_String): - return seq_of_String.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Strings.swift b/Sources/DOMKit/WebIDL/Strings.swift deleted file mode 100644 index 027c07c4..00000000 --- a/Sources/DOMKit/WebIDL/Strings.swift +++ /dev/null @@ -1,1437 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -@usableFromInline enum Strings { - static let _self: JSString = "self" - @usableFromInline static let AbortController: JSString = "AbortController" - @usableFromInline static let AbortSignal: JSString = "AbortSignal" - @usableFromInline static let AbstractRange: JSString = "AbstractRange" - @usableFromInline static let AddSearchProvider: JSString = "AddSearchProvider" - @usableFromInline static let Animation: JSString = "Animation" - @usableFromInline static let AnimationEffect: JSString = "AnimationEffect" - @usableFromInline static let AnimationTimeline: JSString = "AnimationTimeline" - @usableFromInline static let Attr: JSString = "Attr" - @usableFromInline static let AudioTrack: JSString = "AudioTrack" - @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" - @usableFromInline static let BarProp: JSString = "BarProp" - @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" - @usableFromInline static let Blob: JSString = "Blob" - @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" - @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" - @usableFromInline static let CDATASection: JSString = "CDATASection" - @usableFromInline static let Cache: JSString = "Cache" - @usableFromInline static let CacheStorage: JSString = "CacheStorage" - @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" - @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" - @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" - @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" - @usableFromInline static let CharacterData: JSString = "CharacterData" - @usableFromInline static let Comment: JSString = "Comment" - @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" - @usableFromInline static let CountQueuingStrategy: JSString = "CountQueuingStrategy" - @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" - @usableFromInline static let CustomEvent: JSString = "CustomEvent" - @usableFromInline static let DOMException: JSString = "DOMException" - @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" - @usableFromInline static let DOMMatrix: JSString = "DOMMatrix" - @usableFromInline static let DOMMatrixReadOnly: JSString = "DOMMatrixReadOnly" - @usableFromInline static let DOMParser: JSString = "DOMParser" - @usableFromInline static let DOMPoint: JSString = "DOMPoint" - @usableFromInline static let DOMPointReadOnly: JSString = "DOMPointReadOnly" - @usableFromInline static let DOMQuad: JSString = "DOMQuad" - @usableFromInline static let DOMRect: JSString = "DOMRect" - @usableFromInline static let DOMRectList: JSString = "DOMRectList" - @usableFromInline static let DOMRectReadOnly: JSString = "DOMRectReadOnly" - @usableFromInline static let DOMStringList: JSString = "DOMStringList" - @usableFromInline static let DOMStringMap: JSString = "DOMStringMap" - @usableFromInline static let DOMTokenList: JSString = "DOMTokenList" - @usableFromInline static let DataTransfer: JSString = "DataTransfer" - @usableFromInline static let DataTransferItem: JSString = "DataTransferItem" - @usableFromInline static let DataTransferItemList: JSString = "DataTransferItemList" - @usableFromInline static let Document: JSString = "Document" - @usableFromInline static let DocumentFragment: JSString = "DocumentFragment" - @usableFromInline static let DocumentTimeline: JSString = "DocumentTimeline" - @usableFromInline static let DocumentType: JSString = "DocumentType" - @usableFromInline static let DragEvent: JSString = "DragEvent" - @usableFromInline static let Element: JSString = "Element" - @usableFromInline static let ElementInternals: JSString = "ElementInternals" - @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" - @usableFromInline static let Event: JSString = "Event" - @usableFromInline static let EventSource: JSString = "EventSource" - @usableFromInline static let EventTarget: JSString = "EventTarget" - @usableFromInline static let External: JSString = "External" - @usableFromInline static let File: JSString = "File" - @usableFromInline static let FileList: JSString = "FileList" - @usableFromInline static let FileReader: JSString = "FileReader" - @usableFromInline static let FocusEvent: JSString = "FocusEvent" - @usableFromInline static let FormData: JSString = "FormData" - @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" - @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" - @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" - @usableFromInline static let HTMLAreaElement: JSString = "HTMLAreaElement" - @usableFromInline static let HTMLAudioElement: JSString = "HTMLAudioElement" - @usableFromInline static let HTMLBRElement: JSString = "HTMLBRElement" - @usableFromInline static let HTMLBaseElement: JSString = "HTMLBaseElement" - @usableFromInline static let HTMLBodyElement: JSString = "HTMLBodyElement" - @usableFromInline static let HTMLButtonElement: JSString = "HTMLButtonElement" - @usableFromInline static let HTMLCanvasElement: JSString = "HTMLCanvasElement" - @usableFromInline static let HTMLCollection: JSString = "HTMLCollection" - @usableFromInline static let HTMLDListElement: JSString = "HTMLDListElement" - @usableFromInline static let HTMLDataElement: JSString = "HTMLDataElement" - @usableFromInline static let HTMLDataListElement: JSString = "HTMLDataListElement" - @usableFromInline static let HTMLDetailsElement: JSString = "HTMLDetailsElement" - @usableFromInline static let HTMLDialogElement: JSString = "HTMLDialogElement" - @usableFromInline static let HTMLDirectoryElement: JSString = "HTMLDirectoryElement" - @usableFromInline static let HTMLDivElement: JSString = "HTMLDivElement" - @usableFromInline static let HTMLElement: JSString = "HTMLElement" - @usableFromInline static let HTMLEmbedElement: JSString = "HTMLEmbedElement" - @usableFromInline static let HTMLFieldSetElement: JSString = "HTMLFieldSetElement" - @usableFromInline static let HTMLFontElement: JSString = "HTMLFontElement" - @usableFromInline static let HTMLFormControlsCollection: JSString = "HTMLFormControlsCollection" - @usableFromInline static let HTMLFormElement: JSString = "HTMLFormElement" - @usableFromInline static let HTMLFrameElement: JSString = "HTMLFrameElement" - @usableFromInline static let HTMLFrameSetElement: JSString = "HTMLFrameSetElement" - @usableFromInline static let HTMLHRElement: JSString = "HTMLHRElement" - @usableFromInline static let HTMLHeadElement: JSString = "HTMLHeadElement" - @usableFromInline static let HTMLHeadingElement: JSString = "HTMLHeadingElement" - @usableFromInline static let HTMLHtmlElement: JSString = "HTMLHtmlElement" - @usableFromInline static let HTMLIFrameElement: JSString = "HTMLIFrameElement" - @usableFromInline static let HTMLImageElement: JSString = "HTMLImageElement" - @usableFromInline static let HTMLInputElement: JSString = "HTMLInputElement" - @usableFromInline static let HTMLLIElement: JSString = "HTMLLIElement" - @usableFromInline static let HTMLLabelElement: JSString = "HTMLLabelElement" - @usableFromInline static let HTMLLegendElement: JSString = "HTMLLegendElement" - @usableFromInline static let HTMLLinkElement: JSString = "HTMLLinkElement" - @usableFromInline static let HTMLMapElement: JSString = "HTMLMapElement" - @usableFromInline static let HTMLMarqueeElement: JSString = "HTMLMarqueeElement" - @usableFromInline static let HTMLMediaElement: JSString = "HTMLMediaElement" - @usableFromInline static let HTMLMenuElement: JSString = "HTMLMenuElement" - @usableFromInline static let HTMLMetaElement: JSString = "HTMLMetaElement" - @usableFromInline static let HTMLMeterElement: JSString = "HTMLMeterElement" - @usableFromInline static let HTMLModElement: JSString = "HTMLModElement" - @usableFromInline static let HTMLOListElement: JSString = "HTMLOListElement" - @usableFromInline static let HTMLObjectElement: JSString = "HTMLObjectElement" - @usableFromInline static let HTMLOptGroupElement: JSString = "HTMLOptGroupElement" - @usableFromInline static let HTMLOptionElement: JSString = "HTMLOptionElement" - @usableFromInline static let HTMLOptionsCollection: JSString = "HTMLOptionsCollection" - @usableFromInline static let HTMLOutputElement: JSString = "HTMLOutputElement" - @usableFromInline static let HTMLParagraphElement: JSString = "HTMLParagraphElement" - @usableFromInline static let HTMLParamElement: JSString = "HTMLParamElement" - @usableFromInline static let HTMLPictureElement: JSString = "HTMLPictureElement" - @usableFromInline static let HTMLPreElement: JSString = "HTMLPreElement" - @usableFromInline static let HTMLProgressElement: JSString = "HTMLProgressElement" - @usableFromInline static let HTMLQuoteElement: JSString = "HTMLQuoteElement" - @usableFromInline static let HTMLScriptElement: JSString = "HTMLScriptElement" - @usableFromInline static let HTMLSelectElement: JSString = "HTMLSelectElement" - @usableFromInline static let HTMLSlotElement: JSString = "HTMLSlotElement" - @usableFromInline static let HTMLSourceElement: JSString = "HTMLSourceElement" - @usableFromInline static let HTMLSpanElement: JSString = "HTMLSpanElement" - @usableFromInline static let HTMLStyleElement: JSString = "HTMLStyleElement" - @usableFromInline static let HTMLTableCaptionElement: JSString = "HTMLTableCaptionElement" - @usableFromInline static let HTMLTableCellElement: JSString = "HTMLTableCellElement" - @usableFromInline static let HTMLTableColElement: JSString = "HTMLTableColElement" - @usableFromInline static let HTMLTableElement: JSString = "HTMLTableElement" - @usableFromInline static let HTMLTableRowElement: JSString = "HTMLTableRowElement" - @usableFromInline static let HTMLTableSectionElement: JSString = "HTMLTableSectionElement" - @usableFromInline static let HTMLTemplateElement: JSString = "HTMLTemplateElement" - @usableFromInline static let HTMLTextAreaElement: JSString = "HTMLTextAreaElement" - @usableFromInline static let HTMLTimeElement: JSString = "HTMLTimeElement" - @usableFromInline static let HTMLTitleElement: JSString = "HTMLTitleElement" - @usableFromInline static let HTMLTrackElement: JSString = "HTMLTrackElement" - @usableFromInline static let HTMLUListElement: JSString = "HTMLUListElement" - @usableFromInline static let HTMLUnknownElement: JSString = "HTMLUnknownElement" - @usableFromInline static let HTMLVideoElement: JSString = "HTMLVideoElement" - @usableFromInline static let HashChangeEvent: JSString = "HashChangeEvent" - @usableFromInline static let Headers: JSString = "Headers" - @usableFromInline static let History: JSString = "History" - @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" - @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" - @usableFromInline static let ImageData: JSString = "ImageData" - @usableFromInline static let InputEvent: JSString = "InputEvent" - @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" - @usableFromInline static let KeyboardEvent: JSString = "KeyboardEvent" - @usableFromInline static let KeyframeEffect: JSString = "KeyframeEffect" - @usableFromInline static let Location: JSString = "Location" - @usableFromInline static let MediaError: JSString = "MediaError" - @usableFromInline static let MessageChannel: JSString = "MessageChannel" - @usableFromInline static let MessageEvent: JSString = "MessageEvent" - @usableFromInline static let MessagePort: JSString = "MessagePort" - @usableFromInline static let MimeType: JSString = "MimeType" - @usableFromInline static let MimeTypeArray: JSString = "MimeTypeArray" - @usableFromInline static let MouseEvent: JSString = "MouseEvent" - @usableFromInline static let MutationEvent: JSString = "MutationEvent" - @usableFromInline static let MutationObserver: JSString = "MutationObserver" - @usableFromInline static let MutationRecord: JSString = "MutationRecord" - @usableFromInline static let NamedNodeMap: JSString = "NamedNodeMap" - @usableFromInline static let NavigationPreloadManager: JSString = "NavigationPreloadManager" - @usableFromInline static let Navigator: JSString = "Navigator" - @usableFromInline static let Node: JSString = "Node" - @usableFromInline static let NodeIterator: JSString = "NodeIterator" - @usableFromInline static let NodeList: JSString = "NodeList" - @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" - @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" - @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" - @usableFromInline static let Path2D: JSString = "Path2D" - @usableFromInline static let Performance: JSString = "Performance" - @usableFromInline static let Plugin: JSString = "Plugin" - @usableFromInline static let PluginArray: JSString = "PluginArray" - @usableFromInline static let PopStateEvent: JSString = "PopStateEvent" - @usableFromInline static let ProcessingInstruction: JSString = "ProcessingInstruction" - @usableFromInline static let ProgressEvent: JSString = "ProgressEvent" - @usableFromInline static let PromiseRejectionEvent: JSString = "PromiseRejectionEvent" - @usableFromInline static let RadioNodeList: JSString = "RadioNodeList" - @usableFromInline static let Range: JSString = "Range" - @usableFromInline static let ReadableByteStreamController: JSString = "ReadableByteStreamController" - @usableFromInline static let ReadableStream: JSString = "ReadableStream" - @usableFromInline static let ReadableStreamBYOBReader: JSString = "ReadableStreamBYOBReader" - @usableFromInline static let ReadableStreamBYOBRequest: JSString = "ReadableStreamBYOBRequest" - @usableFromInline static let ReadableStreamDefaultController: JSString = "ReadableStreamDefaultController" - @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" - @usableFromInline static let Request: JSString = "Request" - @usableFromInline static let Response: JSString = "Response" - @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" - @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" - @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" - @usableFromInline static let ShadowRoot: JSString = "ShadowRoot" - @usableFromInline static let SharedWorker: JSString = "SharedWorker" - @usableFromInline static let StaticRange: JSString = "StaticRange" - @usableFromInline static let Storage: JSString = "Storage" - @usableFromInline static let StorageEvent: JSString = "StorageEvent" - @usableFromInline static let SubmitEvent: JSString = "SubmitEvent" - @usableFromInline static let Text: JSString = "Text" - @usableFromInline static let TextMetrics: JSString = "TextMetrics" - @usableFromInline static let TextTrack: JSString = "TextTrack" - @usableFromInline static let TextTrackCue: JSString = "TextTrackCue" - @usableFromInline static let TextTrackCueList: JSString = "TextTrackCueList" - @usableFromInline static let TextTrackList: JSString = "TextTrackList" - @usableFromInline static let TimeRanges: JSString = "TimeRanges" - @usableFromInline static let TrackEvent: JSString = "TrackEvent" - @usableFromInline static let TransformStream: JSString = "TransformStream" - @usableFromInline static let TransformStreamDefaultController: JSString = "TransformStreamDefaultController" - @usableFromInline static let TreeWalker: JSString = "TreeWalker" - @usableFromInline static let UIEvent: JSString = "UIEvent" - @usableFromInline static let URL: JSString = "URL" - @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" - @usableFromInline static let ValidityState: JSString = "ValidityState" - @usableFromInline static let VideoTrack: JSString = "VideoTrack" - @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" - @usableFromInline static let WheelEvent: JSString = "WheelEvent" - @usableFromInline static let Window: JSString = "Window" - @usableFromInline static let Worker: JSString = "Worker" - @usableFromInline static let Worklet: JSString = "Worklet" - @usableFromInline static let WritableStream: JSString = "WritableStream" - @usableFromInline static let WritableStreamDefaultController: JSString = "WritableStreamDefaultController" - @usableFromInline static let WritableStreamDefaultWriter: JSString = "WritableStreamDefaultWriter" - @usableFromInline static let XMLDocument: JSString = "XMLDocument" - @usableFromInline static let XMLHttpRequest: JSString = "XMLHttpRequest" - @usableFromInline static let XMLHttpRequestEventTarget: JSString = "XMLHttpRequestEventTarget" - @usableFromInline static let XMLHttpRequestUpload: JSString = "XMLHttpRequestUpload" - @usableFromInline static let XPathEvaluator: JSString = "XPathEvaluator" - @usableFromInline static let XPathExpression: JSString = "XPathExpression" - @usableFromInline static let XPathResult: JSString = "XPathResult" - @usableFromInline static let XSLTProcessor: JSString = "XSLTProcessor" - @usableFromInline static let a: JSString = "a" - @usableFromInline static let aLink: JSString = "aLink" - @usableFromInline static let abbr: JSString = "abbr" - @usableFromInline static let abort: JSString = "abort" - @usableFromInline static let aborted: JSString = "aborted" - @usableFromInline static let accept: JSString = "accept" - @usableFromInline static let acceptCharset: JSString = "acceptCharset" - @usableFromInline static let accessKey: JSString = "accessKey" - @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" - @usableFromInline static let action: JSString = "action" - @usableFromInline static let active: JSString = "active" - @usableFromInline static let activeCues: JSString = "activeCues" - @usableFromInline static let activeElement: JSString = "activeElement" - @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" - @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" - @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" - @usableFromInline static let actualBoundingBoxRight: JSString = "actualBoundingBoxRight" - @usableFromInline static let add: JSString = "add" - @usableFromInline static let addAll: JSString = "addAll" - @usableFromInline static let addColorStop: JSString = "addColorStop" - @usableFromInline static let addCue: JSString = "addCue" - @usableFromInline static let addModule: JSString = "addModule" - @usableFromInline static let addPath: JSString = "addPath" - @usableFromInline static let addTextTrack: JSString = "addTextTrack" - @usableFromInline static let addedNodes: JSString = "addedNodes" - @usableFromInline static let adoptNode: JSString = "adoptNode" - @usableFromInline static let after: JSString = "after" - @usableFromInline static let alert: JSString = "alert" - @usableFromInline static let align: JSString = "align" - @usableFromInline static let alinkColor: JSString = "alinkColor" - @usableFromInline static let all: JSString = "all" - @usableFromInline static let allow: JSString = "allow" - @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" - @usableFromInline static let alpha: JSString = "alpha" - @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" - @usableFromInline static let alt: JSString = "alt" - @usableFromInline static let altKey: JSString = "altKey" - @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" - @usableFromInline static let anchors: JSString = "anchors" - @usableFromInline static let animate: JSString = "animate" - @usableFromInline static let appCodeName: JSString = "appCodeName" - @usableFromInline static let appName: JSString = "appName" - @usableFromInline static let appVersion: JSString = "appVersion" - @usableFromInline static let append: JSString = "append" - @usableFromInline static let appendChild: JSString = "appendChild" - @usableFromInline static let appendData: JSString = "appendData" - @usableFromInline static let applets: JSString = "applets" - @usableFromInline static let arc: JSString = "arc" - @usableFromInline static let arcTo: JSString = "arcTo" - @usableFromInline static let archive: JSString = "archive" - @usableFromInline static let areas: JSString = "areas" - @usableFromInline static let ariaAtomic: JSString = "ariaAtomic" - @usableFromInline static let ariaAutoComplete: JSString = "ariaAutoComplete" - @usableFromInline static let ariaBusy: JSString = "ariaBusy" - @usableFromInline static let ariaChecked: JSString = "ariaChecked" - @usableFromInline static let ariaColCount: JSString = "ariaColCount" - @usableFromInline static let ariaColIndex: JSString = "ariaColIndex" - @usableFromInline static let ariaColIndexText: JSString = "ariaColIndexText" - @usableFromInline static let ariaColSpan: JSString = "ariaColSpan" - @usableFromInline static let ariaCurrent: JSString = "ariaCurrent" - @usableFromInline static let ariaDescription: JSString = "ariaDescription" - @usableFromInline static let ariaDisabled: JSString = "ariaDisabled" - @usableFromInline static let ariaExpanded: JSString = "ariaExpanded" - @usableFromInline static let ariaHasPopup: JSString = "ariaHasPopup" - @usableFromInline static let ariaHidden: JSString = "ariaHidden" - @usableFromInline static let ariaInvalid: JSString = "ariaInvalid" - @usableFromInline static let ariaKeyShortcuts: JSString = "ariaKeyShortcuts" - @usableFromInline static let ariaLabel: JSString = "ariaLabel" - @usableFromInline static let ariaLevel: JSString = "ariaLevel" - @usableFromInline static let ariaLive: JSString = "ariaLive" - @usableFromInline static let ariaModal: JSString = "ariaModal" - @usableFromInline static let ariaMultiLine: JSString = "ariaMultiLine" - @usableFromInline static let ariaMultiSelectable: JSString = "ariaMultiSelectable" - @usableFromInline static let ariaOrientation: JSString = "ariaOrientation" - @usableFromInline static let ariaPlaceholder: JSString = "ariaPlaceholder" - @usableFromInline static let ariaPosInSet: JSString = "ariaPosInSet" - @usableFromInline static let ariaPressed: JSString = "ariaPressed" - @usableFromInline static let ariaReadOnly: JSString = "ariaReadOnly" - @usableFromInline static let ariaRequired: JSString = "ariaRequired" - @usableFromInline static let ariaRoleDescription: JSString = "ariaRoleDescription" - @usableFromInline static let ariaRowCount: JSString = "ariaRowCount" - @usableFromInline static let ariaRowIndex: JSString = "ariaRowIndex" - @usableFromInline static let ariaRowIndexText: JSString = "ariaRowIndexText" - @usableFromInline static let ariaRowSpan: JSString = "ariaRowSpan" - @usableFromInline static let ariaSelected: JSString = "ariaSelected" - @usableFromInline static let ariaSetSize: JSString = "ariaSetSize" - @usableFromInline static let ariaSort: JSString = "ariaSort" - @usableFromInline static let ariaValueMax: JSString = "ariaValueMax" - @usableFromInline static let ariaValueMin: JSString = "ariaValueMin" - @usableFromInline static let ariaValueNow: JSString = "ariaValueNow" - @usableFromInline static let ariaValueText: JSString = "ariaValueText" - @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" - @usableFromInline static let `as`: JSString = "as" - @usableFromInline static let assert: JSString = "assert" - @usableFromInline static let assign: JSString = "assign" - @usableFromInline static let assignedElements: JSString = "assignedElements" - @usableFromInline static let assignedNodes: JSString = "assignedNodes" - @usableFromInline static let assignedSlot: JSString = "assignedSlot" - @usableFromInline static let async: JSString = "async" - @usableFromInline static let atob: JSString = "atob" - @usableFromInline static let attachInternals: JSString = "attachInternals" - @usableFromInline static let attachShadow: JSString = "attachShadow" - @usableFromInline static let attrChange: JSString = "attrChange" - @usableFromInline static let attrName: JSString = "attrName" - @usableFromInline static let attributeFilter: JSString = "attributeFilter" - @usableFromInline static let attributeName: JSString = "attributeName" - @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" - @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" - @usableFromInline static let attributes: JSString = "attributes" - @usableFromInline static let audioTracks: JSString = "audioTracks" - @usableFromInline static let autoAllocateChunkSize: JSString = "autoAllocateChunkSize" - @usableFromInline static let autocapitalize: JSString = "autocapitalize" - @usableFromInline static let autocomplete: JSString = "autocomplete" - @usableFromInline static let autofocus: JSString = "autofocus" - @usableFromInline static let autoplay: JSString = "autoplay" - @usableFromInline static let axis: JSString = "axis" - @usableFromInline static let b: JSString = "b" - @usableFromInline static let back: JSString = "back" - @usableFromInline static let background: JSString = "background" - @usableFromInline static let badInput: JSString = "badInput" - @usableFromInline static let baseURI: JSString = "baseURI" - @usableFromInline static let before: JSString = "before" - @usableFromInline static let beginPath: JSString = "beginPath" - @usableFromInline static let behavior: JSString = "behavior" - @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" - @usableFromInline static let bgColor: JSString = "bgColor" - @usableFromInline static let blob: JSString = "blob" - @usableFromInline static let blocking: JSString = "blocking" - @usableFromInline static let blur: JSString = "blur" - @usableFromInline static let body: JSString = "body" - @usableFromInline static let bodyUsed: JSString = "bodyUsed" - @usableFromInline static let booleanValue: JSString = "booleanValue" - @usableFromInline static let border: JSString = "border" - @usableFromInline static let bottom: JSString = "bottom" - @usableFromInline static let btoa: JSString = "btoa" - @usableFromInline static let bubbles: JSString = "bubbles" - @usableFromInline static let buffered: JSString = "buffered" - @usableFromInline static let button: JSString = "button" - @usableFromInline static let buttons: JSString = "buttons" - @usableFromInline static let byobRequest: JSString = "byobRequest" - @usableFromInline static let c: JSString = "c" - @usableFromInline static let cache: JSString = "cache" - @usableFromInline static let cacheName: JSString = "cacheName" - @usableFromInline static let caches: JSString = "caches" - @usableFromInline static let canPlayType: JSString = "canPlayType" - @usableFromInline static let cancel: JSString = "cancel" - @usableFromInline static let cancelAnimationFrame: JSString = "cancelAnimationFrame" - @usableFromInline static let cancelBubble: JSString = "cancelBubble" - @usableFromInline static let cancelable: JSString = "cancelable" - @usableFromInline static let canvas: JSString = "canvas" - @usableFromInline static let caption: JSString = "caption" - @usableFromInline static let capture: JSString = "capture" - @usableFromInline static let captureEvents: JSString = "captureEvents" - @usableFromInline static let cellIndex: JSString = "cellIndex" - @usableFromInline static let cellPadding: JSString = "cellPadding" - @usableFromInline static let cellSpacing: JSString = "cellSpacing" - @usableFromInline static let cells: JSString = "cells" - @usableFromInline static let ch: JSString = "ch" - @usableFromInline static let chOff: JSString = "chOff" - @usableFromInline static let charCode: JSString = "charCode" - @usableFromInline static let characterData: JSString = "characterData" - @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" - @usableFromInline static let characterSet: JSString = "characterSet" - @usableFromInline static let charset: JSString = "charset" - @usableFromInline static let checkValidity: JSString = "checkValidity" - @usableFromInline static let checked: JSString = "checked" - @usableFromInline static let childElementCount: JSString = "childElementCount" - @usableFromInline static let childList: JSString = "childList" - @usableFromInline static let childNodes: JSString = "childNodes" - @usableFromInline static let children: JSString = "children" - @usableFromInline static let cite: JSString = "cite" - @usableFromInline static let classList: JSString = "classList" - @usableFromInline static let className: JSString = "className" - @usableFromInline static let clear: JSString = "clear" - @usableFromInline static let clearData: JSString = "clearData" - @usableFromInline static let clearInterval: JSString = "clearInterval" - @usableFromInline static let clearParameters: JSString = "clearParameters" - @usableFromInline static let clearRect: JSString = "clearRect" - @usableFromInline static let clearTimeout: JSString = "clearTimeout" - @usableFromInline static let click: JSString = "click" - @usableFromInline static let clientId: JSString = "clientId" - @usableFromInline static let clientInformation: JSString = "clientInformation" - @usableFromInline static let clientX: JSString = "clientX" - @usableFromInline static let clientY: JSString = "clientY" - @usableFromInline static let clip: JSString = "clip" - @usableFromInline static let clone: JSString = "clone" - @usableFromInline static let cloneContents: JSString = "cloneContents" - @usableFromInline static let cloneNode: JSString = "cloneNode" - @usableFromInline static let cloneRange: JSString = "cloneRange" - @usableFromInline static let close: JSString = "close" - @usableFromInline static let closePath: JSString = "closePath" - @usableFromInline static let closed: JSString = "closed" - @usableFromInline static let closest: JSString = "closest" - @usableFromInline static let code: JSString = "code" - @usableFromInline static let codeBase: JSString = "codeBase" - @usableFromInline static let codeType: JSString = "codeType" - @usableFromInline static let colSpan: JSString = "colSpan" - @usableFromInline static let collapse: JSString = "collapse" - @usableFromInline static let collapsed: JSString = "collapsed" - @usableFromInline static let colno: JSString = "colno" - @usableFromInline static let color: JSString = "color" - @usableFromInline static let colorSpace: JSString = "colorSpace" - @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" - @usableFromInline static let cols: JSString = "cols" - @usableFromInline static let commit: JSString = "commit" - @usableFromInline static let commitStyles: JSString = "commitStyles" - @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" - @usableFromInline static let compact: JSString = "compact" - @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" - @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" - @usableFromInline static let comparePoint: JSString = "comparePoint" - @usableFromInline static let compatMode: JSString = "compatMode" - @usableFromInline static let complete: JSString = "complete" - @usableFromInline static let composed: JSString = "composed" - @usableFromInline static let composedPath: JSString = "composedPath" - @usableFromInline static let composite: JSString = "composite" - @usableFromInline static let computedOffset: JSString = "computedOffset" - @usableFromInline static let confirm: JSString = "confirm" - @usableFromInline static let console: JSString = "console" - @usableFromInline static let contains: JSString = "contains" - @usableFromInline static let content: JSString = "content" - @usableFromInline static let contentDocument: JSString = "contentDocument" - @usableFromInline static let contentEditable: JSString = "contentEditable" - @usableFromInline static let contentType: JSString = "contentType" - @usableFromInline static let contentWindow: JSString = "contentWindow" - @usableFromInline static let control: JSString = "control" - @usableFromInline static let controller: JSString = "controller" - @usableFromInline static let controls: JSString = "controls" - @usableFromInline static let convertToBlob: JSString = "convertToBlob" - @usableFromInline static let cookie: JSString = "cookie" - @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" - @usableFromInline static let coords: JSString = "coords" - @usableFromInline static let count: JSString = "count" - @usableFromInline static let countReset: JSString = "countReset" - @usableFromInline static let createAttribute: JSString = "createAttribute" - @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" - @usableFromInline static let createCDATASection: JSString = "createCDATASection" - @usableFromInline static let createCaption: JSString = "createCaption" - @usableFromInline static let createComment: JSString = "createComment" - @usableFromInline static let createConicGradient: JSString = "createConicGradient" - @usableFromInline static let createDocument: JSString = "createDocument" - @usableFromInline static let createDocumentFragment: JSString = "createDocumentFragment" - @usableFromInline static let createDocumentType: JSString = "createDocumentType" - @usableFromInline static let createElement: JSString = "createElement" - @usableFromInline static let createElementNS: JSString = "createElementNS" - @usableFromInline static let createEvent: JSString = "createEvent" - @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" - @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" - @usableFromInline static let createImageData: JSString = "createImageData" - @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" - @usableFromInline static let createObjectURL: JSString = "createObjectURL" - @usableFromInline static let createPattern: JSString = "createPattern" - @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" - @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" - @usableFromInline static let createRange: JSString = "createRange" - @usableFromInline static let createTBody: JSString = "createTBody" - @usableFromInline static let createTFoot: JSString = "createTFoot" - @usableFromInline static let createTHead: JSString = "createTHead" - @usableFromInline static let createTextNode: JSString = "createTextNode" - @usableFromInline static let credentials: JSString = "credentials" - @usableFromInline static let crossOrigin: JSString = "crossOrigin" - @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" - @usableFromInline static let ctrlKey: JSString = "ctrlKey" - @usableFromInline static let cues: JSString = "cues" - @usableFromInline static let currentIteration: JSString = "currentIteration" - @usableFromInline static let currentNode: JSString = "currentNode" - @usableFromInline static let currentScript: JSString = "currentScript" - @usableFromInline static let currentSrc: JSString = "currentSrc" - @usableFromInline static let currentTarget: JSString = "currentTarget" - @usableFromInline static let currentTime: JSString = "currentTime" - @usableFromInline static let customElements: JSString = "customElements" - @usableFromInline static let customError: JSString = "customError" - @usableFromInline static let d: JSString = "d" - @usableFromInline static let data: JSString = "data" - @usableFromInline static let dataTransfer: JSString = "dataTransfer" - @usableFromInline static let dataset: JSString = "dataset" - @usableFromInline static let dateTime: JSString = "dateTime" - @usableFromInline static let debug: JSString = "debug" - @usableFromInline static let declare: JSString = "declare" - @usableFromInline static let decode: JSString = "decode" - @usableFromInline static let decoding: JSString = "decoding" - @usableFromInline static let `default`: JSString = "default" - @usableFromInline static let defaultChecked: JSString = "defaultChecked" - @usableFromInline static let defaultMuted: JSString = "defaultMuted" - @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" - @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" - @usableFromInline static let defaultSelected: JSString = "defaultSelected" - @usableFromInline static let defaultValue: JSString = "defaultValue" - @usableFromInline static let defaultView: JSString = "defaultView" - @usableFromInline static let `defer`: JSString = "defer" - @usableFromInline static let define: JSString = "define" - @usableFromInline static let delay: JSString = "delay" - @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" - @usableFromInline static let delete: JSString = "delete" - @usableFromInline static let deleteCaption: JSString = "deleteCaption" - @usableFromInline static let deleteCell: JSString = "deleteCell" - @usableFromInline static let deleteContents: JSString = "deleteContents" - @usableFromInline static let deleteData: JSString = "deleteData" - @usableFromInline static let deleteRow: JSString = "deleteRow" - @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" - @usableFromInline static let deleteTHead: JSString = "deleteTHead" - @usableFromInline static let deltaMode: JSString = "deltaMode" - @usableFromInline static let deltaX: JSString = "deltaX" - @usableFromInline static let deltaY: JSString = "deltaY" - @usableFromInline static let deltaZ: JSString = "deltaZ" - @usableFromInline static let description: JSString = "description" - @usableFromInline static let designMode: JSString = "designMode" - @usableFromInline static let desiredSize: JSString = "desiredSize" - @usableFromInline static let destination: JSString = "destination" - @usableFromInline static let desynchronized: JSString = "desynchronized" - @usableFromInline static let detach: JSString = "detach" - @usableFromInline static let detail: JSString = "detail" - @usableFromInline static let dir: JSString = "dir" - @usableFromInline static let dirName: JSString = "dirName" - @usableFromInline static let direction: JSString = "direction" - @usableFromInline static let dirxml: JSString = "dirxml" - @usableFromInline static let disable: JSString = "disable" - @usableFromInline static let disabled: JSString = "disabled" - @usableFromInline static let disconnect: JSString = "disconnect" - @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" - @usableFromInline static let doctype: JSString = "doctype" - @usableFromInline static let document: JSString = "document" - @usableFromInline static let documentElement: JSString = "documentElement" - @usableFromInline static let documentURI: JSString = "documentURI" - @usableFromInline static let domain: JSString = "domain" - @usableFromInline static let done: JSString = "done" - @usableFromInline static let download: JSString = "download" - @usableFromInline static let draggable: JSString = "draggable" - @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" - @usableFromInline static let drawImage: JSString = "drawImage" - @usableFromInline static let dropEffect: JSString = "dropEffect" - @usableFromInline static let duration: JSString = "duration" - @usableFromInline static let e: JSString = "e" - @usableFromInline static let easing: JSString = "easing" - @usableFromInline static let effect: JSString = "effect" - @usableFromInline static let effectAllowed: JSString = "effectAllowed" - @usableFromInline static let elements: JSString = "elements" - @usableFromInline static let ellipse: JSString = "ellipse" - @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" - @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" - @usableFromInline static let embeds: JSString = "embeds" - @usableFromInline static let enable: JSString = "enable" - @usableFromInline static let enabled: JSString = "enabled" - @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" - @usableFromInline static let encoding: JSString = "encoding" - @usableFromInline static let enctype: JSString = "enctype" - @usableFromInline static let end: JSString = "end" - @usableFromInline static let endContainer: JSString = "endContainer" - @usableFromInline static let endDelay: JSString = "endDelay" - @usableFromInline static let endOffset: JSString = "endOffset" - @usableFromInline static let endTime: JSString = "endTime" - @usableFromInline static let ended: JSString = "ended" - @usableFromInline static let endings: JSString = "endings" - @usableFromInline static let enqueue: JSString = "enqueue" - @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" - @usableFromInline static let error: JSString = "error" - @usableFromInline static let evaluate: JSString = "evaluate" - @usableFromInline static let event: JSString = "event" - @usableFromInline static let eventPhase: JSString = "eventPhase" - @usableFromInline static let execCommand: JSString = "execCommand" - @usableFromInline static let extends: JSString = "extends" - @usableFromInline static let external: JSString = "external" - @usableFromInline static let extractContents: JSString = "extractContents" - @usableFromInline static let f: JSString = "f" - @usableFromInline static let face: JSString = "face" - @usableFromInline static let fastSeek: JSString = "fastSeek" - @usableFromInline static let fetch: JSString = "fetch" - @usableFromInline static let fgColor: JSString = "fgColor" - @usableFromInline static let filename: JSString = "filename" - @usableFromInline static let files: JSString = "files" - @usableFromInline static let fill: JSString = "fill" - @usableFromInline static let fillRect: JSString = "fillRect" - @usableFromInline static let fillStyle: JSString = "fillStyle" - @usableFromInline static let fillText: JSString = "fillText" - @usableFromInline static let filter: JSString = "filter" - @usableFromInline static let finish: JSString = "finish" - @usableFromInline static let finished: JSString = "finished" - @usableFromInline static let firstChild: JSString = "firstChild" - @usableFromInline static let firstElementChild: JSString = "firstElementChild" - @usableFromInline static let flatten: JSString = "flatten" - @usableFromInline static let flipX: JSString = "flipX" - @usableFromInline static let flipY: JSString = "flipY" - @usableFromInline static let flush: JSString = "flush" - @usableFromInline static let focus: JSString = "focus" - @usableFromInline static let font: JSString = "font" - @usableFromInline static let fontBoundingBoxAscent: JSString = "fontBoundingBoxAscent" - @usableFromInline static let fontBoundingBoxDescent: JSString = "fontBoundingBoxDescent" - @usableFromInline static let fontKerning: JSString = "fontKerning" - @usableFromInline static let fontStretch: JSString = "fontStretch" - @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" - @usableFromInline static let form: JSString = "form" - @usableFromInline static let formAction: JSString = "formAction" - @usableFromInline static let formData: JSString = "formData" - @usableFromInline static let formEnctype: JSString = "formEnctype" - @usableFromInline static let formMethod: JSString = "formMethod" - @usableFromInline static let formNoValidate: JSString = "formNoValidate" - @usableFromInline static let formTarget: JSString = "formTarget" - @usableFromInline static let forms: JSString = "forms" - @usableFromInline static let forward: JSString = "forward" - @usableFromInline static let frame: JSString = "frame" - @usableFromInline static let frameBorder: JSString = "frameBorder" - @usableFromInline static let frameElement: JSString = "frameElement" - @usableFromInline static let frames: JSString = "frames" - @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" - @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" - @usableFromInline static let fromMatrix: JSString = "fromMatrix" - @usableFromInline static let fromPoint: JSString = "fromPoint" - @usableFromInline static let fromQuad: JSString = "fromQuad" - @usableFromInline static let fromRect: JSString = "fromRect" - @usableFromInline static let get: JSString = "get" - @usableFromInline static let getAll: JSString = "getAll" - @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" - @usableFromInline static let getAnimations: JSString = "getAnimations" - @usableFromInline static let getAsFile: JSString = "getAsFile" - @usableFromInline static let getAttribute: JSString = "getAttribute" - @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" - @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" - @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" - @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" - @usableFromInline static let getBounds: JSString = "getBounds" - @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" - @usableFromInline static let getContext: JSString = "getContext" - @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" - @usableFromInline static let getCueById: JSString = "getCueById" - @usableFromInline static let getData: JSString = "getData" - @usableFromInline static let getElementById: JSString = "getElementById" - @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" - @usableFromInline static let getElementsByName: JSString = "getElementsByName" - @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" - @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" - @usableFromInline static let getImageData: JSString = "getImageData" - @usableFromInline static let getKeyframes: JSString = "getKeyframes" - @usableFromInline static let getLineDash: JSString = "getLineDash" - @usableFromInline static let getModifierState: JSString = "getModifierState" - @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" - @usableFromInline static let getParameter: JSString = "getParameter" - @usableFromInline static let getReader: JSString = "getReader" - @usableFromInline static let getRegistration: JSString = "getRegistration" - @usableFromInline static let getRegistrations: JSString = "getRegistrations" - @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" - @usableFromInline static let getRootNode: JSString = "getRootNode" - @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" - @usableFromInline static let getStartDate: JSString = "getStartDate" - @usableFromInline static let getState: JSString = "getState" - @usableFromInline static let getTiming: JSString = "getTiming" - @usableFromInline static let getTrackById: JSString = "getTrackById" - @usableFromInline static let getTransform: JSString = "getTransform" - @usableFromInline static let getWriter: JSString = "getWriter" - @usableFromInline static let globalAlpha: JSString = "globalAlpha" - @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" - @usableFromInline static let go: JSString = "go" - @usableFromInline static let group: JSString = "group" - @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" - @usableFromInline static let groupEnd: JSString = "groupEnd" - @usableFromInline static let handled: JSString = "handled" - @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" - @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" - @usableFromInline static let has: JSString = "has" - @usableFromInline static let hasAttribute: JSString = "hasAttribute" - @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" - @usableFromInline static let hasAttributes: JSString = "hasAttributes" - @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" - @usableFromInline static let hasFeature: JSString = "hasFeature" - @usableFromInline static let hasFocus: JSString = "hasFocus" - @usableFromInline static let hash: JSString = "hash" - @usableFromInline static let head: JSString = "head" - @usableFromInline static let headerValue: JSString = "headerValue" - @usableFromInline static let headers: JSString = "headers" - @usableFromInline static let height: JSString = "height" - @usableFromInline static let hidden: JSString = "hidden" - @usableFromInline static let high: JSString = "high" - @usableFromInline static let highWaterMark: JSString = "highWaterMark" - @usableFromInline static let history: JSString = "history" - @usableFromInline static let host: JSString = "host" - @usableFromInline static let hostname: JSString = "hostname" - @usableFromInline static let href: JSString = "href" - @usableFromInline static let hreflang: JSString = "hreflang" - @usableFromInline static let hspace: JSString = "hspace" - @usableFromInline static let htmlFor: JSString = "htmlFor" - @usableFromInline static let httpEquiv: JSString = "httpEquiv" - @usableFromInline static let id: JSString = "id" - @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" - @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" - @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" - @usableFromInline static let ignoreVary: JSString = "ignoreVary" - @usableFromInline static let imageOrientation: JSString = "imageOrientation" - @usableFromInline static let imageSizes: JSString = "imageSizes" - @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" - @usableFromInline static let imageSmoothingQuality: JSString = "imageSmoothingQuality" - @usableFromInline static let imageSrcset: JSString = "imageSrcset" - @usableFromInline static let images: JSString = "images" - @usableFromInline static let implementation: JSString = "implementation" - @usableFromInline static let importNode: JSString = "importNode" - @usableFromInline static let importStylesheet: JSString = "importStylesheet" - @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" - @usableFromInline static let includeUncontrolled: JSString = "includeUncontrolled" - @usableFromInline static let indeterminate: JSString = "indeterminate" - @usableFromInline static let index: JSString = "index" - @usableFromInline static let inert: JSString = "inert" - @usableFromInline static let info: JSString = "info" - @usableFromInline static let initCompositionEvent: JSString = "initCompositionEvent" - @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" - @usableFromInline static let initEvent: JSString = "initEvent" - @usableFromInline static let initKeyboardEvent: JSString = "initKeyboardEvent" - @usableFromInline static let initMessageEvent: JSString = "initMessageEvent" - @usableFromInline static let initMouseEvent: JSString = "initMouseEvent" - @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" - @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" - @usableFromInline static let initUIEvent: JSString = "initUIEvent" - @usableFromInline static let innerText: JSString = "innerText" - @usableFromInline static let inputEncoding: JSString = "inputEncoding" - @usableFromInline static let inputMode: JSString = "inputMode" - @usableFromInline static let inputType: JSString = "inputType" - @usableFromInline static let insertAdjacentElement: JSString = "insertAdjacentElement" - @usableFromInline static let insertAdjacentText: JSString = "insertAdjacentText" - @usableFromInline static let insertBefore: JSString = "insertBefore" - @usableFromInline static let insertCell: JSString = "insertCell" - @usableFromInline static let insertData: JSString = "insertData" - @usableFromInline static let insertNode: JSString = "insertNode" - @usableFromInline static let insertRow: JSString = "insertRow" - @usableFromInline static let installing: JSString = "installing" - @usableFromInline static let integrity: JSString = "integrity" - @usableFromInline static let intersectsNode: JSString = "intersectsNode" - @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" - @usableFromInline static let inverse: JSString = "inverse" - @usableFromInline static let invertSelf: JSString = "invertSelf" - @usableFromInline static let `is`: JSString = "is" - @usableFromInline static let is2D: JSString = "is2D" - @usableFromInline static let isComposing: JSString = "isComposing" - @usableFromInline static let isConnected: JSString = "isConnected" - @usableFromInline static let isContentEditable: JSString = "isContentEditable" - @usableFromInline static let isContextLost: JSString = "isContextLost" - @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" - @usableFromInline static let isEqualNode: JSString = "isEqualNode" - @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" - @usableFromInline static let isIdentity: JSString = "isIdentity" - @usableFromInline static let isMap: JSString = "isMap" - @usableFromInline static let isPointInPath: JSString = "isPointInPath" - @usableFromInline static let isPointInRange: JSString = "isPointInRange" - @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" - @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" - @usableFromInline static let isSameNode: JSString = "isSameNode" - @usableFromInline static let isSecureContext: JSString = "isSecureContext" - @usableFromInline static let isTrusted: JSString = "isTrusted" - @usableFromInline static let item: JSString = "item" - @usableFromInline static let items: JSString = "items" - @usableFromInline static let iterateNext: JSString = "iterateNext" - @usableFromInline static let iterationStart: JSString = "iterationStart" - @usableFromInline static let iterations: JSString = "iterations" - @usableFromInline static let javaEnabled: JSString = "javaEnabled" - @usableFromInline static let json: JSString = "json" - @usableFromInline static let keepalive: JSString = "keepalive" - @usableFromInline static let key: JSString = "key" - @usableFromInline static let keyCode: JSString = "keyCode" - @usableFromInline static let keys: JSString = "keys" - @usableFromInline static let kind: JSString = "kind" - @usableFromInline static let label: JSString = "label" - @usableFromInline static let labels: JSString = "labels" - @usableFromInline static let lang: JSString = "lang" - @usableFromInline static let language: JSString = "language" - @usableFromInline static let languages: JSString = "languages" - @usableFromInline static let lastChild: JSString = "lastChild" - @usableFromInline static let lastElementChild: JSString = "lastElementChild" - @usableFromInline static let lastEventId: JSString = "lastEventId" - @usableFromInline static let lastModified: JSString = "lastModified" - @usableFromInline static let left: JSString = "left" - @usableFromInline static let length: JSString = "length" - @usableFromInline static let lengthComputable: JSString = "lengthComputable" - @usableFromInline static let letterSpacing: JSString = "letterSpacing" - @usableFromInline static let lineCap: JSString = "lineCap" - @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" - @usableFromInline static let lineJoin: JSString = "lineJoin" - @usableFromInline static let lineTo: JSString = "lineTo" - @usableFromInline static let lineWidth: JSString = "lineWidth" - @usableFromInline static let lineno: JSString = "lineno" - @usableFromInline static let link: JSString = "link" - @usableFromInline static let linkColor: JSString = "linkColor" - @usableFromInline static let links: JSString = "links" - @usableFromInline static let list: JSString = "list" - @usableFromInline static let load: JSString = "load" - @usableFromInline static let loaded: JSString = "loaded" - @usableFromInline static let loading: JSString = "loading" - @usableFromInline static let localName: JSString = "localName" - @usableFromInline static let localStorage: JSString = "localStorage" - @usableFromInline static let location: JSString = "location" - @usableFromInline static let locationbar: JSString = "locationbar" - @usableFromInline static let locked: JSString = "locked" - @usableFromInline static let log: JSString = "log" - @usableFromInline static let longDesc: JSString = "longDesc" - @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" - @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" - @usableFromInline static let loop: JSString = "loop" - @usableFromInline static let low: JSString = "low" - @usableFromInline static let lowsrc: JSString = "lowsrc" - @usableFromInline static let m11: JSString = "m11" - @usableFromInline static let m12: JSString = "m12" - @usableFromInline static let m13: JSString = "m13" - @usableFromInline static let m14: JSString = "m14" - @usableFromInline static let m21: JSString = "m21" - @usableFromInline static let m22: JSString = "m22" - @usableFromInline static let m23: JSString = "m23" - @usableFromInline static let m24: JSString = "m24" - @usableFromInline static let m31: JSString = "m31" - @usableFromInline static let m32: JSString = "m32" - @usableFromInline static let m33: JSString = "m33" - @usableFromInline static let m34: JSString = "m34" - @usableFromInline static let m41: JSString = "m41" - @usableFromInline static let m42: JSString = "m42" - @usableFromInline static let m43: JSString = "m43" - @usableFromInline static let m44: JSString = "m44" - @usableFromInline static let marginHeight: JSString = "marginHeight" - @usableFromInline static let marginWidth: JSString = "marginWidth" - @usableFromInline static let match: JSString = "match" - @usableFromInline static let matchAll: JSString = "matchAll" - @usableFromInline static let matches: JSString = "matches" - @usableFromInline static let matrixTransform: JSString = "matrixTransform" - @usableFromInline static let max: JSString = "max" - @usableFromInline static let maxLength: JSString = "maxLength" - @usableFromInline static let measureText: JSString = "measureText" - @usableFromInline static let media: JSString = "media" - @usableFromInline static let menubar: JSString = "menubar" - @usableFromInline static let message: JSString = "message" - @usableFromInline static let metaKey: JSString = "metaKey" - @usableFromInline static let method: JSString = "method" - @usableFromInline static let mimeTypes: JSString = "mimeTypes" - @usableFromInline static let min: JSString = "min" - @usableFromInline static let minLength: JSString = "minLength" - @usableFromInline static let miterLimit: JSString = "miterLimit" - @usableFromInline static let mode: JSString = "mode" - @usableFromInline static let modifierAltGraph: JSString = "modifierAltGraph" - @usableFromInline static let modifierCapsLock: JSString = "modifierCapsLock" - @usableFromInline static let modifierFn: JSString = "modifierFn" - @usableFromInline static let modifierFnLock: JSString = "modifierFnLock" - @usableFromInline static let modifierHyper: JSString = "modifierHyper" - @usableFromInline static let modifierNumLock: JSString = "modifierNumLock" - @usableFromInline static let modifierScrollLock: JSString = "modifierScrollLock" - @usableFromInline static let modifierSuper: JSString = "modifierSuper" - @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" - @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" - @usableFromInline static let moveTo: JSString = "moveTo" - @usableFromInline static let multiple: JSString = "multiple" - @usableFromInline static let multiply: JSString = "multiply" - @usableFromInline static let multiplySelf: JSString = "multiplySelf" - @usableFromInline static let muted: JSString = "muted" - @usableFromInline static let name: JSString = "name" - @usableFromInline static let namedItem: JSString = "namedItem" - @usableFromInline static let namespaceURI: JSString = "namespaceURI" - @usableFromInline static let naturalHeight: JSString = "naturalHeight" - @usableFromInline static let naturalWidth: JSString = "naturalWidth" - @usableFromInline static let navigationPreload: JSString = "navigationPreload" - @usableFromInline static let navigator: JSString = "navigator" - @usableFromInline static let networkState: JSString = "networkState" - @usableFromInline static let newURL: JSString = "newURL" - @usableFromInline static let newValue: JSString = "newValue" - @usableFromInline static let nextElementSibling: JSString = "nextElementSibling" - @usableFromInline static let nextNode: JSString = "nextNode" - @usableFromInline static let nextSibling: JSString = "nextSibling" - @usableFromInline static let noHref: JSString = "noHref" - @usableFromInline static let noModule: JSString = "noModule" - @usableFromInline static let noResize: JSString = "noResize" - @usableFromInline static let noShade: JSString = "noShade" - @usableFromInline static let noValidate: JSString = "noValidate" - @usableFromInline static let noWrap: JSString = "noWrap" - @usableFromInline static let nodeName: JSString = "nodeName" - @usableFromInline static let nodeType: JSString = "nodeType" - @usableFromInline static let nodeValue: JSString = "nodeValue" - @usableFromInline static let nonce: JSString = "nonce" - @usableFromInline static let normalize: JSString = "normalize" - @usableFromInline static let now: JSString = "now" - @usableFromInline static let numberValue: JSString = "numberValue" - @usableFromInline static let observe: JSString = "observe" - @usableFromInline static let offset: JSString = "offset" - @usableFromInline static let ok: JSString = "ok" - @usableFromInline static let oldURL: JSString = "oldURL" - @usableFromInline static let oldValue: JSString = "oldValue" - @usableFromInline static let onLine: JSString = "onLine" - @usableFromInline static let onabort: JSString = "onabort" - @usableFromInline static let onaddtrack: JSString = "onaddtrack" - @usableFromInline static let onafterprint: JSString = "onafterprint" - @usableFromInline static let onauxclick: JSString = "onauxclick" - @usableFromInline static let onbeforeprint: JSString = "onbeforeprint" - @usableFromInline static let onbeforeunload: JSString = "onbeforeunload" - @usableFromInline static let onblur: JSString = "onblur" - @usableFromInline static let oncancel: JSString = "oncancel" - @usableFromInline static let oncanplay: JSString = "oncanplay" - @usableFromInline static let oncanplaythrough: JSString = "oncanplaythrough" - @usableFromInline static let once: JSString = "once" - @usableFromInline static let onchange: JSString = "onchange" - @usableFromInline static let onclick: JSString = "onclick" - @usableFromInline static let onclose: JSString = "onclose" - @usableFromInline static let oncontextlost: JSString = "oncontextlost" - @usableFromInline static let oncontextmenu: JSString = "oncontextmenu" - @usableFromInline static let oncontextrestored: JSString = "oncontextrestored" - @usableFromInline static let oncontrollerchange: JSString = "oncontrollerchange" - @usableFromInline static let oncopy: JSString = "oncopy" - @usableFromInline static let oncuechange: JSString = "oncuechange" - @usableFromInline static let oncut: JSString = "oncut" - @usableFromInline static let ondblclick: JSString = "ondblclick" - @usableFromInline static let ondrag: JSString = "ondrag" - @usableFromInline static let ondragend: JSString = "ondragend" - @usableFromInline static let ondragenter: JSString = "ondragenter" - @usableFromInline static let ondragleave: JSString = "ondragleave" - @usableFromInline static let ondragover: JSString = "ondragover" - @usableFromInline static let ondragstart: JSString = "ondragstart" - @usableFromInline static let ondrop: JSString = "ondrop" - @usableFromInline static let ondurationchange: JSString = "ondurationchange" - @usableFromInline static let onemptied: JSString = "onemptied" - @usableFromInline static let onended: JSString = "onended" - @usableFromInline static let onenter: JSString = "onenter" - @usableFromInline static let onerror: JSString = "onerror" - @usableFromInline static let onexit: JSString = "onexit" - @usableFromInline static let onfinish: JSString = "onfinish" - @usableFromInline static let onfocus: JSString = "onfocus" - @usableFromInline static let onformdata: JSString = "onformdata" - @usableFromInline static let onhashchange: JSString = "onhashchange" - @usableFromInline static let oninput: JSString = "oninput" - @usableFromInline static let oninvalid: JSString = "oninvalid" - @usableFromInline static let onkeydown: JSString = "onkeydown" - @usableFromInline static let onkeypress: JSString = "onkeypress" - @usableFromInline static let onkeyup: JSString = "onkeyup" - @usableFromInline static let onlanguagechange: JSString = "onlanguagechange" - @usableFromInline static let onload: JSString = "onload" - @usableFromInline static let onloadeddata: JSString = "onloadeddata" - @usableFromInline static let onloadedmetadata: JSString = "onloadedmetadata" - @usableFromInline static let onloadend: JSString = "onloadend" - @usableFromInline static let onloadstart: JSString = "onloadstart" - @usableFromInline static let onmessage: JSString = "onmessage" - @usableFromInline static let onmessageerror: JSString = "onmessageerror" - @usableFromInline static let onmousedown: JSString = "onmousedown" - @usableFromInline static let onmouseenter: JSString = "onmouseenter" - @usableFromInline static let onmouseleave: JSString = "onmouseleave" - @usableFromInline static let onmousemove: JSString = "onmousemove" - @usableFromInline static let onmouseout: JSString = "onmouseout" - @usableFromInline static let onmouseover: JSString = "onmouseover" - @usableFromInline static let onmouseup: JSString = "onmouseup" - @usableFromInline static let onoffline: JSString = "onoffline" - @usableFromInline static let ononline: JSString = "ononline" - @usableFromInline static let onopen: JSString = "onopen" - @usableFromInline static let onpagehide: JSString = "onpagehide" - @usableFromInline static let onpageshow: JSString = "onpageshow" - @usableFromInline static let onpaste: JSString = "onpaste" - @usableFromInline static let onpause: JSString = "onpause" - @usableFromInline static let onplay: JSString = "onplay" - @usableFromInline static let onplaying: JSString = "onplaying" - @usableFromInline static let onpopstate: JSString = "onpopstate" - @usableFromInline static let onprogress: JSString = "onprogress" - @usableFromInline static let onratechange: JSString = "onratechange" - @usableFromInline static let onreadystatechange: JSString = "onreadystatechange" - @usableFromInline static let onrejectionhandled: JSString = "onrejectionhandled" - @usableFromInline static let onremove: JSString = "onremove" - @usableFromInline static let onremovetrack: JSString = "onremovetrack" - @usableFromInline static let onreset: JSString = "onreset" - @usableFromInline static let onresize: JSString = "onresize" - @usableFromInline static let onscroll: JSString = "onscroll" - @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" - @usableFromInline static let onseeked: JSString = "onseeked" - @usableFromInline static let onseeking: JSString = "onseeking" - @usableFromInline static let onselect: JSString = "onselect" - @usableFromInline static let onslotchange: JSString = "onslotchange" - @usableFromInline static let onstalled: JSString = "onstalled" - @usableFromInline static let onstatechange: JSString = "onstatechange" - @usableFromInline static let onstorage: JSString = "onstorage" - @usableFromInline static let onsubmit: JSString = "onsubmit" - @usableFromInline static let onsuspend: JSString = "onsuspend" - @usableFromInline static let ontimeout: JSString = "ontimeout" - @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" - @usableFromInline static let ontoggle: JSString = "ontoggle" - @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" - @usableFromInline static let onunload: JSString = "onunload" - @usableFromInline static let onupdatefound: JSString = "onupdatefound" - @usableFromInline static let onvisibilitychange: JSString = "onvisibilitychange" - @usableFromInline static let onvolumechange: JSString = "onvolumechange" - @usableFromInline static let onwaiting: JSString = "onwaiting" - @usableFromInline static let onwebkitanimationend: JSString = "onwebkitanimationend" - @usableFromInline static let onwebkitanimationiteration: JSString = "onwebkitanimationiteration" - @usableFromInline static let onwebkitanimationstart: JSString = "onwebkitanimationstart" - @usableFromInline static let onwebkittransitionend: JSString = "onwebkittransitionend" - @usableFromInline static let onwheel: JSString = "onwheel" - @usableFromInline static let open: JSString = "open" - @usableFromInline static let opener: JSString = "opener" - @usableFromInline static let optimum: JSString = "optimum" - @usableFromInline static let options: JSString = "options" - @usableFromInline static let origin: JSString = "origin" - @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" - @usableFromInline static let originTime: JSString = "originTime" - @usableFromInline static let oscpu: JSString = "oscpu" - @usableFromInline static let outerText: JSString = "outerText" - @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" - @usableFromInline static let ownerDocument: JSString = "ownerDocument" - @usableFromInline static let ownerElement: JSString = "ownerElement" - @usableFromInline static let p1: JSString = "p1" - @usableFromInline static let p2: JSString = "p2" - @usableFromInline static let p3: JSString = "p3" - @usableFromInline static let p4: JSString = "p4" - @usableFromInline static let parent: JSString = "parent" - @usableFromInline static let parentElement: JSString = "parentElement" - @usableFromInline static let parentNode: JSString = "parentNode" - @usableFromInline static let parseFromString: JSString = "parseFromString" - @usableFromInline static let passive: JSString = "passive" - @usableFromInline static let password: JSString = "password" - @usableFromInline static let pathname: JSString = "pathname" - @usableFromInline static let pattern: JSString = "pattern" - @usableFromInline static let patternMismatch: JSString = "patternMismatch" - @usableFromInline static let pause: JSString = "pause" - @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" - @usableFromInline static let paused: JSString = "paused" - @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" - @usableFromInline static let pending: JSString = "pending" - @usableFromInline static let performance: JSString = "performance" - @usableFromInline static let persist: JSString = "persist" - @usableFromInline static let persisted: JSString = "persisted" - @usableFromInline static let personalbar: JSString = "personalbar" - @usableFromInline static let phase: JSString = "phase" - @usableFromInline static let ping: JSString = "ping" - @usableFromInline static let pipeThrough: JSString = "pipeThrough" - @usableFromInline static let pipeTo: JSString = "pipeTo" - @usableFromInline static let placeholder: JSString = "placeholder" - @usableFromInline static let platform: JSString = "platform" - @usableFromInline static let play: JSString = "play" - @usableFromInline static let playState: JSString = "playState" - @usableFromInline static let playbackRate: JSString = "playbackRate" - @usableFromInline static let played: JSString = "played" - @usableFromInline static let playsInline: JSString = "playsInline" - @usableFromInline static let plugins: JSString = "plugins" - @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" - @usableFromInline static let port: JSString = "port" - @usableFromInline static let port1: JSString = "port1" - @usableFromInline static let port2: JSString = "port2" - @usableFromInline static let ports: JSString = "ports" - @usableFromInline static let position: JSString = "position" - @usableFromInline static let postMessage: JSString = "postMessage" - @usableFromInline static let poster: JSString = "poster" - @usableFromInline static let preMultiplySelf: JSString = "preMultiplySelf" - @usableFromInline static let prefix: JSString = "prefix" - @usableFromInline static let preload: JSString = "preload" - @usableFromInline static let preloadResponse: JSString = "preloadResponse" - @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" - @usableFromInline static let prepend: JSString = "prepend" - @usableFromInline static let preservesPitch: JSString = "preservesPitch" - @usableFromInline static let prevValue: JSString = "prevValue" - @usableFromInline static let preventAbort: JSString = "preventAbort" - @usableFromInline static let preventCancel: JSString = "preventCancel" - @usableFromInline static let preventClose: JSString = "preventClose" - @usableFromInline static let preventDefault: JSString = "preventDefault" - @usableFromInline static let preventScroll: JSString = "preventScroll" - @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" - @usableFromInline static let previousNode: JSString = "previousNode" - @usableFromInline static let previousSibling: JSString = "previousSibling" - @usableFromInline static let print: JSString = "print" - @usableFromInline static let product: JSString = "product" - @usableFromInline static let productSub: JSString = "productSub" - @usableFromInline static let progress: JSString = "progress" - @usableFromInline static let promise: JSString = "promise" - @usableFromInline static let prompt: JSString = "prompt" - @usableFromInline static let `protocol`: JSString = "protocol" - @usableFromInline static let pseudoElement: JSString = "pseudoElement" - @usableFromInline static let publicId: JSString = "publicId" - @usableFromInline static let pull: JSString = "pull" - @usableFromInline static let pushState: JSString = "pushState" - @usableFromInline static let put: JSString = "put" - @usableFromInline static let putImageData: JSString = "putImageData" - @usableFromInline static let quadraticCurveTo: JSString = "quadraticCurveTo" - @usableFromInline static let quality: JSString = "quality" - @usableFromInline static let queryCommandEnabled: JSString = "queryCommandEnabled" - @usableFromInline static let queryCommandIndeterm: JSString = "queryCommandIndeterm" - @usableFromInline static let queryCommandState: JSString = "queryCommandState" - @usableFromInline static let queryCommandSupported: JSString = "queryCommandSupported" - @usableFromInline static let queryCommandValue: JSString = "queryCommandValue" - @usableFromInline static let querySelector: JSString = "querySelector" - @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" - @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" - @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" - @usableFromInline static let read: JSString = "read" - @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" - @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" - @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" - @usableFromInline static let readAsText: JSString = "readAsText" - @usableFromInline static let readOnly: JSString = "readOnly" - @usableFromInline static let readable: JSString = "readable" - @usableFromInline static let readableType: JSString = "readableType" - @usableFromInline static let ready: JSString = "ready" - @usableFromInline static let readyState: JSString = "readyState" - @usableFromInline static let reason: JSString = "reason" - @usableFromInline static let rect: JSString = "rect" - @usableFromInline static let redirect: JSString = "redirect" - @usableFromInline static let redirected: JSString = "redirected" - @usableFromInline static let referenceNode: JSString = "referenceNode" - @usableFromInline static let referrer: JSString = "referrer" - @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" - @usableFromInline static let refresh: JSString = "refresh" - @usableFromInline static let register: JSString = "register" - @usableFromInline static let registerProtocolHandler: JSString = "registerProtocolHandler" - @usableFromInline static let rel: JSString = "rel" - @usableFromInline static let relList: JSString = "relList" - @usableFromInline static let relatedNode: JSString = "relatedNode" - @usableFromInline static let relatedTarget: JSString = "relatedTarget" - @usableFromInline static let releaseEvents: JSString = "releaseEvents" - @usableFromInline static let releaseLock: JSString = "releaseLock" - @usableFromInline static let reload: JSString = "reload" - @usableFromInline static let remove: JSString = "remove" - @usableFromInline static let removeAttribute: JSString = "removeAttribute" - @usableFromInline static let removeAttributeNS: JSString = "removeAttributeNS" - @usableFromInline static let removeAttributeNode: JSString = "removeAttributeNode" - @usableFromInline static let removeChild: JSString = "removeChild" - @usableFromInline static let removeCue: JSString = "removeCue" - @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" - @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" - @usableFromInline static let removeParameter: JSString = "removeParameter" - @usableFromInline static let removedNodes: JSString = "removedNodes" - @usableFromInline static let `repeat`: JSString = "repeat" - @usableFromInline static let replace: JSString = "replace" - @usableFromInline static let replaceChild: JSString = "replaceChild" - @usableFromInline static let replaceChildren: JSString = "replaceChildren" - @usableFromInline static let replaceData: JSString = "replaceData" - @usableFromInline static let replaceState: JSString = "replaceState" - @usableFromInline static let replaceWith: JSString = "replaceWith" - @usableFromInline static let replacesClientId: JSString = "replacesClientId" - @usableFromInline static let reportError: JSString = "reportError" - @usableFromInline static let reportValidity: JSString = "reportValidity" - @usableFromInline static let request: JSString = "request" - @usableFromInline static let requestSubmit: JSString = "requestSubmit" - @usableFromInline static let required: JSString = "required" - @usableFromInline static let reset: JSString = "reset" - @usableFromInline static let resetTransform: JSString = "resetTransform" - @usableFromInline static let resizeHeight: JSString = "resizeHeight" - @usableFromInline static let resizeQuality: JSString = "resizeQuality" - @usableFromInline static let resizeWidth: JSString = "resizeWidth" - @usableFromInline static let respond: JSString = "respond" - @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" - @usableFromInline static let response: JSString = "response" - @usableFromInline static let responseText: JSString = "responseText" - @usableFromInline static let responseType: JSString = "responseType" - @usableFromInline static let responseURL: JSString = "responseURL" - @usableFromInline static let responseXML: JSString = "responseXML" - @usableFromInline static let restore: JSString = "restore" - @usableFromInline static let result: JSString = "result" - @usableFromInline static let resultType: JSString = "resultType" - @usableFromInline static let resultingClientId: JSString = "resultingClientId" - @usableFromInline static let returnValue: JSString = "returnValue" - @usableFromInline static let rev: JSString = "rev" - @usableFromInline static let reverse: JSString = "reverse" - @usableFromInline static let reversed: JSString = "reversed" - @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" - @usableFromInline static let right: JSString = "right" - @usableFromInline static let role: JSString = "role" - @usableFromInline static let root: JSString = "root" - @usableFromInline static let rotate: JSString = "rotate" - @usableFromInline static let rotateAxisAngle: JSString = "rotateAxisAngle" - @usableFromInline static let rotateAxisAngleSelf: JSString = "rotateAxisAngleSelf" - @usableFromInline static let rotateFromVector: JSString = "rotateFromVector" - @usableFromInline static let rotateFromVectorSelf: JSString = "rotateFromVectorSelf" - @usableFromInline static let rotateSelf: JSString = "rotateSelf" - @usableFromInline static let roundRect: JSString = "roundRect" - @usableFromInline static let rowIndex: JSString = "rowIndex" - @usableFromInline static let rowSpan: JSString = "rowSpan" - @usableFromInline static let rows: JSString = "rows" - @usableFromInline static let rules: JSString = "rules" - @usableFromInline static let sandbox: JSString = "sandbox" - @usableFromInline static let save: JSString = "save" - @usableFromInline static let scale: JSString = "scale" - @usableFromInline static let scale3d: JSString = "scale3d" - @usableFromInline static let scale3dSelf: JSString = "scale3dSelf" - @usableFromInline static let scaleNonUniform: JSString = "scaleNonUniform" - @usableFromInline static let scaleSelf: JSString = "scaleSelf" - @usableFromInline static let scheme: JSString = "scheme" - @usableFromInline static let scope: JSString = "scope" - @usableFromInline static let screenX: JSString = "screenX" - @usableFromInline static let screenY: JSString = "screenY" - @usableFromInline static let scriptURL: JSString = "scriptURL" - @usableFromInline static let scripts: JSString = "scripts" - @usableFromInline static let scrollAmount: JSString = "scrollAmount" - @usableFromInline static let scrollDelay: JSString = "scrollDelay" - @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" - @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" - @usableFromInline static let scrollbars: JSString = "scrollbars" - @usableFromInline static let scrolling: JSString = "scrolling" - @usableFromInline static let search: JSString = "search" - @usableFromInline static let searchParams: JSString = "searchParams" - @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" - @usableFromInline static let seekable: JSString = "seekable" - @usableFromInline static let seeking: JSString = "seeking" - @usableFromInline static let select: JSString = "select" - @usableFromInline static let selectNode: JSString = "selectNode" - @usableFromInline static let selectNodeContents: JSString = "selectNodeContents" - @usableFromInline static let selected: JSString = "selected" - @usableFromInline static let selectedIndex: JSString = "selectedIndex" - @usableFromInline static let selectedOptions: JSString = "selectedOptions" - @usableFromInline static let selectionDirection: JSString = "selectionDirection" - @usableFromInline static let selectionEnd: JSString = "selectionEnd" - @usableFromInline static let selectionStart: JSString = "selectionStart" - @usableFromInline static let send: JSString = "send" - @usableFromInline static let serviceWorker: JSString = "serviceWorker" - @usableFromInline static let sessionStorage: JSString = "sessionStorage" - @usableFromInline static let set: JSString = "set" - @usableFromInline static let setAttribute: JSString = "setAttribute" - @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" - @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" - @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" - @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" - @usableFromInline static let setData: JSString = "setData" - @usableFromInline static let setDragImage: JSString = "setDragImage" - @usableFromInline static let setEnd: JSString = "setEnd" - @usableFromInline static let setEndAfter: JSString = "setEndAfter" - @usableFromInline static let setEndBefore: JSString = "setEndBefore" - @usableFromInline static let setFormValue: JSString = "setFormValue" - @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" - @usableFromInline static let setInterval: JSString = "setInterval" - @usableFromInline static let setKeyframes: JSString = "setKeyframes" - @usableFromInline static let setLineDash: JSString = "setLineDash" - @usableFromInline static let setMatrixValue: JSString = "setMatrixValue" - @usableFromInline static let setNamedItem: JSString = "setNamedItem" - @usableFromInline static let setNamedItemNS: JSString = "setNamedItemNS" - @usableFromInline static let setParameter: JSString = "setParameter" - @usableFromInline static let setRangeText: JSString = "setRangeText" - @usableFromInline static let setRequestHeader: JSString = "setRequestHeader" - @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" - @usableFromInline static let setStart: JSString = "setStart" - @usableFromInline static let setStartAfter: JSString = "setStartAfter" - @usableFromInline static let setStartBefore: JSString = "setStartBefore" - @usableFromInline static let setTimeout: JSString = "setTimeout" - @usableFromInline static let setTransform: JSString = "setTransform" - @usableFromInline static let setValidity: JSString = "setValidity" - @usableFromInline static let shadowBlur: JSString = "shadowBlur" - @usableFromInline static let shadowColor: JSString = "shadowColor" - @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" - @usableFromInline static let shadowOffsetY: JSString = "shadowOffsetY" - @usableFromInline static let shadowRoot: JSString = "shadowRoot" - @usableFromInline static let shape: JSString = "shape" - @usableFromInline static let shiftKey: JSString = "shiftKey" - @usableFromInline static let show: JSString = "show" - @usableFromInline static let showModal: JSString = "showModal" - @usableFromInline static let showPicker: JSString = "showPicker" - @usableFromInline static let signal: JSString = "signal" - @usableFromInline static let singleNodeValue: JSString = "singleNodeValue" - @usableFromInline static let size: JSString = "size" - @usableFromInline static let sizes: JSString = "sizes" - @usableFromInline static let skewX: JSString = "skewX" - @usableFromInline static let skewXSelf: JSString = "skewXSelf" - @usableFromInline static let skewY: JSString = "skewY" - @usableFromInline static let skewYSelf: JSString = "skewYSelf" - @usableFromInline static let slice: JSString = "slice" - @usableFromInline static let slot: JSString = "slot" - @usableFromInline static let slotAssignment: JSString = "slotAssignment" - @usableFromInline static let snapshotItem: JSString = "snapshotItem" - @usableFromInline static let snapshotLength: JSString = "snapshotLength" - @usableFromInline static let sort: JSString = "sort" - @usableFromInline static let source: JSString = "source" - @usableFromInline static let span: JSString = "span" - @usableFromInline static let specified: JSString = "specified" - @usableFromInline static let spellcheck: JSString = "spellcheck" - @usableFromInline static let splitText: JSString = "splitText" - @usableFromInline static let src: JSString = "src" - @usableFromInline static let srcElement: JSString = "srcElement" - @usableFromInline static let srcdoc: JSString = "srcdoc" - @usableFromInline static let srclang: JSString = "srclang" - @usableFromInline static let srcset: JSString = "srcset" - @usableFromInline static let standby: JSString = "standby" - @usableFromInline static let start: JSString = "start" - @usableFromInline static let startContainer: JSString = "startContainer" - @usableFromInline static let startMessages: JSString = "startMessages" - @usableFromInline static let startOffset: JSString = "startOffset" - @usableFromInline static let startTime: JSString = "startTime" - @usableFromInline static let state: JSString = "state" - @usableFromInline static let status: JSString = "status" - @usableFromInline static let statusText: JSString = "statusText" - @usableFromInline static let statusbar: JSString = "statusbar" - @usableFromInline static let step: JSString = "step" - @usableFromInline static let stepDown: JSString = "stepDown" - @usableFromInline static let stepMismatch: JSString = "stepMismatch" - @usableFromInline static let stepUp: JSString = "stepUp" - @usableFromInline static let stop: JSString = "stop" - @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" - @usableFromInline static let stopPropagation: JSString = "stopPropagation" - @usableFromInline static let storageArea: JSString = "storageArea" - @usableFromInline static let stringValue: JSString = "stringValue" - @usableFromInline static let stroke: JSString = "stroke" - @usableFromInline static let strokeRect: JSString = "strokeRect" - @usableFromInline static let strokeStyle: JSString = "strokeStyle" - @usableFromInline static let strokeText: JSString = "strokeText" - @usableFromInline static let structuredClone: JSString = "structuredClone" - @usableFromInline static let submit: JSString = "submit" - @usableFromInline static let submitter: JSString = "submitter" - @usableFromInline static let substringData: JSString = "substringData" - @usableFromInline static let subtree: JSString = "subtree" - @usableFromInline static let suffixes: JSString = "suffixes" - @usableFromInline static let summary: JSString = "summary" - @usableFromInline static let supports: JSString = "supports" - @usableFromInline static let surroundContents: JSString = "surroundContents" - @usableFromInline static let systemId: JSString = "systemId" - @usableFromInline static let tBodies: JSString = "tBodies" - @usableFromInline static let tFoot: JSString = "tFoot" - @usableFromInline static let tHead: JSString = "tHead" - @usableFromInline static let tabIndex: JSString = "tabIndex" - @usableFromInline static let table: JSString = "table" - @usableFromInline static let tagName: JSString = "tagName" - @usableFromInline static let taintEnabled: JSString = "taintEnabled" - @usableFromInline static let takeRecords: JSString = "takeRecords" - @usableFromInline static let target: JSString = "target" - @usableFromInline static let targetOrigin: JSString = "targetOrigin" - @usableFromInline static let tee: JSString = "tee" - @usableFromInline static let terminate: JSString = "terminate" - @usableFromInline static let text: JSString = "text" - @usableFromInline static let textAlign: JSString = "textAlign" - @usableFromInline static let textBaseline: JSString = "textBaseline" - @usableFromInline static let textContent: JSString = "textContent" - @usableFromInline static let textLength: JSString = "textLength" - @usableFromInline static let textRendering: JSString = "textRendering" - @usableFromInline static let textTracks: JSString = "textTracks" - @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" - @usableFromInline static let time: JSString = "time" - @usableFromInline static let timeEnd: JSString = "timeEnd" - @usableFromInline static let timeLog: JSString = "timeLog" - @usableFromInline static let timeOrigin: JSString = "timeOrigin" - @usableFromInline static let timeStamp: JSString = "timeStamp" - @usableFromInline static let timeline: JSString = "timeline" - @usableFromInline static let timeout: JSString = "timeout" - @usableFromInline static let title: JSString = "title" - @usableFromInline static let toDataURL: JSString = "toDataURL" - @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" - @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" - @usableFromInline static let toJSON: JSString = "toJSON" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let toggle: JSString = "toggle" - @usableFromInline static let toggleAttribute: JSString = "toggleAttribute" - @usableFromInline static let tooLong: JSString = "tooLong" - @usableFromInline static let tooShort: JSString = "tooShort" - @usableFromInline static let toolbar: JSString = "toolbar" - @usableFromInline static let top: JSString = "top" - @usableFromInline static let total: JSString = "total" - @usableFromInline static let trace: JSString = "trace" - @usableFromInline static let track: JSString = "track" - @usableFromInline static let transfer: JSString = "transfer" - @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" - @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" - @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" - @usableFromInline static let transform: JSString = "transform" - @usableFromInline static let transformPoint: JSString = "transformPoint" - @usableFromInline static let transformToDocument: JSString = "transformToDocument" - @usableFromInline static let transformToFragment: JSString = "transformToFragment" - @usableFromInline static let translate: JSString = "translate" - @usableFromInline static let translateSelf: JSString = "translateSelf" - @usableFromInline static let trueSpeed: JSString = "trueSpeed" - @usableFromInline static let type: JSString = "type" - @usableFromInline static let typeMismatch: JSString = "typeMismatch" - @usableFromInline static let types: JSString = "types" - @usableFromInline static let unregister: JSString = "unregister" - @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" - @usableFromInline static let update: JSString = "update" - @usableFromInline static let updatePlaybackRate: JSString = "updatePlaybackRate" - @usableFromInline static let updateTiming: JSString = "updateTiming" - @usableFromInline static let updateViaCache: JSString = "updateViaCache" - @usableFromInline static let upgrade: JSString = "upgrade" - @usableFromInline static let upload: JSString = "upload" - @usableFromInline static let url: JSString = "url" - @usableFromInline static let useMap: JSString = "useMap" - @usableFromInline static let userAgent: JSString = "userAgent" - @usableFromInline static let username: JSString = "username" - @usableFromInline static let vAlign: JSString = "vAlign" - @usableFromInline static let vLink: JSString = "vLink" - @usableFromInline static let valid: JSString = "valid" - @usableFromInline static let validationMessage: JSString = "validationMessage" - @usableFromInline static let validity: JSString = "validity" - @usableFromInline static let value: JSString = "value" - @usableFromInline static let valueAsDate: JSString = "valueAsDate" - @usableFromInline static let valueAsNumber: JSString = "valueAsNumber" - @usableFromInline static let valueMissing: JSString = "valueMissing" - @usableFromInline static let valueType: JSString = "valueType" - @usableFromInline static let vendor: JSString = "vendor" - @usableFromInline static let vendorSub: JSString = "vendorSub" - @usableFromInline static let version: JSString = "version" - @usableFromInline static let videoHeight: JSString = "videoHeight" - @usableFromInline static let videoTracks: JSString = "videoTracks" - @usableFromInline static let videoWidth: JSString = "videoWidth" - @usableFromInline static let view: JSString = "view" - @usableFromInline static let visibilityState: JSString = "visibilityState" - @usableFromInline static let visible: JSString = "visible" - @usableFromInline static let vlinkColor: JSString = "vlinkColor" - @usableFromInline static let volume: JSString = "volume" - @usableFromInline static let vspace: JSString = "vspace" - @usableFromInline static let w: JSString = "w" - @usableFromInline static let waiting: JSString = "waiting" - @usableFromInline static let warn: JSString = "warn" - @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" - @usableFromInline static let whatToShow: JSString = "whatToShow" - @usableFromInline static let whenDefined: JSString = "whenDefined" - @usableFromInline static let which: JSString = "which" - @usableFromInline static let wholeText: JSString = "wholeText" - @usableFromInline static let width: JSString = "width" - @usableFromInline static let willReadFrequently: JSString = "willReadFrequently" - @usableFromInline static let willValidate: JSString = "willValidate" - @usableFromInline static let window: JSString = "window" - @usableFromInline static let withCredentials: JSString = "withCredentials" - @usableFromInline static let wordSpacing: JSString = "wordSpacing" - @usableFromInline static let wrap: JSString = "wrap" - @usableFromInline static let writable: JSString = "writable" - @usableFromInline static let writableType: JSString = "writableType" - @usableFromInline static let write: JSString = "write" - @usableFromInline static let writeln: JSString = "writeln" - @usableFromInline static let x: JSString = "x" - @usableFromInline static let y: JSString = "y" - @usableFromInline static let z: JSString = "z" -} diff --git a/Sources/DOMKit/WebIDL/StructuredSerializeOptions.swift b/Sources/DOMKit/WebIDL/StructuredSerializeOptions.swift deleted file mode 100644 index 67639f2d..00000000 --- a/Sources/DOMKit/WebIDL/StructuredSerializeOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class StructuredSerializeOptions: BridgedDictionary { - public convenience init(transfer: [JSObject]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.transfer] = transfer.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var transfer: [JSObject] -} diff --git a/Sources/DOMKit/WebIDL/SubmitEvent.swift b/Sources/DOMKit/WebIDL/SubmitEvent.swift deleted file mode 100644 index 7af0c6ef..00000000 --- a/Sources/DOMKit/WebIDL/SubmitEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class SubmitEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SubmitEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _submitter = ReadonlyAttribute(jsObject: jsObject, name: Strings.submitter) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: SubmitEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var submitter: HTMLElement? -} diff --git a/Sources/DOMKit/WebIDL/SubmitEventInit.swift b/Sources/DOMKit/WebIDL/SubmitEventInit.swift deleted file mode 100644 index 7913a9c4..00000000 --- a/Sources/DOMKit/WebIDL/SubmitEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class SubmitEventInit: BridgedDictionary { - public convenience init(submitter: HTMLElement?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.submitter] = submitter.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _submitter = ReadWriteAttribute(jsObject: object, name: Strings.submitter) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var submitter: HTMLElement? -} diff --git a/Sources/DOMKit/WebIDL/Text.swift b/Sources/DOMKit/WebIDL/Text.swift deleted file mode 100644 index 63922264..00000000 --- a/Sources/DOMKit/WebIDL/Text.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Text: CharacterData, Slottable { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _wholeText = ReadonlyAttribute(jsObject: jsObject, name: Strings.wholeText) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) - } - - @inlinable public func splitText(offset: UInt32) -> Self { - let this = jsObject - return this[Strings.splitText].function!(this: this, arguments: [offset.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var wholeText: String -} diff --git a/Sources/DOMKit/WebIDL/TextMetrics.swift b/Sources/DOMKit/WebIDL/TextMetrics.swift deleted file mode 100644 index 8d61be6e..00000000 --- a/Sources/DOMKit/WebIDL/TextMetrics.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TextMetrics: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextMetrics].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _actualBoundingBoxLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxLeft) - _actualBoundingBoxRight = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxRight) - _fontBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxAscent) - _fontBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxDescent) - _actualBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxAscent) - _actualBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxDescent) - _emHeightAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightAscent) - _emHeightDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightDescent) - _hangingBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.hangingBaseline) - _alphabeticBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.alphabeticBaseline) - _ideographicBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.ideographicBaseline) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var width: Double - - @ReadonlyAttribute - public var actualBoundingBoxLeft: Double - - @ReadonlyAttribute - public var actualBoundingBoxRight: Double - - @ReadonlyAttribute - public var fontBoundingBoxAscent: Double - - @ReadonlyAttribute - public var fontBoundingBoxDescent: Double - - @ReadonlyAttribute - public var actualBoundingBoxAscent: Double - - @ReadonlyAttribute - public var actualBoundingBoxDescent: Double - - @ReadonlyAttribute - public var emHeightAscent: Double - - @ReadonlyAttribute - public var emHeightDescent: Double - - @ReadonlyAttribute - public var hangingBaseline: Double - - @ReadonlyAttribute - public var alphabeticBaseline: Double - - @ReadonlyAttribute - public var ideographicBaseline: Double -} diff --git a/Sources/DOMKit/WebIDL/TextTrack.swift b/Sources/DOMKit/WebIDL/TextTrack.swift deleted file mode 100644 index 4de86043..00000000 --- a/Sources/DOMKit/WebIDL/TextTrack.swift +++ /dev/null @@ -1,58 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TextTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _inBandMetadataTrackDispatchType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inBandMetadataTrackDispatchType) - _mode = ReadWriteAttribute(jsObject: jsObject, name: Strings.mode) - _cues = ReadonlyAttribute(jsObject: jsObject, name: Strings.cues) - _activeCues = ReadonlyAttribute(jsObject: jsObject, name: Strings.activeCues) - _oncuechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncuechange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var kind: TextTrackKind - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var inBandMetadataTrackDispatchType: String - - @ReadWriteAttribute - public var mode: TextTrackMode - - @ReadonlyAttribute - public var cues: TextTrackCueList? - - @ReadonlyAttribute - public var activeCues: TextTrackCueList? - - @inlinable public func addCue(cue: TextTrackCue) { - let this = jsObject - _ = this[Strings.addCue].function!(this: this, arguments: [cue.jsValue]) - } - - @inlinable public func removeCue(cue: TextTrackCue) { - let this = jsObject - _ = this[Strings.removeCue].function!(this: this, arguments: [cue.jsValue]) - } - - @ClosureAttribute1Optional - public var oncuechange: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/TextTrackCue.swift b/Sources/DOMKit/WebIDL/TextTrackCue.swift deleted file mode 100644 index 583035f1..00000000 --- a/Sources/DOMKit/WebIDL/TextTrackCue.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TextTrackCue: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCue].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) - _startTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.startTime) - _endTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.endTime) - _pauseOnExit = ReadWriteAttribute(jsObject: jsObject, name: Strings.pauseOnExit) - _onenter = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onenter) - _onexit = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onexit) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var track: TextTrack? - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var startTime: Double - - @ReadWriteAttribute - public var endTime: Double - - @ReadWriteAttribute - public var pauseOnExit: Bool - - @ClosureAttribute1Optional - public var onenter: EventHandler - - @ClosureAttribute1Optional - public var onexit: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/TextTrackCueList.swift b/Sources/DOMKit/WebIDL/TextTrackCueList.swift deleted file mode 100644 index 0c73392e..00000000 --- a/Sources/DOMKit/WebIDL/TextTrackCueList.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TextTrackCueList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCueList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> TextTrackCue { - jsObject[key].fromJSValue()! - } - - @inlinable public func getCueById(id: String) -> TextTrackCue? { - let this = jsObject - return this[Strings.getCueById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/TextTrackKind.swift b/Sources/DOMKit/WebIDL/TextTrackKind.swift deleted file mode 100644 index ac618d36..00000000 --- a/Sources/DOMKit/WebIDL/TextTrackKind.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum TextTrackKind: JSString, JSValueCompatible { - case subtitles = "subtitles" - case captions = "captions" - case descriptions = "descriptions" - case chapters = "chapters" - case metadata = "metadata" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/TextTrackList.swift b/Sources/DOMKit/WebIDL/TextTrackList.swift deleted file mode 100644 index fed8608c..00000000 --- a/Sources/DOMKit/WebIDL/TextTrackList.swift +++ /dev/null @@ -1,37 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TextTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> TextTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> TextTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/TextTrackMode.swift b/Sources/DOMKit/WebIDL/TextTrackMode.swift deleted file mode 100644 index e4ae982f..00000000 --- a/Sources/DOMKit/WebIDL/TextTrackMode.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum TextTrackMode: JSString, JSValueCompatible { - case disabled = "disabled" - case hidden = "hidden" - case showing = "showing" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/TimeRanges.swift b/Sources/DOMKit/WebIDL/TimeRanges.swift deleted file mode 100644 index 08e6948f..00000000 --- a/Sources/DOMKit/WebIDL/TimeRanges.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TimeRanges: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TimeRanges].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func start(index: UInt32) -> Double { - let this = jsObject - return this[Strings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } - - @inlinable public func end(index: UInt32) -> Double { - let this = jsObject - return this[Strings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/TimelinePhase.swift b/Sources/DOMKit/WebIDL/TimelinePhase.swift deleted file mode 100644 index 6c79111d..00000000 --- a/Sources/DOMKit/WebIDL/TimelinePhase.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum TimelinePhase: JSString, JSValueCompatible { - case inactive = "inactive" - case before = "before" - case active = "active" - case after = "after" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/TimerHandler.swift b/Sources/DOMKit/WebIDL/TimerHandler.swift deleted file mode 100644 index c4a63ae6..00000000 --- a/Sources/DOMKit/WebIDL/TimerHandler.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_TimerHandler: ConvertibleToJSValue {} -extension JSFunction: Any_TimerHandler {} -extension String: Any_TimerHandler {} - -public enum TimerHandler: JSValueCompatible, Any_TimerHandler { - case jsFunction(JSFunction) - case string(String) - - var jsFunction: JSFunction? { - switch self { - case let .jsFunction(jsFunction): return jsFunction - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let jsFunction: JSFunction = value.fromJSValue() { - return .jsFunction(jsFunction) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .jsFunction(jsFunction): - return jsFunction.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/TrackEvent.swift b/Sources/DOMKit/WebIDL/TrackEvent.swift deleted file mode 100644 index 9312c8ab..00000000 --- a/Sources/DOMKit/WebIDL/TrackEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TrackEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TrackEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? -} diff --git a/Sources/DOMKit/WebIDL/TrackEventInit.swift b/Sources/DOMKit/WebIDL/TrackEventInit.swift deleted file mode 100644 index a9485dd4..00000000 --- a/Sources/DOMKit/WebIDL/TrackEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TrackEventInit: BridgedDictionary { - public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.track] = track.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _track = ReadWriteAttribute(jsObject: object, name: Strings.track) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? -} diff --git a/Sources/DOMKit/WebIDL/TransformStream.swift b/Sources/DOMKit/WebIDL/TransformStream.swift deleted file mode 100644 index 8c846726..00000000 --- a/Sources/DOMKit/WebIDL/TransformStream.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TransformStream: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStream].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _readable = ReadonlyAttribute(jsObject: jsObject, name: Strings.readable) - _writable = ReadonlyAttribute(jsObject: jsObject, name: Strings.writable) - self.jsObject = jsObject - } - - @inlinable public convenience init(transformer: JSObject? = nil, writableStrategy: QueuingStrategy? = nil, readableStrategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [transformer?.jsValue ?? .undefined, writableStrategy?.jsValue ?? .undefined, readableStrategy?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var readable: ReadableStream - - @ReadonlyAttribute - public var writable: WritableStream -} diff --git a/Sources/DOMKit/WebIDL/TransformStreamDefaultController.swift b/Sources/DOMKit/WebIDL/TransformStreamDefaultController.swift deleted file mode 100644 index eb2e5927..00000000 --- a/Sources/DOMKit/WebIDL/TransformStreamDefaultController.swift +++ /dev/null @@ -1,33 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TransformStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStreamDefaultController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var desiredSize: Double? - - @inlinable public func enqueue(chunk: JSValue? = nil) { - let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) - } - - @inlinable public func error(reason: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) - } - - @inlinable public func terminate() { - let this = jsObject - _ = this[Strings.terminate].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/Transformer.swift b/Sources/DOMKit/WebIDL/Transformer.swift deleted file mode 100644 index d1a8bce6..00000000 --- a/Sources/DOMKit/WebIDL/Transformer.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Transformer: BridgedDictionary { - public convenience init(start: @escaping TransformerStartCallback, transform: @escaping TransformerTransformCallback, flush: @escaping TransformerFlushCallback, readableType: JSValue, writableType: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute2[Strings.transform, in: object] = transform - ClosureAttribute1[Strings.flush, in: object] = flush - object[Strings.readableType] = readableType.jsValue - object[Strings.writableType] = writableType.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _transform = ClosureAttribute2(jsObject: object, name: Strings.transform) - _flush = ClosureAttribute1(jsObject: object, name: Strings.flush) - _readableType = ReadWriteAttribute(jsObject: object, name: Strings.readableType) - _writableType = ReadWriteAttribute(jsObject: object, name: Strings.writableType) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1 - public var start: TransformerStartCallback - - @ClosureAttribute2 - public var transform: TransformerTransformCallback - - @ClosureAttribute1 - public var flush: TransformerFlushCallback - - @ReadWriteAttribute - public var readableType: JSValue - - @ReadWriteAttribute - public var writableType: JSValue -} diff --git a/Sources/DOMKit/WebIDL/TreeWalker.swift b/Sources/DOMKit/WebIDL/TreeWalker.swift deleted file mode 100644 index 541e1477..00000000 --- a/Sources/DOMKit/WebIDL/TreeWalker.swift +++ /dev/null @@ -1,63 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class TreeWalker: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TreeWalker].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) - _currentNode = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentNode) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var root: Node - - @ReadonlyAttribute - public var whatToShow: UInt32 - - // XXX: member 'filter' is ignored - - @ReadWriteAttribute - public var currentNode: Node - - @inlinable public func parentNode() -> Node? { - let this = jsObject - return this[Strings.parentNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func firstChild() -> Node? { - let this = jsObject - return this[Strings.firstChild].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func lastChild() -> Node? { - let this = jsObject - return this[Strings.lastChild].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousSibling() -> Node? { - let this = jsObject - return this[Strings.previousSibling].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func nextSibling() -> Node? { - let this = jsObject - return this[Strings.nextSibling].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/Typedefs.swift b/Sources/DOMKit/WebIDL/Typedefs.swift deleted file mode 100644 index ae245c46..00000000 --- a/Sources/DOMKit/WebIDL/Typedefs.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public typealias CanvasFilterInput = [String: JSValue] - -public typealias EventHandler = EventHandlerNonNull? -public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? -public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? - -public typealias DOMHighResTimeStamp = Double -public typealias EpochTimeStamp = UInt64 - -public typealias DOMTimeStamp = UInt64 - -public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void -public typealias BlobCallback = (Blob?) -> Void -public typealias FunctionStringCallback = (String) -> Void -public typealias EventHandlerNonNull = (Event) -> JSValue -public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue -public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? -public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void -public typealias VoidFunction = () -> Void -public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue -public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise -public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise -public typealias UnderlyingSinkStartCallback = (WritableStreamDefaultController) -> JSValue -public typealias UnderlyingSinkWriteCallback = (JSValue, WritableStreamDefaultController) -> JSPromise -public typealias UnderlyingSinkCloseCallback = () -> JSPromise -public typealias UnderlyingSinkAbortCallback = (JSValue) -> JSPromise -public typealias TransformerStartCallback = (TransformStreamDefaultController) -> JSValue -public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise -public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise -public typealias QueuingStrategySize = (JSValue) -> Double diff --git a/Sources/DOMKit/WebIDL/UIEvent.swift b/Sources/DOMKit/WebIDL/UIEvent.swift deleted file mode 100644 index 7cc090b2..00000000 --- a/Sources/DOMKit/WebIDL/UIEvent.swift +++ /dev/null @@ -1,33 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class UIEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) - _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) - _which = ReadonlyAttribute(jsObject: jsObject, name: Strings.which) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: UIEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var view: Window? - - @ReadonlyAttribute - public var detail: Int32 - - @inlinable public func initUIEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil) { - let this = jsObject - _ = this[Strings.initUIEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, detailArg?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var which: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/UIEventInit.swift b/Sources/DOMKit/WebIDL/UIEventInit.swift deleted file mode 100644 index f9b8d8fb..00000000 --- a/Sources/DOMKit/WebIDL/UIEventInit.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class UIEventInit: BridgedDictionary { - public convenience init(view: Window?, detail: Int32, which: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.view] = view.jsValue - object[Strings.detail] = detail.jsValue - object[Strings.which] = which.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _view = ReadWriteAttribute(jsObject: object, name: Strings.view) - _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) - _which = ReadWriteAttribute(jsObject: object, name: Strings.which) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var view: Window? - - @ReadWriteAttribute - public var detail: Int32 - - @ReadWriteAttribute - public var which: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/URL.swift b/Sources/DOMKit/WebIDL/URL.swift deleted file mode 100644 index 989d2811..00000000 --- a/Sources/DOMKit/WebIDL/URL.swift +++ /dev/null @@ -1,81 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class URL: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) - _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) - self.jsObject = jsObject - } - - @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { - let this = constructor - return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! - } - - @inlinable public static func revokeObjectURL(url: String) { - let this = constructor - _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public convenience init(url: String, base: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) - } - - @ReadWriteAttribute - public var href: String - - @ReadonlyAttribute - public var origin: String - - @ReadWriteAttribute - public var `protocol`: String - - @ReadWriteAttribute - public var username: String - - @ReadWriteAttribute - public var password: String - - @ReadWriteAttribute - public var host: String - - @ReadWriteAttribute - public var hostname: String - - @ReadWriteAttribute - public var port: String - - @ReadWriteAttribute - public var pathname: String - - @ReadWriteAttribute - public var search: String - - @ReadonlyAttribute - public var searchParams: URLSearchParams - - @ReadWriteAttribute - public var hash: String - - @inlinable public func toJSON() -> String { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/URLSearchParams.swift b/Sources/DOMKit/WebIDL/URLSearchParams.swift deleted file mode 100644 index 7d151f74..00000000 --- a/Sources/DOMKit/WebIDL/URLSearchParams.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class URLSearchParams: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(init: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAll(name: String) -> [String] { - let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func sort() { - let this = jsObject - _ = this[Strings.sort].function!(this: this, arguments: []) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/UnderlyingSink.swift b/Sources/DOMKit/WebIDL/UnderlyingSink.swift deleted file mode 100644 index e4f52ec2..00000000 --- a/Sources/DOMKit/WebIDL/UnderlyingSink.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class UnderlyingSink: BridgedDictionary { - public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute2[Strings.write, in: object] = write - ClosureAttribute0[Strings.close, in: object] = close - ClosureAttribute1[Strings.abort, in: object] = abort - object[Strings.type] = type.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _write = ClosureAttribute2(jsObject: object, name: Strings.write) - _close = ClosureAttribute0(jsObject: object, name: Strings.close) - _abort = ClosureAttribute1(jsObject: object, name: Strings.abort) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1 - public var start: UnderlyingSinkStartCallback - - @ClosureAttribute2 - public var write: UnderlyingSinkWriteCallback - - @ClosureAttribute0 - public var close: UnderlyingSinkCloseCallback - - @ClosureAttribute1 - public var abort: UnderlyingSinkAbortCallback - - @ReadWriteAttribute - public var type: JSValue -} diff --git a/Sources/DOMKit/WebIDL/UnderlyingSource.swift b/Sources/DOMKit/WebIDL/UnderlyingSource.swift deleted file mode 100644 index 65db6d2f..00000000 --- a/Sources/DOMKit/WebIDL/UnderlyingSource.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class UnderlyingSource: BridgedDictionary { - public convenience init(start: @escaping UnderlyingSourceStartCallback, pull: @escaping UnderlyingSourcePullCallback, cancel: @escaping UnderlyingSourceCancelCallback, type: ReadableStreamType, autoAllocateChunkSize: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute1[Strings.pull, in: object] = pull - ClosureAttribute1[Strings.cancel, in: object] = cancel - object[Strings.type] = type.jsValue - object[Strings.autoAllocateChunkSize] = autoAllocateChunkSize.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _pull = ClosureAttribute1(jsObject: object, name: Strings.pull) - _cancel = ClosureAttribute1(jsObject: object, name: Strings.cancel) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _autoAllocateChunkSize = ReadWriteAttribute(jsObject: object, name: Strings.autoAllocateChunkSize) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1 - public var start: UnderlyingSourceStartCallback - - @ClosureAttribute1 - public var pull: UnderlyingSourcePullCallback - - @ClosureAttribute1 - public var cancel: UnderlyingSourceCancelCallback - - @ReadWriteAttribute - public var type: ReadableStreamType - - @ReadWriteAttribute - public var autoAllocateChunkSize: UInt64 -} diff --git a/Sources/DOMKit/WebIDL/ValidityState.swift b/Sources/DOMKit/WebIDL/ValidityState.swift deleted file mode 100644 index 5b403383..00000000 --- a/Sources/DOMKit/WebIDL/ValidityState.swift +++ /dev/null @@ -1,58 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ValidityState: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ValidityState].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: Strings.valueMissing) - _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.typeMismatch) - _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.patternMismatch) - _tooLong = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooLong) - _tooShort = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooShort) - _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeUnderflow) - _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeOverflow) - _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.stepMismatch) - _badInput = ReadonlyAttribute(jsObject: jsObject, name: Strings.badInput) - _customError = ReadonlyAttribute(jsObject: jsObject, name: Strings.customError) - _valid = ReadonlyAttribute(jsObject: jsObject, name: Strings.valid) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var valueMissing: Bool - - @ReadonlyAttribute - public var typeMismatch: Bool - - @ReadonlyAttribute - public var patternMismatch: Bool - - @ReadonlyAttribute - public var tooLong: Bool - - @ReadonlyAttribute - public var tooShort: Bool - - @ReadonlyAttribute - public var rangeUnderflow: Bool - - @ReadonlyAttribute - public var rangeOverflow: Bool - - @ReadonlyAttribute - public var stepMismatch: Bool - - @ReadonlyAttribute - public var badInput: Bool - - @ReadonlyAttribute - public var customError: Bool - - @ReadonlyAttribute - public var valid: Bool -} diff --git a/Sources/DOMKit/WebIDL/ValidityStateFlags.swift b/Sources/DOMKit/WebIDL/ValidityStateFlags.swift deleted file mode 100644 index 4686cec3..00000000 --- a/Sources/DOMKit/WebIDL/ValidityStateFlags.swift +++ /dev/null @@ -1,65 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ValidityStateFlags: BridgedDictionary { - public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.valueMissing] = valueMissing.jsValue - object[Strings.typeMismatch] = typeMismatch.jsValue - object[Strings.patternMismatch] = patternMismatch.jsValue - object[Strings.tooLong] = tooLong.jsValue - object[Strings.tooShort] = tooShort.jsValue - object[Strings.rangeUnderflow] = rangeUnderflow.jsValue - object[Strings.rangeOverflow] = rangeOverflow.jsValue - object[Strings.stepMismatch] = stepMismatch.jsValue - object[Strings.badInput] = badInput.jsValue - object[Strings.customError] = customError.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _valueMissing = ReadWriteAttribute(jsObject: object, name: Strings.valueMissing) - _typeMismatch = ReadWriteAttribute(jsObject: object, name: Strings.typeMismatch) - _patternMismatch = ReadWriteAttribute(jsObject: object, name: Strings.patternMismatch) - _tooLong = ReadWriteAttribute(jsObject: object, name: Strings.tooLong) - _tooShort = ReadWriteAttribute(jsObject: object, name: Strings.tooShort) - _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeUnderflow) - _rangeOverflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeOverflow) - _stepMismatch = ReadWriteAttribute(jsObject: object, name: Strings.stepMismatch) - _badInput = ReadWriteAttribute(jsObject: object, name: Strings.badInput) - _customError = ReadWriteAttribute(jsObject: object, name: Strings.customError) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var valueMissing: Bool - - @ReadWriteAttribute - public var typeMismatch: Bool - - @ReadWriteAttribute - public var patternMismatch: Bool - - @ReadWriteAttribute - public var tooLong: Bool - - @ReadWriteAttribute - public var tooShort: Bool - - @ReadWriteAttribute - public var rangeUnderflow: Bool - - @ReadWriteAttribute - public var rangeOverflow: Bool - - @ReadWriteAttribute - public var stepMismatch: Bool - - @ReadWriteAttribute - public var badInput: Bool - - @ReadWriteAttribute - public var customError: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoTrack.swift b/Sources/DOMKit/WebIDL/VideoTrack.swift deleted file mode 100644 index 5177c9b5..00000000 --- a/Sources/DOMKit/WebIDL/VideoTrack.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var selected: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoTrackList.swift b/Sources/DOMKit/WebIDL/VideoTrackList.swift deleted file mode 100644 index 99ca81ae..00000000 --- a/Sources/DOMKit/WebIDL/VideoTrackList.swift +++ /dev/null @@ -1,41 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> VideoTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> VideoTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/WheelEvent.swift b/Sources/DOMKit/WebIDL/WheelEvent.swift deleted file mode 100644 index c43417b3..00000000 --- a/Sources/DOMKit/WebIDL/WheelEvent.swift +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WheelEvent: MouseEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _deltaX = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaX) - _deltaY = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaY) - _deltaZ = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaZ) - _deltaMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaMode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: WheelEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - public static let DOM_DELTA_PIXEL: UInt32 = 0x00 - - public static let DOM_DELTA_LINE: UInt32 = 0x01 - - public static let DOM_DELTA_PAGE: UInt32 = 0x02 - - @ReadonlyAttribute - public var deltaX: Double - - @ReadonlyAttribute - public var deltaY: Double - - @ReadonlyAttribute - public var deltaZ: Double - - @ReadonlyAttribute - public var deltaMode: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/WheelEventInit.swift b/Sources/DOMKit/WebIDL/WheelEventInit.swift deleted file mode 100644 index 04433e65..00000000 --- a/Sources/DOMKit/WebIDL/WheelEventInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WheelEventInit: BridgedDictionary { - public convenience init(deltaX: Double, deltaY: Double, deltaZ: Double, deltaMode: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.deltaX] = deltaX.jsValue - object[Strings.deltaY] = deltaY.jsValue - object[Strings.deltaZ] = deltaZ.jsValue - object[Strings.deltaMode] = deltaMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _deltaX = ReadWriteAttribute(jsObject: object, name: Strings.deltaX) - _deltaY = ReadWriteAttribute(jsObject: object, name: Strings.deltaY) - _deltaZ = ReadWriteAttribute(jsObject: object, name: Strings.deltaZ) - _deltaMode = ReadWriteAttribute(jsObject: object, name: Strings.deltaMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var deltaX: Double - - @ReadWriteAttribute - public var deltaY: Double - - @ReadWriteAttribute - public var deltaZ: Double - - @ReadWriteAttribute - public var deltaMode: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/Window.swift b/Sources/DOMKit/WebIDL/Window.swift deleted file mode 100644 index 1588fbb8..00000000 --- a/Sources/DOMKit/WebIDL/Window.swift +++ /dev/null @@ -1,190 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Window].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _event = ReadonlyAttribute(jsObject: jsObject, name: Strings.event) - _window = ReadonlyAttribute(jsObject: jsObject, name: Strings.window) - _self = ReadonlyAttribute(jsObject: jsObject, name: Strings._self) - _document = ReadonlyAttribute(jsObject: jsObject, name: Strings.document) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) - _history = ReadonlyAttribute(jsObject: jsObject, name: Strings.history) - _customElements = ReadonlyAttribute(jsObject: jsObject, name: Strings.customElements) - _locationbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.locationbar) - _menubar = ReadonlyAttribute(jsObject: jsObject, name: Strings.menubar) - _personalbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.personalbar) - _scrollbars = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollbars) - _statusbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusbar) - _toolbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.toolbar) - _status = ReadWriteAttribute(jsObject: jsObject, name: Strings.status) - _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) - _frames = ReadonlyAttribute(jsObject: jsObject, name: Strings.frames) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) - _opener = ReadWriteAttribute(jsObject: jsObject, name: Strings.opener) - _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) - _frameElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameElement) - _navigator = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigator) - _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) - _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) - _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var event: Event? - - @ReadonlyAttribute - public var window: WindowProxy - - @ReadonlyAttribute - public var `self`: WindowProxy - - @ReadonlyAttribute - public var document: Document - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var location: Location - - @ReadonlyAttribute - public var history: History - - @ReadonlyAttribute - public var customElements: CustomElementRegistry - - @ReadonlyAttribute - public var locationbar: BarProp - - @ReadonlyAttribute - public var menubar: BarProp - - @ReadonlyAttribute - public var personalbar: BarProp - - @ReadonlyAttribute - public var scrollbars: BarProp - - @ReadonlyAttribute - public var statusbar: BarProp - - @ReadonlyAttribute - public var toolbar: BarProp - - @ReadWriteAttribute - public var status: String - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var closed: Bool - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } - - @inlinable public func focus() { - let this = jsObject - _ = this[Strings.focus].function!(this: this, arguments: []) - } - - @inlinable public func blur() { - let this = jsObject - _ = this[Strings.blur].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var frames: WindowProxy - - @ReadonlyAttribute - public var length: UInt32 - - @ReadonlyAttribute - public var top: WindowProxy? - - @ReadWriteAttribute - public var opener: JSValue - - @ReadonlyAttribute - public var parent: WindowProxy? - - @ReadonlyAttribute - public var frameElement: Element? - - @inlinable public func open(url: String? = nil, target: String? = nil, features: String? = nil) -> WindowProxy? { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [url?.jsValue ?? .undefined, target?.jsValue ?? .undefined, features?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public subscript(key: String) -> JSObject { - jsObject[key].fromJSValue()! - } - - @ReadonlyAttribute - public var navigator: Navigator - - @ReadonlyAttribute - public var clientInformation: Navigator - - @ReadonlyAttribute - public var originAgentCluster: Bool - - @inlinable public func alert() { - let this = jsObject - _ = this[Strings.alert].function!(this: this, arguments: []) - } - - @inlinable public func alert(message: String) { - let this = jsObject - _ = this[Strings.alert].function!(this: this, arguments: [message.jsValue]) - } - - @inlinable public func confirm(message: String? = nil) -> Bool { - let this = jsObject - return this[Strings.confirm].function!(this: this, arguments: [message?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func prompt(message: String? = nil, default: String? = nil) -> String? { - let this = jsObject - return this[Strings.prompt].function!(this: this, arguments: [message?.jsValue ?? .undefined, `default`?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func print() { - let this = jsObject - _ = this[Strings.print].function!(this: this, arguments: []) - } - - @inlinable public func postMessage(message: JSValue, targetOrigin: String, transfer: [JSObject]? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, targetOrigin.jsValue, transfer?.jsValue ?? .undefined]) - } - - @inlinable public func postMessage(message: JSValue, options: WindowPostMessageOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func captureEvents() { - let this = jsObject - _ = this[Strings.captureEvents].function!(this: this, arguments: []) - } - - @inlinable public func releaseEvents() { - let this = jsObject - _ = this[Strings.releaseEvents].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var external: External -} diff --git a/Sources/DOMKit/WebIDL/WindowEventHandlers.swift b/Sources/DOMKit/WebIDL/WindowEventHandlers.swift deleted file mode 100644 index 53bf2dc3..00000000 --- a/Sources/DOMKit/WebIDL/WindowEventHandlers.swift +++ /dev/null @@ -1,87 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WindowEventHandlers: JSBridgedClass {} -public extension WindowEventHandlers { - @inlinable var onafterprint: EventHandler { - get { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] = newValue } - } - - @inlinable var onbeforeprint: EventHandler { - get { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] = newValue } - } - - @inlinable var onbeforeunload: OnBeforeUnloadEventHandler { - get { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] = newValue } - } - - @inlinable var onhashchange: EventHandler { - get { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] = newValue } - } - - @inlinable var onlanguagechange: EventHandler { - get { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] = newValue } - } - - @inlinable var onmessage: EventHandler { - get { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] = newValue } - } - - @inlinable var onmessageerror: EventHandler { - get { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] = newValue } - } - - @inlinable var onoffline: EventHandler { - get { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] = newValue } - } - - @inlinable var ononline: EventHandler { - get { ClosureAttribute1Optional[Strings.ononline, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ononline, in: jsObject] = newValue } - } - - @inlinable var onpagehide: EventHandler { - get { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] = newValue } - } - - @inlinable var onpageshow: EventHandler { - get { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] = newValue } - } - - @inlinable var onpopstate: EventHandler { - get { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] = newValue } - } - - @inlinable var onrejectionhandled: EventHandler { - get { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] = newValue } - } - - @inlinable var onstorage: EventHandler { - get { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] = newValue } - } - - @inlinable var onunhandledrejection: EventHandler { - get { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] = newValue } - } - - @inlinable var onunload: EventHandler { - get { ClosureAttribute1Optional[Strings.onunload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onunload, in: jsObject] = newValue } - } -} diff --git a/Sources/DOMKit/WebIDL/WindowLocalStorage.swift b/Sources/DOMKit/WebIDL/WindowLocalStorage.swift deleted file mode 100644 index c46d62fe..00000000 --- a/Sources/DOMKit/WebIDL/WindowLocalStorage.swift +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WindowLocalStorage: JSBridgedClass {} -public extension WindowLocalStorage { - @inlinable var localStorage: Storage { ReadonlyAttribute[Strings.localStorage, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/WindowOrWorkerGlobalScope.swift b/Sources/DOMKit/WebIDL/WindowOrWorkerGlobalScope.swift deleted file mode 100644 index d94fd8fa..00000000 --- a/Sources/DOMKit/WebIDL/WindowOrWorkerGlobalScope.swift +++ /dev/null @@ -1,107 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} -public extension WindowOrWorkerGlobalScope { - @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) -> JSPromise { - let this = jsObject - return this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) async throws -> Response { - let this = jsObject - let _promise: JSPromise = this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } - - @inlinable var isSecureContext: Bool { ReadonlyAttribute[Strings.isSecureContext, in: jsObject] } - - @inlinable var crossOriginIsolated: Bool { ReadonlyAttribute[Strings.crossOriginIsolated, in: jsObject] } - - @inlinable func reportError(e: JSValue) { - let this = jsObject - _ = this[Strings.reportError].function!(this: this, arguments: [e.jsValue]) - } - - @inlinable func btoa(data: String) -> String { - let this = jsObject - return this[Strings.btoa].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable func atob(data: String) -> String { - let this = jsObject - return this[Strings.atob].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable func setTimeout(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { - let this = jsObject - return this[Strings.setTimeout].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! - } - - @inlinable func clearTimeout(id: Int32? = nil) { - let this = jsObject - _ = this[Strings.clearTimeout].function!(this: this, arguments: [id?.jsValue ?? .undefined]) - } - - @inlinable func setInterval(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { - let this = jsObject - return this[Strings.setInterval].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! - } - - @inlinable func clearInterval(id: Int32? = nil) { - let this = jsObject - _ = this[Strings.clearInterval].function!(this: this, arguments: [id?.jsValue ?? .undefined]) - } - - // XXX: method 'queueMicrotask' is ignored - - @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { - let this = jsObject - let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) -> JSPromise { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = options?.jsValue ?? .undefined - let this = jsObject - return this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = options?.jsValue ?? .undefined - let this = jsObject - let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func structuredClone(value: JSValue, options: StructuredSerializeOptions? = nil) -> JSValue { - let this = jsObject - return this[Strings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable var performance: Performance { ReadonlyAttribute[Strings.performance, in: jsObject] } - - @inlinable var caches: CacheStorage { ReadonlyAttribute[Strings.caches, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/WindowPostMessageOptions.swift b/Sources/DOMKit/WebIDL/WindowPostMessageOptions.swift deleted file mode 100644 index 34eff6f7..00000000 --- a/Sources/DOMKit/WebIDL/WindowPostMessageOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WindowPostMessageOptions: BridgedDictionary { - public convenience init(targetOrigin: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.targetOrigin] = targetOrigin.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _targetOrigin = ReadWriteAttribute(jsObject: object, name: Strings.targetOrigin) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var targetOrigin: String -} diff --git a/Sources/DOMKit/WebIDL/WindowSessionStorage.swift b/Sources/DOMKit/WebIDL/WindowSessionStorage.swift deleted file mode 100644 index 0e299f3f..00000000 --- a/Sources/DOMKit/WebIDL/WindowSessionStorage.swift +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WindowSessionStorage: JSBridgedClass {} -public extension WindowSessionStorage { - @inlinable var sessionStorage: Storage { ReadonlyAttribute[Strings.sessionStorage, in: jsObject] } -} diff --git a/Sources/DOMKit/WebIDL/Worker.swift b/Sources/DOMKit/WebIDL/Worker.swift deleted file mode 100644 index 29375925..00000000 --- a/Sources/DOMKit/WebIDL/Worker.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Worker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Worker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(scriptURL: String, options: WorkerOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) - } - - @inlinable public func terminate() { - let this = jsObject - _ = this[Strings.terminate].function!(this: this, arguments: []) - } - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/WorkerOptions.swift b/Sources/DOMKit/WebIDL/WorkerOptions.swift deleted file mode 100644 index 41e473f4..00000000 --- a/Sources/DOMKit/WebIDL/WorkerOptions.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WorkerOptions: BridgedDictionary { - public convenience init(type: WorkerType, credentials: RequestCredentials, name: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.credentials] = credentials.jsValue - object[Strings.name] = name.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - _name = ReadWriteAttribute(jsObject: object, name: Strings.name) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: WorkerType - - @ReadWriteAttribute - public var credentials: RequestCredentials - - @ReadWriteAttribute - public var name: String -} diff --git a/Sources/DOMKit/WebIDL/WorkerType.swift b/Sources/DOMKit/WebIDL/WorkerType.swift deleted file mode 100644 index c52ed4c4..00000000 --- a/Sources/DOMKit/WebIDL/WorkerType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum WorkerType: JSString, JSValueCompatible { - case classic = "classic" - case module = "module" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Worklet.swift b/Sources/DOMKit/WebIDL/Worklet.swift deleted file mode 100644 index 6d776066..00000000 --- a/Sources/DOMKit/WebIDL/Worklet.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Worklet: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Worklet].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} diff --git a/Sources/DOMKit/WebIDL/WorkletOptions.swift b/Sources/DOMKit/WebIDL/WorkletOptions.swift deleted file mode 100644 index 153d4b62..00000000 --- a/Sources/DOMKit/WebIDL/WorkletOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WorkletOptions: BridgedDictionary { - public convenience init(credentials: RequestCredentials) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.credentials] = credentials.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var credentials: RequestCredentials -} diff --git a/Sources/DOMKit/WebIDL/WritableStream.swift b/Sources/DOMKit/WebIDL/WritableStream.swift deleted file mode 100644 index 779b06d5..00000000 --- a/Sources/DOMKit/WebIDL/WritableStream.swift +++ /dev/null @@ -1,51 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WritableStream: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStream].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) - self.jsObject = jsObject - } - - @inlinable public convenience init(underlyingSink: JSObject? = nil, strategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSink?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var locked: Bool - - @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func abort(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func close() -> JSPromise { - let this = jsObject - return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func close() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getWriter() -> WritableStreamDefaultWriter { - let this = jsObject - return this[Strings.getWriter].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/WritableStreamDefaultController.swift b/Sources/DOMKit/WebIDL/WritableStreamDefaultController.swift deleted file mode 100644 index b6ab0100..00000000 --- a/Sources/DOMKit/WebIDL/WritableStreamDefaultController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WritableStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func error(e: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/WritableStreamDefaultWriter.swift b/Sources/DOMKit/WebIDL/WritableStreamDefaultWriter.swift deleted file mode 100644 index bd266356..00000000 --- a/Sources/DOMKit/WebIDL/WritableStreamDefaultWriter.swift +++ /dev/null @@ -1,71 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WritableStreamDefaultWriter: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultWriter].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - self.jsObject = jsObject - } - - @inlinable public convenience init(stream: WritableStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @ReadonlyAttribute - public var closed: JSPromise - - @ReadonlyAttribute - public var desiredSize: Double? - - @ReadonlyAttribute - public var ready: JSPromise - - @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func abort(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func close() -> JSPromise { - let this = jsObject - return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func close() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func releaseLock() { - let this = jsObject - _ = this[Strings.releaseLock].function!(this: this, arguments: []) - } - - @inlinable public func write(chunk: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func write(chunk: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} diff --git a/Sources/DOMKit/WebIDL/XMLDocument.swift b/Sources/DOMKit/WebIDL/XMLDocument.swift deleted file mode 100644 index 7debba4e..00000000 --- a/Sources/DOMKit/WebIDL/XMLDocument.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XMLDocument: Document { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLDocument].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/XMLHttpRequest.swift b/Sources/DOMKit/WebIDL/XMLHttpRequest.swift deleted file mode 100644 index 1be78b7a..00000000 --- a/Sources/DOMKit/WebIDL/XMLHttpRequest.swift +++ /dev/null @@ -1,114 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XMLHttpRequest: XMLHttpRequestEventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequest].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _timeout = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeout) - _withCredentials = ReadWriteAttribute(jsObject: jsObject, name: Strings.withCredentials) - _upload = ReadonlyAttribute(jsObject: jsObject, name: Strings.upload) - _responseURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseURL) - _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) - _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) - _responseType = ReadWriteAttribute(jsObject: jsObject, name: Strings.responseType) - _response = ReadonlyAttribute(jsObject: jsObject, name: Strings.response) - _responseText = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseText) - _responseXML = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseXML) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ClosureAttribute1Optional - public var onreadystatechange: EventHandler - - public static let UNSENT: UInt16 = 0 - - public static let OPENED: UInt16 = 1 - - public static let HEADERS_RECEIVED: UInt16 = 2 - - public static let LOADING: UInt16 = 3 - - public static let DONE: UInt16 = 4 - - @ReadonlyAttribute - public var readyState: UInt16 - - @inlinable public func open(method: String, url: String) { - let this = jsObject - _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue]) - } - - @inlinable public func open(method: String, url: String, async: Bool, username: String? = nil, password: String? = nil) { - let this = jsObject - _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue, async.jsValue, username?.jsValue ?? .undefined, password?.jsValue ?? .undefined]) - } - - @inlinable public func setRequestHeader(name: String, value: String) { - let this = jsObject - _ = this[Strings.setRequestHeader].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @ReadWriteAttribute - public var timeout: UInt32 - - @ReadWriteAttribute - public var withCredentials: Bool - - @ReadonlyAttribute - public var upload: XMLHttpRequestUpload - - @inlinable public func send(body: Document_or_XMLHttpRequestBodyInit? = nil) { - let this = jsObject - _ = this[Strings.send].function!(this: this, arguments: [body?.jsValue ?? .undefined]) - } - - @inlinable public func abort() { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var responseURL: String - - @ReadonlyAttribute - public var status: UInt16 - - @ReadonlyAttribute - public var statusText: String - - @inlinable public func getResponseHeader(name: String) -> String? { - let this = jsObject - return this[Strings.getResponseHeader].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAllResponseHeaders() -> String { - let this = jsObject - return this[Strings.getAllResponseHeaders].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func overrideMimeType(mime: String) { - let this = jsObject - _ = this[Strings.overrideMimeType].function!(this: this, arguments: [mime.jsValue]) - } - - @ReadWriteAttribute - public var responseType: XMLHttpRequestResponseType - - @ReadonlyAttribute - public var response: JSValue - - @ReadonlyAttribute - public var responseText: String - - @ReadonlyAttribute - public var responseXML: Document? -} diff --git a/Sources/DOMKit/WebIDL/XMLHttpRequestBodyInit.swift b/Sources/DOMKit/WebIDL/XMLHttpRequestBodyInit.swift deleted file mode 100644 index fc361f42..00000000 --- a/Sources/DOMKit/WebIDL/XMLHttpRequestBodyInit.swift +++ /dev/null @@ -1,88 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} -extension Blob: Any_XMLHttpRequestBodyInit {} -extension BufferSource: Any_XMLHttpRequestBodyInit {} -extension FormData: Any_XMLHttpRequestBodyInit {} -extension String: Any_XMLHttpRequestBodyInit {} -extension URLSearchParams: Any_XMLHttpRequestBodyInit {} - -public enum XMLHttpRequestBodyInit: JSValueCompatible, Any_XMLHttpRequestBodyInit { - case blob(Blob) - case bufferSource(BufferSource) - case formData(FormData) - case string(String) - case urlSearchParams(URLSearchParams) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var formData: FormData? { - switch self { - case let .formData(formData): return formData - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var urlSearchParams: URLSearchParams? { - switch self { - case let .urlSearchParams(urlSearchParams): return urlSearchParams - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - if let urlSearchParams: URLSearchParams = value.fromJSValue() { - return .urlSearchParams(urlSearchParams) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue - case let .urlSearchParams(urlSearchParams): - return urlSearchParams.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/XMLHttpRequestEventTarget.swift b/Sources/DOMKit/WebIDL/XMLHttpRequestEventTarget.swift deleted file mode 100644 index 6ca9430c..00000000 --- a/Sources/DOMKit/WebIDL/XMLHttpRequestEventTarget.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XMLHttpRequestEventTarget: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestEventTarget].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) - _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) - _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) - _ontimeout = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ontimeout) - _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) - super.init(unsafelyWrapping: jsObject) - } - - @ClosureAttribute1Optional - public var onloadstart: EventHandler - - @ClosureAttribute1Optional - public var onprogress: EventHandler - - @ClosureAttribute1Optional - public var onabort: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @ClosureAttribute1Optional - public var onload: EventHandler - - @ClosureAttribute1Optional - public var ontimeout: EventHandler - - @ClosureAttribute1Optional - public var onloadend: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/XMLHttpRequestResponseType.swift b/Sources/DOMKit/WebIDL/XMLHttpRequestResponseType.swift deleted file mode 100644 index 3fa4b45e..00000000 --- a/Sources/DOMKit/WebIDL/XMLHttpRequestResponseType.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum XMLHttpRequestResponseType: JSString, JSValueCompatible { - case _empty = "" - case arraybuffer = "arraybuffer" - case blob = "blob" - case document = "document" - case json = "json" - case text = "text" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/XMLHttpRequestUpload.swift b/Sources/DOMKit/WebIDL/XMLHttpRequestUpload.swift deleted file mode 100644 index 68459258..00000000 --- a/Sources/DOMKit/WebIDL/XMLHttpRequestUpload.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XMLHttpRequestUpload: XMLHttpRequestEventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestUpload].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/XPathEvaluator.swift b/Sources/DOMKit/WebIDL/XPathEvaluator.swift deleted file mode 100644 index 546d5ce5..00000000 --- a/Sources/DOMKit/WebIDL/XPathEvaluator.swift +++ /dev/null @@ -1,18 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XPathEvaluator: JSBridgedClass, XPathEvaluatorBase { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathEvaluator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} diff --git a/Sources/DOMKit/WebIDL/XPathEvaluatorBase.swift b/Sources/DOMKit/WebIDL/XPathEvaluatorBase.swift deleted file mode 100644 index 34302ee2..00000000 --- a/Sources/DOMKit/WebIDL/XPathEvaluatorBase.swift +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol XPathEvaluatorBase: JSBridgedClass {} -public extension XPathEvaluatorBase { - // XXX: method 'createExpression' is ignored - - // XXX: method 'createNSResolver' is ignored - - // XXX: method 'evaluate' is ignored -} diff --git a/Sources/DOMKit/WebIDL/XPathExpression.swift b/Sources/DOMKit/WebIDL/XPathExpression.swift deleted file mode 100644 index 6716ae55..00000000 --- a/Sources/DOMKit/WebIDL/XPathExpression.swift +++ /dev/null @@ -1,19 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XPathExpression: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathExpression].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func evaluate(contextNode: Node, type: UInt16? = nil, result: XPathResult? = nil) -> XPathResult { - let this = jsObject - return this[Strings.evaluate].function!(this: this, arguments: [contextNode.jsValue, type?.jsValue ?? .undefined, result?.jsValue ?? .undefined]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/XPathResult.swift b/Sources/DOMKit/WebIDL/XPathResult.swift deleted file mode 100644 index 1c4458c5..00000000 --- a/Sources/DOMKit/WebIDL/XPathResult.swift +++ /dev/null @@ -1,72 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XPathResult: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathResult].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _resultType = ReadonlyAttribute(jsObject: jsObject, name: Strings.resultType) - _numberValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberValue) - _stringValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.stringValue) - _booleanValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.booleanValue) - _singleNodeValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.singleNodeValue) - _invalidIteratorState = ReadonlyAttribute(jsObject: jsObject, name: Strings.invalidIteratorState) - _snapshotLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.snapshotLength) - self.jsObject = jsObject - } - - public static let ANY_TYPE: UInt16 = 0 - - public static let NUMBER_TYPE: UInt16 = 1 - - public static let STRING_TYPE: UInt16 = 2 - - public static let BOOLEAN_TYPE: UInt16 = 3 - - public static let UNORDERED_NODE_ITERATOR_TYPE: UInt16 = 4 - - public static let ORDERED_NODE_ITERATOR_TYPE: UInt16 = 5 - - public static let UNORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 6 - - public static let ORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 7 - - public static let ANY_UNORDERED_NODE_TYPE: UInt16 = 8 - - public static let FIRST_ORDERED_NODE_TYPE: UInt16 = 9 - - @ReadonlyAttribute - public var resultType: UInt16 - - @ReadonlyAttribute - public var numberValue: Double - - @ReadonlyAttribute - public var stringValue: String - - @ReadonlyAttribute - public var booleanValue: Bool - - @ReadonlyAttribute - public var singleNodeValue: Node? - - @ReadonlyAttribute - public var invalidIteratorState: Bool - - @ReadonlyAttribute - public var snapshotLength: UInt32 - - @inlinable public func iterateNext() -> Node? { - let this = jsObject - return this[Strings.iterateNext].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func snapshotItem(index: UInt32) -> Node? { - let this = jsObject - return this[Strings.snapshotItem].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/XSLTProcessor.swift b/Sources/DOMKit/WebIDL/XSLTProcessor.swift deleted file mode 100644 index 271b3589..00000000 --- a/Sources/DOMKit/WebIDL/XSLTProcessor.swift +++ /dev/null @@ -1,58 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class XSLTProcessor: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XSLTProcessor].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func importStylesheet(style: Node) { - let this = jsObject - _ = this[Strings.importStylesheet].function!(this: this, arguments: [style.jsValue]) - } - - @inlinable public func transformToFragment(source: Node, output: Document) -> DocumentFragment { - let this = jsObject - return this[Strings.transformToFragment].function!(this: this, arguments: [source.jsValue, output.jsValue]).fromJSValue()! - } - - @inlinable public func transformToDocument(source: Node) -> Document { - let this = jsObject - return this[Strings.transformToDocument].function!(this: this, arguments: [source.jsValue]).fromJSValue()! - } - - @inlinable public func setParameter(namespaceURI: String, localName: String, value: JSValue) { - let this = jsObject - _ = this[Strings.setParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue, value.jsValue]) - } - - @inlinable public func getParameter(namespaceURI: String, localName: String) -> JSValue { - let this = jsObject - return this[Strings.getParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func removeParameter(namespaceURI: String, localName: String) { - let this = jsObject - _ = this[Strings.removeParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]) - } - - @inlinable public func clearParameters() { - let this = jsObject - _ = this[Strings.clearParameters].function!(this: this, arguments: []) - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/console.swift b/Sources/DOMKit/WebIDL/console.swift deleted file mode 100644 index d61e67e0..00000000 --- a/Sources/DOMKit/WebIDL/console.swift +++ /dev/null @@ -1,105 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum console { - @inlinable public static var jsObject: JSObject { - JSObject.global[Strings.console].object! - } - - @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func clear() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public static func debug(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func error(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func info(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func log(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) - } - - @inlinable public static func trace(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func warn(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) - } - - @inlinable public static func dirxml(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func count(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func countReset(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func group(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupCollapsed(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupEnd() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupEnd].function!(this: this, arguments: []) - } - - @inlinable public static func time(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func timeEnd(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } -} diff --git a/Sources/DOMKit/WebIDL/nullable_Double_or_seq_of_nullable_Double.swift b/Sources/DOMKit/WebIDL/nullable_Double_or_seq_of_nullable_Double.swift deleted file mode 100644 index bd62b198..00000000 --- a/Sources/DOMKit/WebIDL/nullable_Double_or_seq_of_nullable_Double.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_nullable_Double_or_seq_of_nullable_Double: ConvertibleToJSValue {} -extension Optional: Any_nullable_Double_or_seq_of_nullable_Double where Wrapped == Double {} -extension Array: Any_nullable_Double_or_seq_of_nullable_Double where Element == Double? {} - -public enum nullable_Double_or_seq_of_nullable_Double: JSValueCompatible, Any_nullable_Double_or_seq_of_nullable_Double { - case nullable_Double(Double?) - case seq_of_nullable_Double([Double?]) - - var nullable_Double: Double?? { - switch self { - case let .nullable_Double(nullable_Double): return nullable_Double - default: return nil - } - } - - var seq_of_nullable_Double: [Double?]? { - switch self { - case let .seq_of_nullable_Double(seq_of_nullable_Double): return seq_of_nullable_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let nullable_Double: Double? = value.fromJSValue() { - return .nullable_Double(nullable_Double) - } - if let seq_of_nullable_Double: [Double?] = value.fromJSValue() { - return .seq_of_nullable_Double(seq_of_nullable_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .nullable_Double(nullable_Double): - return nullable_Double.jsValue - case let .seq_of_nullable_Double(seq_of_nullable_Double): - return seq_of_nullable_Double.jsValue - } - } -} diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index cfbf229a..c67712a4 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -43,19 +43,16 @@ enum IDLBuilder { } } - static func generateIDLBindings(idl: [GenericCollection]) throws { + static func generateIDLBindings(idl: [GenericCollection]) throws -> SwiftSource { let declarations = idl.flatMap(\.array) let merged = DeclarationMerger.merge(declarations: declarations) - for (i, node) in merged.declarations.enumerated() { - guard let nameNode = Mirror(reflecting: node).children.first(where: { $0.label == "name" }), - let name = nameNode.value as? String - else { - fatalError("Cannot find name for \(node)") - } - if ignoredNames.contains(name) { + var contents: [SwiftSource] = [] + for node in merged.declarations.sorted(by: { $0.name < $1.name }) { + if ignoredNames.contains(node.name) { continue } - let content = Context.withState(.root( + + let nodeContent = Context.withState(.root( interfaces: merged.interfaces, ignored: [ // functions as parameters are unsupported @@ -112,37 +109,36 @@ enum IDLBuilder { ], types: merged.types )) { - toSwift(node).source + toSwift(node) } - try writeFile(named: name, content: content) + contents.append(nodeContent) } + return "\(lines: contents)" } - static func generateClosureTypes() throws { - let closureTypesContent: SwiftSource = """ + static func generateClosureTypes() throws -> SwiftSource { + return """ /* variadic generics please */ \(lines: Context.closurePatterns.sorted().map(\.swiftRepresentation)) """ - - try writeFile(named: "ClosureAttribute", content: closureTypesContent.source) } - static func generateStrings() throws { + static func generateStrings() throws -> SwiftSource { let strings = Context.strings.sorted() - let stringsContent: SwiftSource = """ + return """ @usableFromInline enum Strings { static let _self: JSString = "self" \(lines: strings.map { "@usableFromInline static let `\(raw: $0)`: JSString = \(quoted: $0)" }) } """ - - try writeFile(named: "Strings", content: stringsContent.source) } - static func generateUnions() throws { - for union in Context.unions { + static func generateUnions() throws -> SwiftSource { + var contents: [SwiftSource] = [] + for union in Context.unions.sorted(by: { $0.name < $1.name }) { guard !ignoredNames.contains(union.name) else { continue } - try writeFile(named: union.name, content: union.swiftRepresentation.source) + contents.append(union.swiftRepresentation) } + return "\(lines: contents)" } } diff --git a/Sources/WebIDLToSwift/MergeDeclarations.swift b/Sources/WebIDLToSwift/MergeDeclarations.swift index a58e249b..991c11ef 100644 --- a/Sources/WebIDLToSwift/MergeDeclarations.swift +++ b/Sources/WebIDLToSwift/MergeDeclarations.swift @@ -182,7 +182,9 @@ enum DeclarationMerger { } } -protocol DeclarationFile {} +protocol DeclarationFile { + var name: String { get } +} extension IDLEnum: DeclarationFile {} diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 734959a4..8d8f61ef 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -9,14 +9,18 @@ func main() { let idl = try IDLParser.parseIDL() print("Removing old files...") try IDLBuilder.cleanOutputFolder() + var contents: [SwiftSource] = [] print("Generating bindings...") - try IDLBuilder.generateIDLBindings(idl: idl) + contents.append(try IDLBuilder.generateIDLBindings(idl: idl)) print("Generating closure property wrappers...") - try IDLBuilder.generateClosureTypes() + contents.append(try IDLBuilder.generateClosureTypes()) print("Generating JSString constants...") - try IDLBuilder.generateStrings() + contents.append(try IDLBuilder.generateStrings()) print("Generating union protocols...") - try IDLBuilder.generateUnions() + contents.append(try IDLBuilder.generateUnions()) + + try IDLBuilder.writeFile(named: "Generated", content: contents.joined(separator: "\n\n").source) + SwiftFormatter.run() print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") } catch { From 114aa335fb5bc8562b0b76500ac6cf8ac58870b6 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 02:29:56 +0900 Subject: [PATCH 02/24] Split DOM related support code and generic support snippet --- Package.swift | 6 +++++- .../DOMKit/{ECMAScript => WebIDL}/CanvasImageSource.swift | 0 .../{ECMAScript => WebIDL}/OffscreenRenderingContext.swift | 0 .../DOMKit/{ECMAScript => WebIDL}/RenderingContext.swift | 0 .../DOMKit/{ECMAScript => WebIDL}/RotationMatrixType.swift | 0 Sources/DOMKit/{ECMAScript => WebIDL}/Support.swift | 1 + Sources/{DOMKit => }/ECMAScript/ArrayBuffer.swift | 0 Sources/{DOMKit => }/ECMAScript/ArrayBufferView.swift | 4 ++-- Sources/{DOMKit => }/ECMAScript/Attributes.swift | 0 Sources/{DOMKit => }/ECMAScript/BridgedDictionary.swift | 2 +- Sources/{DOMKit => }/ECMAScript/DataView.swift | 0 Sources/{DOMKit => }/ECMAScript/Iterators.swift | 0 12 files changed, 9 insertions(+), 4 deletions(-) rename Sources/DOMKit/{ECMAScript => WebIDL}/CanvasImageSource.swift (100%) rename Sources/DOMKit/{ECMAScript => WebIDL}/OffscreenRenderingContext.swift (100%) rename Sources/DOMKit/{ECMAScript => WebIDL}/RenderingContext.swift (100%) rename Sources/DOMKit/{ECMAScript => WebIDL}/RotationMatrixType.swift (100%) rename Sources/DOMKit/{ECMAScript => WebIDL}/Support.swift (96%) rename Sources/{DOMKit => }/ECMAScript/ArrayBuffer.swift (100%) rename Sources/{DOMKit => }/ECMAScript/ArrayBufferView.swift (96%) rename Sources/{DOMKit => }/ECMAScript/Attributes.swift (100%) rename Sources/{DOMKit => }/ECMAScript/BridgedDictionary.swift (91%) rename Sources/{DOMKit => }/ECMAScript/DataView.swift (100%) rename Sources/{DOMKit => }/ECMAScript/Iterators.swift (100%) diff --git a/Package.swift b/Package.swift index 82799a74..7157ffdd 100644 --- a/Package.swift +++ b/Package.swift @@ -26,7 +26,11 @@ let package = Package( dependencies: ["DOMKit"]), .target( name: "DOMKit", - dependencies: ["JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + // This support library should be moved to JavaScriptKit + .target(name: "ECMAScript", dependencies: [ + "JavaScriptKit", + .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), .target(name: "WebIDL"), .target( name: "WebIDLToSwift", diff --git a/Sources/DOMKit/ECMAScript/CanvasImageSource.swift b/Sources/DOMKit/WebIDL/CanvasImageSource.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/CanvasImageSource.swift rename to Sources/DOMKit/WebIDL/CanvasImageSource.swift diff --git a/Sources/DOMKit/ECMAScript/OffscreenRenderingContext.swift b/Sources/DOMKit/WebIDL/OffscreenRenderingContext.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/OffscreenRenderingContext.swift rename to Sources/DOMKit/WebIDL/OffscreenRenderingContext.swift diff --git a/Sources/DOMKit/ECMAScript/RenderingContext.swift b/Sources/DOMKit/WebIDL/RenderingContext.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/RenderingContext.swift rename to Sources/DOMKit/WebIDL/RenderingContext.swift diff --git a/Sources/DOMKit/ECMAScript/RotationMatrixType.swift b/Sources/DOMKit/WebIDL/RotationMatrixType.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/RotationMatrixType.swift rename to Sources/DOMKit/WebIDL/RotationMatrixType.swift diff --git a/Sources/DOMKit/ECMAScript/Support.swift b/Sources/DOMKit/WebIDL/Support.swift similarity index 96% rename from Sources/DOMKit/ECMAScript/Support.swift rename to Sources/DOMKit/WebIDL/Support.swift index 4bc3794a..df39886f 100644 --- a/Sources/DOMKit/ECMAScript/Support.swift +++ b/Sources/DOMKit/WebIDL/Support.swift @@ -1,4 +1,5 @@ import JavaScriptKit +@_exported import ECMAScript /* TODO: fix this */ public typealias __UNSUPPORTED_BIGINT__ = JSValue diff --git a/Sources/DOMKit/ECMAScript/ArrayBuffer.swift b/Sources/ECMAScript/ArrayBuffer.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/ArrayBuffer.swift rename to Sources/ECMAScript/ArrayBuffer.swift diff --git a/Sources/DOMKit/ECMAScript/ArrayBufferView.swift b/Sources/ECMAScript/ArrayBufferView.swift similarity index 96% rename from Sources/DOMKit/ECMAScript/ArrayBufferView.swift rename to Sources/ECMAScript/ArrayBufferView.swift index ffa932d8..7951b2cd 100644 --- a/Sources/DOMKit/ECMAScript/ArrayBufferView.swift +++ b/Sources/ECMAScript/ArrayBufferView.swift @@ -20,7 +20,7 @@ public enum ArrayBufferView: JSValueCompatible, AnyArrayBufferView { case uint16Array(Uint16Array) case uint32Array(Uint32Array) case uint8Array(Uint8Array) - case uint8ClampedArray(Uint8ClampedArray) + case uint8ClampedArray(JSUInt8ClampedArray) public static func construct(from value: JSValue) -> Self? { // if let bigInt64Array: BigInt64Array = value.fromJSValue() { @@ -56,7 +56,7 @@ public enum ArrayBufferView: JSValueCompatible, AnyArrayBufferView { if let uint8Array: Uint8Array = value.fromJSValue() { return .uint8Array(uint8Array) } - if let uint8ClampedArray: Uint8ClampedArray = value.fromJSValue() { + if let uint8ClampedArray: JSUInt8ClampedArray = value.fromJSValue() { return .uint8ClampedArray(uint8ClampedArray) } return nil diff --git a/Sources/DOMKit/ECMAScript/Attributes.swift b/Sources/ECMAScript/Attributes.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/Attributes.swift rename to Sources/ECMAScript/Attributes.swift diff --git a/Sources/DOMKit/ECMAScript/BridgedDictionary.swift b/Sources/ECMAScript/BridgedDictionary.swift similarity index 91% rename from Sources/DOMKit/ECMAScript/BridgedDictionary.swift rename to Sources/ECMAScript/BridgedDictionary.swift index 813e0a66..8125baf9 100644 --- a/Sources/DOMKit/ECMAScript/BridgedDictionary.swift +++ b/Sources/ECMAScript/BridgedDictionary.swift @@ -1,6 +1,6 @@ import JavaScriptKit -public class BridgedDictionary: JSValueCompatible { +open class BridgedDictionary: JSValueCompatible { public let jsObject: JSObject public var jsValue: JSValue { diff --git a/Sources/DOMKit/ECMAScript/DataView.swift b/Sources/ECMAScript/DataView.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/DataView.swift rename to Sources/ECMAScript/DataView.swift diff --git a/Sources/DOMKit/ECMAScript/Iterators.swift b/Sources/ECMAScript/Iterators.swift similarity index 100% rename from Sources/DOMKit/ECMAScript/Iterators.swift rename to Sources/ECMAScript/Iterators.swift From f95a3e03bac4c34fd3bbf337fec7def87cd8c84f Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 03:53:30 +0900 Subject: [PATCH 03/24] Stop cleaning up generated directory --- Sources/WebIDLToSwift/IDLBuilder.swift | 14 ++++---------- Sources/WebIDLToSwift/main.swift | 2 -- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index c67712a4..827f160f 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -28,19 +28,13 @@ enum IDLBuilder { ] static let outDir = "Sources/DOMKit/WebIDL/" - static func writeFile(named name: String, content: String) throws { + static func writeFile(named name: String, content: String) throws -> String { let path = outDir + name + ".swift" if FileManager.default.fileExists(atPath: path) { - fatalError("file already exists for \(name)") - } else { - try (preamble + content).write(toFile: path, atomically: true, encoding: .utf8) - } - } - - static func cleanOutputFolder() throws { - for file in try FileManager.default.contentsOfDirectory(atPath: outDir) { - try FileManager.default.removeItem(atPath: outDir + file) + try FileManager.default.removeItem(atPath: path) } + try (preamble + content).write(toFile: path, atomically: true, encoding: .utf8) + return path } static func generateIDLBindings(idl: [GenericCollection]) throws -> SwiftSource { diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 8d8f61ef..b7e01d9f 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -7,8 +7,6 @@ func main() { do { let startTime = Date() let idl = try IDLParser.parseIDL() - print("Removing old files...") - try IDLBuilder.cleanOutputFolder() var contents: [SwiftSource] = [] print("Generating bindings...") contents.append(try IDLBuilder.generateIDLBindings(idl: idl)) From 22160417447a993a5e682988da72920c1e314e50 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 03:54:17 +0900 Subject: [PATCH 04/24] Format only Generated.swift --- Sources/WebIDLToSwift/FormatOutputFiles.swift | 5 ++--- Sources/WebIDLToSwift/main.swift | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/WebIDLToSwift/FormatOutputFiles.swift b/Sources/WebIDLToSwift/FormatOutputFiles.swift index c1f5be40..2bd9dc8f 100644 --- a/Sources/WebIDLToSwift/FormatOutputFiles.swift +++ b/Sources/WebIDLToSwift/FormatOutputFiles.swift @@ -1,12 +1,11 @@ import Foundation enum SwiftFormatter { - static func run() { + static func run(source: String) { print("Formatting generated Swift files...") let task = Process() - task.standardOutput = FileHandle.standardOutput task.standardError = FileHandle.standardError - task.arguments = ["-c", "swiftformat Sources/DOMKit/WebIDL"] + task.arguments = ["-c", "swiftformat \(source)"] task.launchPath = "/bin/zsh" task.launch() task.waitUntilExit() diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index b7e01d9f..30adaf35 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -16,10 +16,11 @@ func main() { contents.append(try IDLBuilder.generateStrings()) print("Generating union protocols...") contents.append(try IDLBuilder.generateUnions()) + let outputPath = try IDLBuilder.writeFile( + named: "Generated", + content: contents.joined(separator: "\n\n").source) - try IDLBuilder.writeFile(named: "Generated", content: contents.joined(separator: "\n\n").source) - - SwiftFormatter.run() + SwiftFormatter.run(source: outputPath) print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") } catch { handleDecodingError(error) From 780073db1ab273b32499fa83eff0fb0c91546cf8 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 03:54:54 +0900 Subject: [PATCH 05/24] Move Sources/DOMKit/WebIDL/*.swift to Sources/DOMKit/ --- Sources/DOMKit/{WebIDL => }/CanvasImageSource.swift | 0 Sources/DOMKit/{WebIDL => }/Generated.swift | 0 Sources/DOMKit/{WebIDL => }/OffscreenRenderingContext.swift | 0 Sources/DOMKit/{WebIDL => }/RenderingContext.swift | 0 Sources/DOMKit/{WebIDL => }/RotationMatrixType.swift | 0 Sources/DOMKit/{WebIDL => }/Support.swift | 0 Sources/WebIDLToSwift/IDLBuilder.swift | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) rename Sources/DOMKit/{WebIDL => }/CanvasImageSource.swift (100%) rename Sources/DOMKit/{WebIDL => }/Generated.swift (100%) rename Sources/DOMKit/{WebIDL => }/OffscreenRenderingContext.swift (100%) rename Sources/DOMKit/{WebIDL => }/RenderingContext.swift (100%) rename Sources/DOMKit/{WebIDL => }/RotationMatrixType.swift (100%) rename Sources/DOMKit/{WebIDL => }/Support.swift (100%) diff --git a/Sources/DOMKit/WebIDL/CanvasImageSource.swift b/Sources/DOMKit/CanvasImageSource.swift similarity index 100% rename from Sources/DOMKit/WebIDL/CanvasImageSource.swift rename to Sources/DOMKit/CanvasImageSource.swift diff --git a/Sources/DOMKit/WebIDL/Generated.swift b/Sources/DOMKit/Generated.swift similarity index 100% rename from Sources/DOMKit/WebIDL/Generated.swift rename to Sources/DOMKit/Generated.swift diff --git a/Sources/DOMKit/WebIDL/OffscreenRenderingContext.swift b/Sources/DOMKit/OffscreenRenderingContext.swift similarity index 100% rename from Sources/DOMKit/WebIDL/OffscreenRenderingContext.swift rename to Sources/DOMKit/OffscreenRenderingContext.swift diff --git a/Sources/DOMKit/WebIDL/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift similarity index 100% rename from Sources/DOMKit/WebIDL/RenderingContext.swift rename to Sources/DOMKit/RenderingContext.swift diff --git a/Sources/DOMKit/WebIDL/RotationMatrixType.swift b/Sources/DOMKit/RotationMatrixType.swift similarity index 100% rename from Sources/DOMKit/WebIDL/RotationMatrixType.swift rename to Sources/DOMKit/RotationMatrixType.swift diff --git a/Sources/DOMKit/WebIDL/Support.swift b/Sources/DOMKit/Support.swift similarity index 100% rename from Sources/DOMKit/WebIDL/Support.swift rename to Sources/DOMKit/Support.swift diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index 827f160f..168ca197 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -27,7 +27,7 @@ enum IDLBuilder { "DOMMatrix_or_Float32Array_or_Float64Array", ] - static let outDir = "Sources/DOMKit/WebIDL/" + static let outDir = "Sources/DOMKit/" static func writeFile(named name: String, content: String) throws -> String { let path = outDir + name + ".swift" if FileManager.default.fileExists(atPath: path) { From c2bee0a4cc64d4ed6b6f60cefdad28a6f03c9440 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 03:58:12 +0900 Subject: [PATCH 06/24] Move hardcoded output path to main.swift --- Sources/WebIDLToSwift/IDLBuilder.swift | 5 +---- Sources/WebIDLToSwift/main.swift | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index 168ca197..925e3c1d 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -27,14 +27,11 @@ enum IDLBuilder { "DOMMatrix_or_Float32Array_or_Float64Array", ] - static let outDir = "Sources/DOMKit/" - static func writeFile(named name: String, content: String) throws -> String { - let path = outDir + name + ".swift" + static func writeFile(path: String, content: String) throws { if FileManager.default.fileExists(atPath: path) { try FileManager.default.removeItem(atPath: path) } try (preamble + content).write(toFile: path, atomically: true, encoding: .utf8) - return path } static func generateIDLBindings(idl: [GenericCollection]) throws -> SwiftSource { diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 30adaf35..1945e0f0 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -7,6 +7,7 @@ func main() { do { let startTime = Date() let idl = try IDLParser.parseIDL() + let outputPath = "Sources/DOMKit/Generated.swift" var contents: [SwiftSource] = [] print("Generating bindings...") contents.append(try IDLBuilder.generateIDLBindings(idl: idl)) @@ -16,8 +17,8 @@ func main() { contents.append(try IDLBuilder.generateStrings()) print("Generating union protocols...") contents.append(try IDLBuilder.generateUnions()) - let outputPath = try IDLBuilder.writeFile( - named: "Generated", + try IDLBuilder.writeFile( + path: outputPath, content: contents.joined(separator: "\n\n").source) SwiftFormatter.run(source: outputPath) From 51ec9fe1d9704b423c64855dead66ef33bd4e30e Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 03:21:22 +0900 Subject: [PATCH 07/24] Convert webidl to json one-by-one --- Sources/WebIDLToSwift/FindTool.swift | 19 +++++++++++ Sources/WebIDLToSwift/IDLParser.swift | 45 ++++++++++++++++++++++----- parse-idl/index.js | 6 ++++ parse-idl/package.json | 3 -- parse-idl/parse-all.js | 30 ------------------ 5 files changed, 63 insertions(+), 40 deletions(-) create mode 100644 Sources/WebIDLToSwift/FindTool.swift create mode 100644 parse-idl/index.js delete mode 100644 parse-idl/parse-all.js diff --git a/Sources/WebIDLToSwift/FindTool.swift b/Sources/WebIDLToSwift/FindTool.swift new file mode 100644 index 00000000..bb502050 --- /dev/null +++ b/Sources/WebIDLToSwift/FindTool.swift @@ -0,0 +1,19 @@ +import Foundation + +func findExecutablePath(name: String, fileManager: FileManager = .default) -> String { + let path = ProcessInfo.processInfo.environment["PATH"] + let pathSeparator: Character +#if os(Windows) + pathSeparator = ";" +#else + pathSeparator = ":" +#endif + let searchPaths = (path ?? "").split(separator: pathSeparator) + for searchPath in searchPaths { + let candidate = URL(fileURLWithPath: String(searchPath)).appendingPathComponent(name) + if fileManager.isExecutableFile(atPath: candidate.path) { + return candidate.path + } + } + fatalError("Tool '\(name)' not found in PATH") +} diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index aa409c7d..5e86c54d 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -2,23 +2,54 @@ import Foundation import WebIDL enum IDLParser { - private static func getJSONData() -> Data { - print("Fetching parsed IDL files...") + private static let packageDir = URL(fileURLWithPath: FileManager.default.currentDirectoryPath) + .appendingPathComponent("parse-idl") + private static func getJSONData(idlPath: URL) -> Data { + print("Fetching parsed IDL file of \(idlPath.path)...") let task = Process() let pipe = Pipe() task.standardOutput = pipe task.standardError = FileHandle.standardError - task.arguments = ["-c", "npm start --silent"] - task.launchPath = "/bin/zsh" - task.currentDirectoryPath = FileManager.default.currentDirectoryPath + "/parse-idl" + task.launchPath = findExecutablePath(name: "node") + task.arguments = [packageDir.appendingPathComponent("index.js").path, idlPath.path] + task.currentDirectoryPath = packageDir.path task.launch() return pipe.fileHandleForReading.readDataToEndOfFile() } + static func parseIDL(path: URL) throws -> GenericCollection { + let data = getJSONData(idlPath: path) + return try JSONDecoder().decode(GenericCollection.self, from: data) + } + static func parseIDL() throws -> [GenericCollection] { - let data = getJSONData() + let enabledIDLs = [ + "dom", + "fetch", + "FileAPI", + "html", + "geometry", + "hr-time", + "referrer-policy", + "uievents", + "wai-aria", + "webidl", + "web-animations", + "xhr", + "service-workers", + "url", + "streams", + "console", + ] print("Building IDL struct tree...") - return try JSONDecoder().decode([GenericCollection].self, from: data) + return try enabledIDLs.map { idl in + let idlPath = packageDir + .appendingPathComponent("node_modules") + .appendingPathComponent("@webref") + .appendingPathComponent("idl") + .appendingPathComponent(idl + ".idl") + return try parseIDL(path: idlPath) + } } } diff --git a/parse-idl/index.js b/parse-idl/index.js new file mode 100644 index 00000000..492a1a1a --- /dev/null +++ b/parse-idl/index.js @@ -0,0 +1,6 @@ +import fs from "node:fs/promises"; +import * as WebIDL2 from "webidl2"; + +const idlPath = process.argv[2]; +const idlContent = await fs.readFile(idlPath, "utf8"); +console.log(JSON.stringify(WebIDL2.parse(idlContent), null, 2)); diff --git a/parse-idl/package.json b/parse-idl/package.json index 0ee60740..7b53c2ac 100644 --- a/parse-idl/package.json +++ b/parse-idl/package.json @@ -1,9 +1,6 @@ { "private": true, "type": "module", - "scripts": { - "start": "node parse-all.js" - }, "devDependencies": { "prettier": "2.6.1" }, diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js deleted file mode 100644 index a992f772..00000000 --- a/parse-idl/parse-all.js +++ /dev/null @@ -1,30 +0,0 @@ -import { parseAll } from "@webref/idl"; -import fs from "node:fs/promises"; - -const parsedFiles = await parseAll(); -// console.log(Object.keys(parsedFiles).join('\n')) -// console.log(JSON.stringify(Object.values(parsedFiles), null, 2)); -console.log( - JSON.stringify( - [ - "dom", - "fetch", - "FileAPI", - "html", - "geometry", - "hr-time", - "referrer-policy", - "uievents", - "wai-aria", - "webidl", - "web-animations", - "xhr", - "service-workers", - "url", - "streams", - "console", - ].map((key) => parsedFiles[key]), - null, - 2 - ) -); From b31b7c4f9659373643fd51f6cc3e2b400582d2f9 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 04:38:35 +0900 Subject: [PATCH 08/24] Allow to control behavior by cli arguments --- Sources/WebIDLToSwift/IDLParser.swift | 8 ++--- Sources/WebIDLToSwift/main.swift | 51 +++++++++++++++++---------- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 5e86c54d..8413345b 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -23,7 +23,7 @@ enum IDLParser { return try JSONDecoder().decode(GenericCollection.self, from: data) } - static func parseIDL() throws -> [GenericCollection] { + static func defaultIDLs() -> [URL] { let enabledIDLs = [ "dom", "fetch", @@ -42,14 +42,12 @@ enum IDLParser { "streams", "console", ] - print("Building IDL struct tree...") - return try enabledIDLs.map { idl in - let idlPath = packageDir + return enabledIDLs.map { idl in + packageDir .appendingPathComponent("node_modules") .appendingPathComponent("@webref") .appendingPathComponent("idl") .appendingPathComponent(idl + ".idl") - return try parseIDL(path: idlPath) } } } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 1945e0f0..2ee97487 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -1,33 +1,48 @@ import Foundation import WebIDL +func parseOptions() -> [(outputPath: String, idlPaths: [URL])] { + let args = CommandLine.arguments + if args.count > 2 { + return [(args[1], Array(args[2...].map(URL.init(fileURLWithPath: ))))] + } else { + return [("Sources/DOMKit/Generated.swift", IDLParser.defaultIDLs())] + } +} + main() func main() { do { - let startTime = Date() - let idl = try IDLParser.parseIDL() - let outputPath = "Sources/DOMKit/Generated.swift" - var contents: [SwiftSource] = [] - print("Generating bindings...") - contents.append(try IDLBuilder.generateIDLBindings(idl: idl)) - print("Generating closure property wrappers...") - contents.append(try IDLBuilder.generateClosureTypes()) - print("Generating JSString constants...") - contents.append(try IDLBuilder.generateStrings()) - print("Generating union protocols...") - contents.append(try IDLBuilder.generateUnions()) - try IDLBuilder.writeFile( - path: outputPath, - content: contents.joined(separator: "\n\n").source) - - SwiftFormatter.run(source: outputPath) - print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") + let options = parseOptions() + for (outputPath, idlPaths) in options { + let startTime = Date() + print("Generating bindings for \(idlPaths.map(\.path))...") + let idls = try idlPaths.map { try IDLParser.parseIDL(path: $0) } + try generate(idls: idls, outputPath: outputPath) + print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") + } } catch { handleDecodingError(error) } } +private func generate(idls: [GenericCollection], outputPath: String) throws { + var contents: [SwiftSource] = [] + contents.append(try IDLBuilder.generateIDLBindings(idl: idls)) + print("Generating closure property wrappers...") + contents.append(try IDLBuilder.generateClosureTypes()) + print("Generating JSString constants...") + contents.append(try IDLBuilder.generateStrings()) + print("Generating union protocols...") + contents.append(try IDLBuilder.generateUnions()) + try IDLBuilder.writeFile( + path: outputPath, + content: contents.joined(separator: "\n\n").source) + + SwiftFormatter.run(source: outputPath) +} + private func handleDecodingError(_ error: Error) { switch error as? DecodingError { case let .dataCorrupted(ctx), let .typeMismatch(_, ctx): From d8e226c3b00cfb6ff69c6af092ae1d72bf77d3f0 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 04:40:02 +0900 Subject: [PATCH 09/24] WIP --- Package.swift | 6 + Sources/DOMKitConsole/DOMKitConsole.swift | 132 ++++ Sources/DOMKitFetch/DOMKitFetch.swift | 721 ++++++++++++++++++++++ 3 files changed, 859 insertions(+) create mode 100644 Sources/DOMKitConsole/DOMKitConsole.swift create mode 100644 Sources/DOMKitFetch/DOMKitFetch.swift diff --git a/Package.swift b/Package.swift index 7157ffdd..d2fb7be8 100644 --- a/Package.swift +++ b/Package.swift @@ -27,6 +27,12 @@ let package = Package( .target( name: "DOMKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + .target( + name: "DOMKitConsole", + dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + .target( + name: "DOMKitFetch", + dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", diff --git a/Sources/DOMKitConsole/DOMKitConsole.swift b/Sources/DOMKitConsole/DOMKitConsole.swift new file mode 100644 index 00000000..bc1f0800 --- /dev/null +++ b/Sources/DOMKitConsole/DOMKitConsole.swift @@ -0,0 +1,132 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum console { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.console].object! + } + + @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func clear() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public static func debug(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func error(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func info(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func log(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) + } + + @inlinable public static func trace(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func warn(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) + } + + @inlinable public static func dirxml(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func count(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func countReset(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func group(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupCollapsed(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupEnd() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupEnd].function!(this: this, arguments: []) + } + + @inlinable public static func time(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func timeEnd(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } +} + +/* variadic generics please */ + +@usableFromInline enum Strings { + static let _self: JSString = "self" + @usableFromInline static let assert: JSString = "assert" + @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let console: JSString = "console" + @usableFromInline static let count: JSString = "count" + @usableFromInline static let countReset: JSString = "countReset" + @usableFromInline static let debug: JSString = "debug" + @usableFromInline static let dir: JSString = "dir" + @usableFromInline static let dirxml: JSString = "dirxml" + @usableFromInline static let error: JSString = "error" + @usableFromInline static let group: JSString = "group" + @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" + @usableFromInline static let groupEnd: JSString = "groupEnd" + @usableFromInline static let info: JSString = "info" + @usableFromInline static let log: JSString = "log" + @usableFromInline static let table: JSString = "table" + @usableFromInline static let time: JSString = "time" + @usableFromInline static let timeEnd: JSString = "timeEnd" + @usableFromInline static let timeLog: JSString = "timeLog" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let trace: JSString = "trace" + @usableFromInline static let warn: JSString = "warn" +} diff --git a/Sources/DOMKitFetch/DOMKitFetch.swift b/Sources/DOMKitFetch/DOMKitFetch.swift new file mode 100644 index 00000000..2b79e6a1 --- /dev/null +++ b/Sources/DOMKitFetch/DOMKitFetch.swift @@ -0,0 +1,721 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Body: JSBridgedClass {} +public extension Body { + // XXX: attribute 'body' is ignored + + @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } + + @inlinable func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func blob() -> JSPromise { + let this = jsObject + return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func blob() async throws -> Blob { + let this = jsObject + let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func formData() -> JSPromise { + let this = jsObject + return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func formData() async throws -> FormData { + let this = jsObject + let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func json() -> JSPromise { + let this = jsObject + return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func json() async throws -> JSValue { + let this = jsObject + let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class Headers: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Headers].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: HeadersInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class Request: JSBridgedClass, Body { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Request].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _method = ReadonlyAttribute(jsObject: jsObject, name: Strings.method) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) + _destination = ReadonlyAttribute(jsObject: jsObject, name: Strings.destination) + _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) + _referrerPolicy = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) + _credentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.credentials) + _cache = ReadonlyAttribute(jsObject: jsObject, name: Strings.cache) + _redirect = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirect) + _integrity = ReadonlyAttribute(jsObject: jsObject, name: Strings.integrity) + _keepalive = ReadonlyAttribute(jsObject: jsObject, name: Strings.keepalive) + _isReloadNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isReloadNavigation) + _isHistoryNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isHistoryNavigation) + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject + } + + @inlinable public convenience init(input: RequestInfo, init: RequestInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [input.jsValue, `init`?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var method: String + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var headers: Headers + + @ReadonlyAttribute + public var destination: RequestDestination + + @ReadonlyAttribute + public var referrer: String + + @ReadonlyAttribute + public var referrerPolicy: ReferrerPolicy + + @ReadonlyAttribute + public var mode: RequestMode + + @ReadonlyAttribute + public var credentials: RequestCredentials + + @ReadonlyAttribute + public var cache: RequestCache + + @ReadonlyAttribute + public var redirect: RequestRedirect + + @ReadonlyAttribute + public var integrity: String + + @ReadonlyAttribute + public var keepalive: Bool + + @ReadonlyAttribute + public var isReloadNavigation: Bool + + @ReadonlyAttribute + public var isHistoryNavigation: Bool + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } +} + +public enum RequestCache: JSString, JSValueCompatible { + case `default` = "default" + case noStore = "no-store" + case reload = "reload" + case noCache = "no-cache" + case forceCache = "force-cache" + case onlyIfCached = "only-if-cached" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestCredentials: JSString, JSValueCompatible { + case omit = "omit" + case sameOrigin = "same-origin" + case include = "include" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestDestination: JSString, JSValueCompatible { + case _empty = "" + case audio = "audio" + case audioworklet = "audioworklet" + case document = "document" + case embed = "embed" + case font = "font" + case frame = "frame" + case iframe = "iframe" + case image = "image" + case manifest = "manifest" + case object = "object" + case paintworklet = "paintworklet" + case report = "report" + case script = "script" + case sharedworker = "sharedworker" + case style = "style" + case track = "track" + case video = "video" + case worker = "worker" + case xslt = "xslt" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class RequestInit: BridgedDictionary { + public convenience init(method: String, headers: HeadersInit, body: BodyInit?, referrer: String, referrerPolicy: ReferrerPolicy, mode: RequestMode, credentials: RequestCredentials, cache: RequestCache, redirect: RequestRedirect, integrity: String, keepalive: Bool, signal: AbortSignal?, window: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.method] = method.jsValue + object[Strings.headers] = headers.jsValue + object[Strings.body] = body.jsValue + object[Strings.referrer] = referrer.jsValue + object[Strings.referrerPolicy] = referrerPolicy.jsValue + object[Strings.mode] = mode.jsValue + object[Strings.credentials] = credentials.jsValue + object[Strings.cache] = cache.jsValue + object[Strings.redirect] = redirect.jsValue + object[Strings.integrity] = integrity.jsValue + object[Strings.keepalive] = keepalive.jsValue + object[Strings.signal] = signal.jsValue + object[Strings.window] = window.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _method = ReadWriteAttribute(jsObject: object, name: Strings.method) + _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) + _body = ReadWriteAttribute(jsObject: object, name: Strings.body) + _referrer = ReadWriteAttribute(jsObject: object, name: Strings.referrer) + _referrerPolicy = ReadWriteAttribute(jsObject: object, name: Strings.referrerPolicy) + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + _cache = ReadWriteAttribute(jsObject: object, name: Strings.cache) + _redirect = ReadWriteAttribute(jsObject: object, name: Strings.redirect) + _integrity = ReadWriteAttribute(jsObject: object, name: Strings.integrity) + _keepalive = ReadWriteAttribute(jsObject: object, name: Strings.keepalive) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) + _window = ReadWriteAttribute(jsObject: object, name: Strings.window) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var method: String + + @ReadWriteAttribute + public var headers: HeadersInit + + @ReadWriteAttribute + public var body: BodyInit? + + @ReadWriteAttribute + public var referrer: String + + @ReadWriteAttribute + public var referrerPolicy: ReferrerPolicy + + @ReadWriteAttribute + public var mode: RequestMode + + @ReadWriteAttribute + public var credentials: RequestCredentials + + @ReadWriteAttribute + public var cache: RequestCache + + @ReadWriteAttribute + public var redirect: RequestRedirect + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var keepalive: Bool + + @ReadWriteAttribute + public var signal: AbortSignal? + + @ReadWriteAttribute + public var window: JSValue +} + +public enum RequestMode: JSString, JSValueCompatible { + case navigate = "navigate" + case sameOrigin = "same-origin" + case noCors = "no-cors" + case cors = "cors" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestRedirect: JSString, JSValueCompatible { + case follow = "follow" + case error = "error" + case manual = "manual" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Response: JSBridgedClass, Body { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Response].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _redirected = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirected) + _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) + _ok = ReadonlyAttribute(jsObject: jsObject, name: Strings.ok) + _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) + _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) + self.jsObject = jsObject + } + + @inlinable public convenience init(body: BodyInit? = nil, init: ResponseInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [body?.jsValue ?? .undefined, `init`?.jsValue ?? .undefined])) + } + + @inlinable public static func error() -> Self { + let this = constructor + return this[Strings.error].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public static func redirect(url: String, status: UInt16? = nil) -> Self { + let this = constructor + return this[Strings.redirect].function!(this: this, arguments: [url.jsValue, status?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var type: ResponseType + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var redirected: Bool + + @ReadonlyAttribute + public var status: UInt16 + + @ReadonlyAttribute + public var ok: Bool + + @ReadonlyAttribute + public var statusText: String + + @ReadonlyAttribute + public var headers: Headers + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class ResponseInit: BridgedDictionary { + public convenience init(status: UInt16, statusText: String, headers: HeadersInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.status] = status.jsValue + object[Strings.statusText] = statusText.jsValue + object[Strings.headers] = headers.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _status = ReadWriteAttribute(jsObject: object, name: Strings.status) + _statusText = ReadWriteAttribute(jsObject: object, name: Strings.statusText) + _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var status: UInt16 + + @ReadWriteAttribute + public var statusText: String + + @ReadWriteAttribute + public var headers: HeadersInit +} + +public enum ResponseType: JSString, JSValueCompatible { + case basic = "basic" + case cors = "cors" + case `default` = "default" + case error = "error" + case opaque = "opaque" + case opaqueredirect = "opaqueredirect" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} +public extension WindowOrWorkerGlobalScope { + @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) -> JSPromise { + let this = jsObject + return this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) async throws -> Response { + let this = jsObject + let _promise: JSPromise = this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +/* variadic generics please */ + +@usableFromInline enum Strings { + static let _self: JSString = "self" + @usableFromInline static let Headers: JSString = "Headers" + @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let Request: JSString = "Request" + @usableFromInline static let Response: JSString = "Response" + @usableFromInline static let append: JSString = "append" + @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" + @usableFromInline static let blob: JSString = "blob" + @usableFromInline static let body: JSString = "body" + @usableFromInline static let bodyUsed: JSString = "bodyUsed" + @usableFromInline static let cache: JSString = "cache" + @usableFromInline static let clone: JSString = "clone" + @usableFromInline static let credentials: JSString = "credentials" + @usableFromInline static let delete: JSString = "delete" + @usableFromInline static let destination: JSString = "destination" + @usableFromInline static let error: JSString = "error" + @usableFromInline static let fetch: JSString = "fetch" + @usableFromInline static let formData: JSString = "formData" + @usableFromInline static let get: JSString = "get" + @usableFromInline static let has: JSString = "has" + @usableFromInline static let headers: JSString = "headers" + @usableFromInline static let integrity: JSString = "integrity" + @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" + @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" + @usableFromInline static let json: JSString = "json" + @usableFromInline static let keepalive: JSString = "keepalive" + @usableFromInline static let method: JSString = "method" + @usableFromInline static let mode: JSString = "mode" + @usableFromInline static let ok: JSString = "ok" + @usableFromInline static let redirect: JSString = "redirect" + @usableFromInline static let redirected: JSString = "redirected" + @usableFromInline static let referrer: JSString = "referrer" + @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" + @usableFromInline static let set: JSString = "set" + @usableFromInline static let signal: JSString = "signal" + @usableFromInline static let status: JSString = "status" + @usableFromInline static let statusText: JSString = "statusText" + @usableFromInline static let text: JSString = "text" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let type: JSString = "type" + @usableFromInline static let url: JSString = "url" + @usableFromInline static let window: JSString = "window" +} + +public protocol Any_HeadersInit: ConvertibleToJSValue {} +extension Dictionary: Any_HeadersInit where Key == String, Value == String {} +extension Array: Any_HeadersInit where Element == [String] {} + +public enum HeadersInit: JSValueCompatible, Any_HeadersInit { + case record_String_to_String([String: String]) + case seq_of_seq_of_String([[String]]) + + var record_String_to_String: [String: String]? { + switch self { + case let .record_String_to_String(record_String_to_String): return record_String_to_String + default: return nil + } + } + + var seq_of_seq_of_String: [[String]]? { + switch self { + case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let record_String_to_String: [String: String] = value.fromJSValue() { + return .record_String_to_String(record_String_to_String) + } + if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { + return .seq_of_seq_of_String(seq_of_seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .record_String_to_String(record_String_to_String): + return record_String_to_String.jsValue + case let .seq_of_seq_of_String(seq_of_seq_of_String): + return seq_of_seq_of_String.jsValue + } + } +} + +public protocol Any_RequestInfo: ConvertibleToJSValue {} +extension Request: Any_RequestInfo {} +extension String: Any_RequestInfo {} + +public enum RequestInfo: JSValueCompatible, Any_RequestInfo { + case request(Request) + case string(String) + + var request: Request? { + switch self { + case let .request(request): return request + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let request: Request = value.fromJSValue() { + return .request(request) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .request(request): + return request.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} +extension Blob: Any_XMLHttpRequestBodyInit {} +extension BufferSource: Any_XMLHttpRequestBodyInit {} +extension FormData: Any_XMLHttpRequestBodyInit {} +extension String: Any_XMLHttpRequestBodyInit {} +extension URLSearchParams: Any_XMLHttpRequestBodyInit {} + +public enum XMLHttpRequestBodyInit: JSValueCompatible, Any_XMLHttpRequestBodyInit { + case blob(Blob) + case bufferSource(BufferSource) + case formData(FormData) + case string(String) + case urlSearchParams(URLSearchParams) + + var blob: Blob? { + switch self { + case let .blob(blob): return blob + default: return nil + } + } + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var formData: FormData? { + switch self { + case let .formData(formData): return formData + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var urlSearchParams: URLSearchParams? { + switch self { + case let .urlSearchParams(urlSearchParams): return urlSearchParams + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let blob: Blob = value.fromJSValue() { + return .blob(blob) + } + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let formData: FormData = value.fromJSValue() { + return .formData(formData) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + if let urlSearchParams: URLSearchParams = value.fromJSValue() { + return .urlSearchParams(urlSearchParams) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .blob(blob): + return blob.jsValue + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .formData(formData): + return formData.jsValue + case let .string(string): + return string.jsValue + case let .urlSearchParams(urlSearchParams): + return urlSearchParams.jsValue + } + } +} From 4523a381785af4fa9af6e26d21fb3a8316b07c47 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 05:01:07 +0900 Subject: [PATCH 10/24] NFC: Record 'partial' interface while merging --- Sources/WebIDLToSwift/MergeDeclarations.swift | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Sources/WebIDLToSwift/MergeDeclarations.swift b/Sources/WebIDLToSwift/MergeDeclarations.swift index 991c11ef..f0ad3d74 100644 --- a/Sources/WebIDLToSwift/MergeDeclarations.swift +++ b/Sources/WebIDLToSwift/MergeDeclarations.swift @@ -52,19 +52,13 @@ enum DeclarationMerger { byType[T.type]?.map { $0 as! T } ?? [] } - let mixins = Dictionary( - grouping: all(IDLInterfaceMixin.self).map { - MergedMixin( - name: $0.name, - members: addAsync($0.members.array) as! [IDLInterfaceMixinMember] - ) - }, - by: \.name - ).mapValues { - $0.dropFirst().reduce(into: $0.first!) { partialResult, mixin in - partialResult.members += mixin.members + let mixins = Dictionary(grouping: all(IDLInterfaceMixin.self), by: \.name) + .mapValues { + return MergedMixin( + name: $0.first!.name, + partial: $0.reduce(true) { $0 && $1.partial }, + members: $0.flatMap { addAsync($0.members.array) as! [IDLInterfaceMixinMember] }) } - } let includes = Dictionary(grouping: all(IDLIncludes.self)) { $0.target } .mapValues { $0.map(\.includes).filter { !Self.ignoredParents.contains($0) } } @@ -209,6 +203,7 @@ struct MergedNamespace: DeclarationFile { struct MergedMixin: DeclarationFile { let name: String + let partial: Bool var members: [IDLInterfaceMixinMember] } From 923e9a3d240d0287c40b67311fdb09298627cad0 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 05:30:54 +0900 Subject: [PATCH 11/24] Don't declare protocol when it's partial interface mixin --- Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift index 0a5c4005..52568878 100644 --- a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift +++ b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift @@ -245,8 +245,9 @@ extension IDLSetLikeDeclaration: SwiftRepresentable, Initializable { extension MergedMixin: SwiftRepresentable { var swiftRepresentation: SwiftSource { Context.withState(.instance(constructor: nil, this: "jsObject", className: "\(name)", inProtocol: true)) { - """ - public protocol \(name): JSBridgedClass {} + let decl = "public protocol \(name): JSBridgedClass {}" + return """ + \(partial ? "" : decl) public extension \(name) { \(members.map(toSwift).joined(separator: "\n\n")) } From 8827cf802ee491409ad510b3b5a4b9d9532e9181 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 06:01:48 +0900 Subject: [PATCH 12/24] WIP --- Sources/DOMKitFetch/Support.swift | 2 + Sources/DOMKitHTML/DOM.swift | 2334 ++++++ Sources/DOMKitHTML/DOMKitHTML.swift | 9382 ++++++++++++++++++++++++ Sources/DOMKitHTML/ServiceWorker.swift | 697 ++ Sources/DOMKitHTML/Support.swift | 4 + 5 files changed, 12419 insertions(+) create mode 100644 Sources/DOMKitFetch/Support.swift create mode 100644 Sources/DOMKitHTML/DOM.swift create mode 100644 Sources/DOMKitHTML/DOMKitHTML.swift create mode 100644 Sources/DOMKitHTML/ServiceWorker.swift create mode 100644 Sources/DOMKitHTML/Support.swift diff --git a/Sources/DOMKitFetch/Support.swift b/Sources/DOMKitFetch/Support.swift new file mode 100644 index 00000000..2c2778f8 --- /dev/null +++ b/Sources/DOMKitFetch/Support.swift @@ -0,0 +1,2 @@ +@_exported import ECMAScript +@_exported import DOMKitHTML diff --git a/Sources/DOMKitHTML/DOM.swift b/Sources/DOMKitHTML/DOM.swift new file mode 100644 index 00000000..3880d673 --- /dev/null +++ b/Sources/DOMKitHTML/DOM.swift @@ -0,0 +1,2334 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AbortController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.AbortController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _signal = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.signal) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func abort(reason: JSValue? = nil) { + let this = jsObject + _ = this[DOMStrings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + } +} + +public class AbortSignal: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.AbortSignal].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _aborted = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.aborted) + _reason = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.reason) + _onabort = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.onabort) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public static func abort(reason: JSValue? = nil) -> Self { + let this = constructor + return this[DOMStrings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func timeout(milliseconds: UInt64) -> Self { + let this = constructor + return this[DOMStrings.timeout].function!(this: this, arguments: [milliseconds.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var aborted: Bool + + @ReadonlyAttribute + public var reason: JSValue + + @inlinable public func throwIfAborted() { + let this = jsObject + _ = this[DOMStrings.throwIfAborted].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var onabort: EventHandler +} + +public class AbstractRange: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.AbstractRange].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _startContainer = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.startContainer) + _startOffset = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.startOffset) + _endContainer = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.endContainer) + _endOffset = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.endOffset) + _collapsed = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.collapsed) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var startContainer: Node + + @ReadonlyAttribute + public var startOffset: UInt32 + + @ReadonlyAttribute + public var endContainer: Node + + @ReadonlyAttribute + public var endOffset: UInt32 + + @ReadonlyAttribute + public var collapsed: Bool +} + +public class AddEventListenerOptions: BridgedDictionary { + public convenience init(passive: Bool, once: Bool, signal: AbortSignal) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.passive] = passive.jsValue + object[DOMStrings.once] = once.jsValue + object[DOMStrings.signal] = signal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _passive = ReadWriteAttribute(jsObject: object, name: DOMStrings.passive) + _once = ReadWriteAttribute(jsObject: object, name: DOMStrings.once) + _signal = ReadWriteAttribute(jsObject: object, name: DOMStrings.signal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var passive: Bool + + @ReadWriteAttribute + public var once: Bool + + @ReadWriteAttribute + public var signal: AbortSignal +} + +public class Attr: Node { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Attr].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.namespaceURI) + _prefix = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.prefix) + _localName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.localName) + _name = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.name) + _value = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.value) + _ownerElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.ownerElement) + _specified = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.specified) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var namespaceURI: String? + + @ReadonlyAttribute + public var prefix: String? + + @ReadonlyAttribute + public var localName: String + + @ReadonlyAttribute + public var name: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var ownerElement: Element? + + @ReadonlyAttribute + public var specified: Bool +} + +public class CDATASection: Text { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.CDATASection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.CharacterData].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.data) + _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var data: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { + let this = jsObject + return this[DOMStrings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! + } + + @inlinable public func appendData(data: String) { + let this = jsObject + _ = this[DOMStrings.appendData].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func insertData(offset: UInt32, data: String) { + let this = jsObject + _ = this[DOMStrings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) + } + + @inlinable public func deleteData(offset: UInt32, count: UInt32) { + let this = jsObject + _ = this[DOMStrings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) + } + + @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { + let this = jsObject + _ = this[DOMStrings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) + } +} + +public protocol ChildNode: JSBridgedClass {} +public extension ChildNode { + @inlinable func before(nodes: Node_or_String...) { + let this = jsObject + _ = this[DOMStrings.before].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func after(nodes: Node_or_String...) { + let this = jsObject + _ = this[DOMStrings.after].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceWith(nodes: Node_or_String...) { + let this = jsObject + _ = this[DOMStrings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func remove() { + let this = jsObject + _ = this[DOMStrings.remove].function!(this: this, arguments: []) + } +} + +public class Comment: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Comment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } +} + +public class CustomEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.CustomEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _detail = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.detail) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var detail: JSValue + + @inlinable public func initCustomEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, detail: JSValue? = nil) { + let this = jsObject + _ = this[DOMStrings.initCustomEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined, detail?.jsValue ?? .undefined]) + } +} + +public class CustomEventInit: BridgedDictionary { + public convenience init(detail: JSValue) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.detail] = detail.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _detail = ReadWriteAttribute(jsObject: object, name: DOMStrings.detail) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var detail: JSValue +} + +public class DOMImplementation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.DOMImplementation].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func createDocumentType(qualifiedName: String, publicId: String, systemId: String) -> DocumentType { + let this = jsObject + return this[DOMStrings.createDocumentType].function!(this: this, arguments: [qualifiedName.jsValue, publicId.jsValue, systemId.jsValue]).fromJSValue()! + } + + @inlinable public func createDocument(namespace: String?, qualifiedName: String, doctype: DocumentType? = nil) -> XMLDocument { + let this = jsObject + return this[DOMStrings.createDocument].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, doctype?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createHTMLDocument(title: String? = nil) -> Document { + let this = jsObject + return this[DOMStrings.createHTMLDocument].function!(this: this, arguments: [title?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func hasFeature() -> Bool { + let this = jsObject + return this[DOMStrings.hasFeature].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMTokenList: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.DOMTokenList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) + _value = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.value) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> String? { + jsObject[key].fromJSValue() + } + + @inlinable public func contains(token: String) -> Bool { + let this = jsObject + return this[DOMStrings.contains].function!(this: this, arguments: [token.jsValue]).fromJSValue()! + } + + @inlinable public func add(tokens: String...) { + let this = jsObject + _ = this[DOMStrings.add].function!(this: this, arguments: tokens.map(\.jsValue)) + } + + @inlinable public func remove(tokens: String...) { + let this = jsObject + _ = this[DOMStrings.remove].function!(this: this, arguments: tokens.map(\.jsValue)) + } + + @inlinable public func toggle(token: String, force: Bool? = nil) -> Bool { + let this = jsObject + return this[DOMStrings.toggle].function!(this: this, arguments: [token.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func replace(token: String, newToken: String) -> Bool { + let this = jsObject + return this[DOMStrings.replace].function!(this: this, arguments: [token.jsValue, newToken.jsValue]).fromJSValue()! + } + + @inlinable public func supports(token: String) -> Bool { + let this = jsObject + return this[DOMStrings.supports].function!(this: this, arguments: [token.jsValue]).fromJSValue()! + } + + @ReadWriteAttribute + public var value: String + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Document].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _implementation = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.implementation) + _URL = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.URL) + _documentURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.documentURI) + _compatMode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.compatMode) + _characterSet = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.characterSet) + _charset = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.charset) + _inputEncoding = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.inputEncoding) + _contentType = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.contentType) + _doctype = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.doctype) + _documentElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.documentElement) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var implementation: DOMImplementation + + @ReadonlyAttribute + public var URL: String + + @ReadonlyAttribute + public var documentURI: String + + @ReadonlyAttribute + public var compatMode: String + + @ReadonlyAttribute + public var characterSet: String + + @ReadonlyAttribute + public var charset: String + + @ReadonlyAttribute + public var inputEncoding: String + + @ReadonlyAttribute + public var contentType: String + + @ReadonlyAttribute + public var doctype: DocumentType? + + @ReadonlyAttribute + public var documentElement: Element? + + @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { + let this = jsObject + return this[DOMStrings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { + let this = jsObject + return this[DOMStrings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { + let this = jsObject + return this[DOMStrings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! + } + + @inlinable public func createElement(localName: String, options: ElementCreationOptions_or_String? = nil) -> Element { + let this = jsObject + return this[DOMStrings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: ElementCreationOptions_or_String? = nil) -> Element { + let this = jsObject + return this[DOMStrings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createDocumentFragment() -> DocumentFragment { + let this = jsObject + return this[DOMStrings.createDocumentFragment].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func createTextNode(data: String) -> Text { + let this = jsObject + return this[DOMStrings.createTextNode].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createCDATASection(data: String) -> CDATASection { + let this = jsObject + return this[DOMStrings.createCDATASection].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createComment(data: String) -> Comment { + let this = jsObject + return this[DOMStrings.createComment].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createProcessingInstruction(target: String, data: String) -> ProcessingInstruction { + let this = jsObject + return this[DOMStrings.createProcessingInstruction].function!(this: this, arguments: [target.jsValue, data.jsValue]).fromJSValue()! + } + + @inlinable public func importNode(node: Node, deep: Bool? = nil) -> Node { + let this = jsObject + return this[DOMStrings.importNode].function!(this: this, arguments: [node.jsValue, deep?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func adoptNode(node: Node) -> Node { + let this = jsObject + return this[DOMStrings.adoptNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public func createAttribute(localName: String) -> Attr { + let this = jsObject + return this[DOMStrings.createAttribute].function!(this: this, arguments: [localName.jsValue]).fromJSValue()! + } + + @inlinable public func createAttributeNS(namespace: String?, qualifiedName: String) -> Attr { + let this = jsObject + return this[DOMStrings.createAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func createEvent(interface: String) -> Event { + let this = jsObject + return this[DOMStrings.createEvent].function!(this: this, arguments: [interface.jsValue]).fromJSValue()! + } + + @inlinable public func createRange() -> Range { + let this = jsObject + return this[DOMStrings.createRange].function!(this: this, arguments: []).fromJSValue()! + } + + // XXX: member 'createNodeIterator' is ignored + + // XXX: member 'createTreeWalker' is ignored +} + +public class DocumentFragment: Node, NonElementParentNode, ParentNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.DocumentFragment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol DocumentOrShadowRoot: JSBridgedClass {} +public extension DocumentOrShadowRoot {} + +public class DocumentType: Node, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.DocumentType].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.name) + _publicId = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.publicId) + _systemId = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.systemId) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var publicId: String + + @ReadonlyAttribute + public var systemId: String +} + +public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Element].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.namespaceURI) + _prefix = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.prefix) + _localName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.localName) + _tagName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.tagName) + _id = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.id) + _className = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.className) + _classList = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.classList) + _slot = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.slot) + _attributes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.attributes) + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.shadowRoot) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var namespaceURI: String? + + @ReadonlyAttribute + public var prefix: String? + + @ReadonlyAttribute + public var localName: String + + @ReadonlyAttribute + public var tagName: String + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var className: String + + @ReadonlyAttribute + public var classList: DOMTokenList + + @ReadWriteAttribute + public var slot: String + + @inlinable public func hasAttributes() -> Bool { + let this = jsObject + return this[DOMStrings.hasAttributes].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var attributes: NamedNodeMap + + @inlinable public func getAttributeNames() -> [String] { + let this = jsObject + return this[DOMStrings.getAttributeNames].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getAttribute(qualifiedName: String) -> String? { + let this = jsObject + return this[DOMStrings.getAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNS(namespace: String?, localName: String) -> String? { + let this = jsObject + return this[DOMStrings.getAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setAttribute(qualifiedName: String, value: String) { + let this = jsObject + _ = this[DOMStrings.setAttribute].function!(this: this, arguments: [qualifiedName.jsValue, value.jsValue]) + } + + @inlinable public func setAttributeNS(namespace: String?, qualifiedName: String, value: String) { + let this = jsObject + _ = this[DOMStrings.setAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, value.jsValue]) + } + + @inlinable public func removeAttribute(qualifiedName: String) { + let this = jsObject + _ = this[DOMStrings.removeAttribute].function!(this: this, arguments: [qualifiedName.jsValue]) + } + + @inlinable public func removeAttributeNS(namespace: String?, localName: String) { + let this = jsObject + _ = this[DOMStrings.removeAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]) + } + + @inlinable public func toggleAttribute(qualifiedName: String, force: Bool? = nil) -> Bool { + let this = jsObject + return this[DOMStrings.toggleAttribute].function!(this: this, arguments: [qualifiedName.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func hasAttribute(qualifiedName: String) -> Bool { + let this = jsObject + return this[DOMStrings.hasAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func hasAttributeNS(namespace: String?, localName: String) -> Bool { + let this = jsObject + return this[DOMStrings.hasAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNode(qualifiedName: String) -> Attr? { + let this = jsObject + return this[DOMStrings.getAttributeNode].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNodeNS(namespace: String?, localName: String) -> Attr? { + let this = jsObject + return this[DOMStrings.getAttributeNodeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setAttributeNode(attr: Attr) -> Attr? { + let this = jsObject + return this[DOMStrings.setAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func setAttributeNodeNS(attr: Attr) -> Attr? { + let this = jsObject + return this[DOMStrings.setAttributeNodeNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func removeAttributeNode(attr: Attr) -> Attr { + let this = jsObject + return this[DOMStrings.removeAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func attachShadow(init: ShadowRootInit) -> ShadowRoot { + let this = jsObject + return this[DOMStrings.attachShadow].function!(this: this, arguments: [`init`.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func closest(selectors: String) -> Element? { + let this = jsObject + return this[DOMStrings.closest].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func matches(selectors: String) -> Bool { + let this = jsObject + return this[DOMStrings.matches].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func webkitMatchesSelector(selectors: String) -> Bool { + let this = jsObject + return this[DOMStrings.webkitMatchesSelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { + let this = jsObject + return this[DOMStrings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { + let this = jsObject + return this[DOMStrings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { + let this = jsObject + return this[DOMStrings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! + } + + @inlinable public func insertAdjacentElement(where: String, element: Element) -> Element? { + let this = jsObject + return this[DOMStrings.insertAdjacentElement].function!(this: this, arguments: [`where`.jsValue, element.jsValue]).fromJSValue()! + } + + @inlinable public func insertAdjacentText(where: String, data: String) { + let this = jsObject + _ = this[DOMStrings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) + } +} + +public class ElementCreationOptions: BridgedDictionary { + public convenience init(is: String) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.is] = `is`.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _is = ReadWriteAttribute(jsObject: object, name: DOMStrings.is) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var `is`: String +} + +public class Event: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.Event].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.type) + _target = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.target) + _srcElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.srcElement) + _currentTarget = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.currentTarget) + _eventPhase = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.eventPhase) + _cancelBubble = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.cancelBubble) + _bubbles = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.bubbles) + _cancelable = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.cancelable) + _returnValue = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.returnValue) + _defaultPrevented = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.defaultPrevented) + _composed = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.composed) + _isTrusted = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.isTrusted) + _timeStamp = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.timeStamp) + self.jsObject = jsObject + } + + @inlinable public convenience init(type: String, eventInitDict: EventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var target: EventTarget? + + @ReadonlyAttribute + public var srcElement: EventTarget? + + @ReadonlyAttribute + public var currentTarget: EventTarget? + + @inlinable public func composedPath() -> [EventTarget] { + let this = jsObject + return this[DOMStrings.composedPath].function!(this: this, arguments: []).fromJSValue()! + } + + public static let NONE: UInt16 = 0 + + public static let CAPTURING_PHASE: UInt16 = 1 + + public static let AT_TARGET: UInt16 = 2 + + public static let BUBBLING_PHASE: UInt16 = 3 + + @ReadonlyAttribute + public var eventPhase: UInt16 + + @inlinable public func stopPropagation() { + let this = jsObject + _ = this[DOMStrings.stopPropagation].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var cancelBubble: Bool + + @inlinable public func stopImmediatePropagation() { + let this = jsObject + _ = this[DOMStrings.stopImmediatePropagation].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var bubbles: Bool + + @ReadonlyAttribute + public var cancelable: Bool + + @ReadWriteAttribute + public var returnValue: Bool + + @inlinable public func preventDefault() { + let this = jsObject + _ = this[DOMStrings.preventDefault].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var defaultPrevented: Bool + + @ReadonlyAttribute + public var composed: Bool + + @ReadonlyAttribute + public var isTrusted: Bool + + @ReadonlyAttribute + public var timeStamp: DOMHighResTimeStamp + + @inlinable public func initEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil) { + let this = jsObject + _ = this[DOMStrings.initEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined]) + } +} + +public class EventInit: BridgedDictionary { + public convenience init(bubbles: Bool, cancelable: Bool, composed: Bool) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.bubbles] = bubbles.jsValue + object[DOMStrings.cancelable] = cancelable.jsValue + object[DOMStrings.composed] = composed.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _bubbles = ReadWriteAttribute(jsObject: object, name: DOMStrings.bubbles) + _cancelable = ReadWriteAttribute(jsObject: object, name: DOMStrings.cancelable) + _composed = ReadWriteAttribute(jsObject: object, name: DOMStrings.composed) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var bubbles: Bool + + @ReadWriteAttribute + public var cancelable: Bool + + @ReadWriteAttribute + public var composed: Bool +} + +public class EventListenerOptions: BridgedDictionary { + public convenience init(capture: Bool) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.capture] = capture.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _capture = ReadWriteAttribute(jsObject: object, name: DOMStrings.capture) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var capture: Bool +} + +public class EventTarget: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.EventTarget].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + // XXX: member 'addEventListener' is ignored + + // XXX: member 'removeEventListener' is ignored + + @inlinable public func dispatchEvent(event: Event) -> Bool { + let this = jsObject + return this[DOMStrings.dispatchEvent].function!(this: this, arguments: [event.jsValue]).fromJSValue()! + } +} + +public class GetRootNodeOptions: BridgedDictionary { + public convenience init(composed: Bool) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.composed] = composed.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _composed = ReadWriteAttribute(jsObject: object, name: DOMStrings.composed) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var composed: Bool +} + +public class HTMLCollection: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.HTMLCollection].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Element? { + jsObject[key].fromJSValue() + } +} + +public class MutationObserver: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.MutationObserver].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + // XXX: constructor is ignored + + @inlinable public func observe(target: Node, options: MutationObserverInit? = nil) { + let this = jsObject + _ = this[DOMStrings.observe].function!(this: this, arguments: [target.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func disconnect() { + let this = jsObject + _ = this[DOMStrings.disconnect].function!(this: this, arguments: []) + } + + @inlinable public func takeRecords() -> [MutationRecord] { + let this = jsObject + return this[DOMStrings.takeRecords].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class MutationObserverInit: BridgedDictionary { + public convenience init(childList: Bool, attributes: Bool, characterData: Bool, subtree: Bool, attributeOldValue: Bool, characterDataOldValue: Bool, attributeFilter: [String]) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.childList] = childList.jsValue + object[DOMStrings.attributes] = attributes.jsValue + object[DOMStrings.characterData] = characterData.jsValue + object[DOMStrings.subtree] = subtree.jsValue + object[DOMStrings.attributeOldValue] = attributeOldValue.jsValue + object[DOMStrings.characterDataOldValue] = characterDataOldValue.jsValue + object[DOMStrings.attributeFilter] = attributeFilter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _childList = ReadWriteAttribute(jsObject: object, name: DOMStrings.childList) + _attributes = ReadWriteAttribute(jsObject: object, name: DOMStrings.attributes) + _characterData = ReadWriteAttribute(jsObject: object, name: DOMStrings.characterData) + _subtree = ReadWriteAttribute(jsObject: object, name: DOMStrings.subtree) + _attributeOldValue = ReadWriteAttribute(jsObject: object, name: DOMStrings.attributeOldValue) + _characterDataOldValue = ReadWriteAttribute(jsObject: object, name: DOMStrings.characterDataOldValue) + _attributeFilter = ReadWriteAttribute(jsObject: object, name: DOMStrings.attributeFilter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var childList: Bool + + @ReadWriteAttribute + public var attributes: Bool + + @ReadWriteAttribute + public var characterData: Bool + + @ReadWriteAttribute + public var subtree: Bool + + @ReadWriteAttribute + public var attributeOldValue: Bool + + @ReadWriteAttribute + public var characterDataOldValue: Bool + + @ReadWriteAttribute + public var attributeFilter: [String] +} + +public class MutationRecord: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.MutationRecord].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.type) + _target = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.target) + _addedNodes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.addedNodes) + _removedNodes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.removedNodes) + _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.previousSibling) + _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nextSibling) + _attributeName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.attributeName) + _attributeNamespace = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.attributeNamespace) + _oldValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.oldValue) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var target: Node + + @ReadonlyAttribute + public var addedNodes: NodeList + + @ReadonlyAttribute + public var removedNodes: NodeList + + @ReadonlyAttribute + public var previousSibling: Node? + + @ReadonlyAttribute + public var nextSibling: Node? + + @ReadonlyAttribute + public var attributeName: String? + + @ReadonlyAttribute + public var attributeNamespace: String? + + @ReadonlyAttribute + public var oldValue: String? +} + +public class NamedNodeMap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.NamedNodeMap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Attr? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Attr? { + jsObject[key].fromJSValue() + } + + @inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? { + let this = jsObject + return this[DOMStrings.getNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setNamedItem(attr: Attr) -> Attr? { + let this = jsObject + return this[DOMStrings.setNamedItem].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func setNamedItemNS(attr: Attr) -> Attr? { + let this = jsObject + return this[DOMStrings.setNamedItemNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func removeNamedItem(qualifiedName: String) -> Attr { + let this = jsObject + return this[DOMStrings.removeNamedItem].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func removeNamedItemNS(namespace: String?, localName: String) -> Attr { + let this = jsObject + return this[DOMStrings.removeNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } +} + +public class Node: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Node].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _nodeType = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nodeType) + _nodeName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nodeName) + _baseURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.baseURI) + _isConnected = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.isConnected) + _ownerDocument = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.ownerDocument) + _parentNode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.parentNode) + _parentElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.parentElement) + _childNodes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.childNodes) + _firstChild = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.firstChild) + _lastChild = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.lastChild) + _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.previousSibling) + _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nextSibling) + _nodeValue = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.nodeValue) + _textContent = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.textContent) + super.init(unsafelyWrapping: jsObject) + } + + public static let ELEMENT_NODE: UInt16 = 1 + + public static let ATTRIBUTE_NODE: UInt16 = 2 + + public static let TEXT_NODE: UInt16 = 3 + + public static let CDATA_SECTION_NODE: UInt16 = 4 + + public static let ENTITY_REFERENCE_NODE: UInt16 = 5 + + public static let ENTITY_NODE: UInt16 = 6 + + public static let PROCESSING_INSTRUCTION_NODE: UInt16 = 7 + + public static let COMMENT_NODE: UInt16 = 8 + + public static let DOCUMENT_NODE: UInt16 = 9 + + public static let DOCUMENT_TYPE_NODE: UInt16 = 10 + + public static let DOCUMENT_FRAGMENT_NODE: UInt16 = 11 + + public static let NOTATION_NODE: UInt16 = 12 + + @ReadonlyAttribute + public var nodeType: UInt16 + + @ReadonlyAttribute + public var nodeName: String + + @ReadonlyAttribute + public var baseURI: String + + @ReadonlyAttribute + public var isConnected: Bool + + @ReadonlyAttribute + public var ownerDocument: Document? + + @inlinable public func getRootNode(options: GetRootNodeOptions? = nil) -> Self { + let this = jsObject + return this[DOMStrings.getRootNode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var parentNode: Node? + + @ReadonlyAttribute + public var parentElement: Element? + + @inlinable public func hasChildNodes() -> Bool { + let this = jsObject + return this[DOMStrings.hasChildNodes].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var childNodes: NodeList + + @ReadonlyAttribute + public var firstChild: Node? + + @ReadonlyAttribute + public var lastChild: Node? + + @ReadonlyAttribute + public var previousSibling: Node? + + @ReadonlyAttribute + public var nextSibling: Node? + + @ReadWriteAttribute + public var nodeValue: String? + + @ReadWriteAttribute + public var textContent: String? + + @inlinable public func normalize() { + let this = jsObject + _ = this[DOMStrings.normalize].function!(this: this, arguments: []) + } + + @inlinable public func cloneNode(deep: Bool? = nil) -> Self { + let this = jsObject + return this[DOMStrings.cloneNode].function!(this: this, arguments: [deep?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func isEqualNode(otherNode: Node?) -> Bool { + let this = jsObject + return this[DOMStrings.isEqualNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! + } + + @inlinable public func isSameNode(otherNode: Node?) -> Bool { + let this = jsObject + return this[DOMStrings.isSameNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! + } + + public static let DOCUMENT_POSITION_DISCONNECTED: UInt16 = 0x01 + + public static let DOCUMENT_POSITION_PRECEDING: UInt16 = 0x02 + + public static let DOCUMENT_POSITION_FOLLOWING: UInt16 = 0x04 + + public static let DOCUMENT_POSITION_CONTAINS: UInt16 = 0x08 + + public static let DOCUMENT_POSITION_CONTAINED_BY: UInt16 = 0x10 + + public static let DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: UInt16 = 0x20 + + @inlinable public func compareDocumentPosition(other: Node) -> UInt16 { + let this = jsObject + return this[DOMStrings.compareDocumentPosition].function!(this: this, arguments: [other.jsValue]).fromJSValue()! + } + + @inlinable public func contains(other: Node?) -> Bool { + let this = jsObject + return this[DOMStrings.contains].function!(this: this, arguments: [other.jsValue]).fromJSValue()! + } + + @inlinable public func lookupPrefix(namespace: String?) -> String? { + let this = jsObject + return this[DOMStrings.lookupPrefix].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! + } + + @inlinable public func lookupNamespaceURI(prefix: String?) -> String? { + let this = jsObject + return this[DOMStrings.lookupNamespaceURI].function!(this: this, arguments: [prefix.jsValue]).fromJSValue()! + } + + @inlinable public func isDefaultNamespace(namespace: String?) -> Bool { + let this = jsObject + return this[DOMStrings.isDefaultNamespace].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! + } + + @inlinable public func insertBefore(node: Node, child: Node?) -> Self { + let this = jsObject + return this[DOMStrings.insertBefore].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! + } + + @inlinable public func appendChild(node: Node) -> Self { + let this = jsObject + return this[DOMStrings.appendChild].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public func replaceChild(node: Node, child: Node) -> Self { + let this = jsObject + return this[DOMStrings.replaceChild].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! + } + + @inlinable public func removeChild(child: Node) -> Self { + let this = jsObject + return this[DOMStrings.removeChild].function!(this: this, arguments: [child.jsValue]).fromJSValue()! + } +} + +public class NodeIterator: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.NodeIterator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _root = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.root) + _referenceNode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.referenceNode) + _pointerBeforeReferenceNode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.pointerBeforeReferenceNode) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.whatToShow) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var root: Node + + @ReadonlyAttribute + public var referenceNode: Node + + @ReadonlyAttribute + public var pointerBeforeReferenceNode: Bool + + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[DOMStrings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[DOMStrings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func detach() { + let this = jsObject + _ = this[DOMStrings.detach].function!(this: this, arguments: []) + } +} + +public class NodeList: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.NodeList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> Node? { + jsObject[key].fromJSValue() + } + + @ReadonlyAttribute + public var length: UInt32 + + public typealias Element = Node + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public protocol NonDocumentTypeChildNode: JSBridgedClass {} +public extension NonDocumentTypeChildNode { + @inlinable var previousElementSibling: Element? { ReadonlyAttribute[DOMStrings.previousElementSibling, in: jsObject] } + + @inlinable var nextElementSibling: Element? { ReadonlyAttribute[DOMStrings.nextElementSibling, in: jsObject] } +} + +public protocol NonElementParentNode: JSBridgedClass {} +public extension NonElementParentNode { + @inlinable func getElementById(elementId: String) -> Element? { + let this = jsObject + return this[DOMStrings.getElementById].function!(this: this, arguments: [elementId.jsValue]).fromJSValue()! + } +} + +public protocol ParentNode: JSBridgedClass {} +public extension ParentNode { + @inlinable var children: HTMLCollection { ReadonlyAttribute[DOMStrings.children, in: jsObject] } + + @inlinable var firstElementChild: Element? { ReadonlyAttribute[DOMStrings.firstElementChild, in: jsObject] } + + @inlinable var lastElementChild: Element? { ReadonlyAttribute[DOMStrings.lastElementChild, in: jsObject] } + + @inlinable var childElementCount: UInt32 { ReadonlyAttribute[DOMStrings.childElementCount, in: jsObject] } + + @inlinable func prepend(nodes: Node_or_String...) { + let this = jsObject + _ = this[DOMStrings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func append(nodes: Node_or_String...) { + let this = jsObject + _ = this[DOMStrings.append].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceChildren(nodes: Node_or_String...) { + let this = jsObject + _ = this[DOMStrings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func querySelector(selectors: String) -> Element? { + let this = jsObject + return this[DOMStrings.querySelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable func querySelectorAll(selectors: String) -> NodeList { + let this = jsObject + return this[DOMStrings.querySelectorAll].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } +} + +public class ProcessingInstruction: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.ProcessingInstruction].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.target) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var target: String +} + +public class Range: AbstractRange { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Range].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _commonAncestorContainer = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.commonAncestorContainer) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var commonAncestorContainer: Node + + @inlinable public func setStart(node: Node, offset: UInt32) { + let this = jsObject + _ = this[DOMStrings.setStart].function!(this: this, arguments: [node.jsValue, offset.jsValue]) + } + + @inlinable public func setEnd(node: Node, offset: UInt32) { + let this = jsObject + _ = this[DOMStrings.setEnd].function!(this: this, arguments: [node.jsValue, offset.jsValue]) + } + + @inlinable public func setStartBefore(node: Node) { + let this = jsObject + _ = this[DOMStrings.setStartBefore].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setStartAfter(node: Node) { + let this = jsObject + _ = this[DOMStrings.setStartAfter].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setEndBefore(node: Node) { + let this = jsObject + _ = this[DOMStrings.setEndBefore].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setEndAfter(node: Node) { + let this = jsObject + _ = this[DOMStrings.setEndAfter].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func collapse(toStart: Bool? = nil) { + let this = jsObject + _ = this[DOMStrings.collapse].function!(this: this, arguments: [toStart?.jsValue ?? .undefined]) + } + + @inlinable public func selectNode(node: Node) { + let this = jsObject + _ = this[DOMStrings.selectNode].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func selectNodeContents(node: Node) { + let this = jsObject + _ = this[DOMStrings.selectNodeContents].function!(this: this, arguments: [node.jsValue]) + } + + public static let START_TO_START: UInt16 = 0 + + public static let START_TO_END: UInt16 = 1 + + public static let END_TO_END: UInt16 = 2 + + public static let END_TO_START: UInt16 = 3 + + @inlinable public func compareBoundaryPoints(how: UInt16, sourceRange: Range) -> Int16 { + let this = jsObject + return this[DOMStrings.compareBoundaryPoints].function!(this: this, arguments: [how.jsValue, sourceRange.jsValue]).fromJSValue()! + } + + @inlinable public func deleteContents() { + let this = jsObject + _ = this[DOMStrings.deleteContents].function!(this: this, arguments: []) + } + + @inlinable public func extractContents() -> DocumentFragment { + let this = jsObject + return this[DOMStrings.extractContents].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func cloneContents() -> DocumentFragment { + let this = jsObject + return this[DOMStrings.cloneContents].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func insertNode(node: Node) { + let this = jsObject + _ = this[DOMStrings.insertNode].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func surroundContents(newParent: Node) { + let this = jsObject + _ = this[DOMStrings.surroundContents].function!(this: this, arguments: [newParent.jsValue]) + } + + @inlinable public func cloneRange() -> Self { + let this = jsObject + return this[DOMStrings.cloneRange].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func detach() { + let this = jsObject + _ = this[DOMStrings.detach].function!(this: this, arguments: []) + } + + @inlinable public func isPointInRange(node: Node, offset: UInt32) -> Bool { + let this = jsObject + return this[DOMStrings.isPointInRange].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! + } + + @inlinable public func comparePoint(node: Node, offset: UInt32) -> Int16 { + let this = jsObject + return this[DOMStrings.comparePoint].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! + } + + @inlinable public func intersectsNode(node: Node) -> Bool { + let this = jsObject + return this[DOMStrings.intersectsNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } +} + +public class ShadowRoot: DocumentFragment, DocumentOrShadowRoot { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.ShadowRoot].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _mode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.mode) + _delegatesFocus = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.delegatesFocus) + _slotAssignment = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.slotAssignment) + _host = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.host) + _onslotchange = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.onslotchange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var mode: ShadowRootMode + + @ReadonlyAttribute + public var delegatesFocus: Bool + + @ReadonlyAttribute + public var slotAssignment: SlotAssignmentMode + + @ReadonlyAttribute + public var host: Element + + @ReadWriteAttribute + public var onslotchange: EventHandler +} + +public class ShadowRootInit: BridgedDictionary { + public convenience init(mode: ShadowRootMode, delegatesFocus: Bool, slotAssignment: SlotAssignmentMode) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.mode] = mode.jsValue + object[DOMStrings.delegatesFocus] = delegatesFocus.jsValue + object[DOMStrings.slotAssignment] = slotAssignment.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mode = ReadWriteAttribute(jsObject: object, name: DOMStrings.mode) + _delegatesFocus = ReadWriteAttribute(jsObject: object, name: DOMStrings.delegatesFocus) + _slotAssignment = ReadWriteAttribute(jsObject: object, name: DOMStrings.slotAssignment) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mode: ShadowRootMode + + @ReadWriteAttribute + public var delegatesFocus: Bool + + @ReadWriteAttribute + public var slotAssignment: SlotAssignmentMode +} + +public enum ShadowRootMode: JSString, JSValueCompatible { + case open = "open" + case closed = "closed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum SlotAssignmentMode: JSString, JSValueCompatible { + case manual = "manual" + case named = "named" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol Slottable: JSBridgedClass {} +public extension Slottable { + @inlinable var assignedSlot: HTMLSlotElement? { ReadonlyAttribute[DOMStrings.assignedSlot, in: jsObject] } +} + +public class StaticRange: AbstractRange { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.StaticRange].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(init: StaticRangeInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } +} + +public class StaticRangeInit: BridgedDictionary { + public convenience init(startContainer: Node, startOffset: UInt32, endContainer: Node, endOffset: UInt32) { + let object = JSObject.global[DOMStrings.Object].function!.new() + object[DOMStrings.startContainer] = startContainer.jsValue + object[DOMStrings.startOffset] = startOffset.jsValue + object[DOMStrings.endContainer] = endContainer.jsValue + object[DOMStrings.endOffset] = endOffset.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _startContainer = ReadWriteAttribute(jsObject: object, name: DOMStrings.startContainer) + _startOffset = ReadWriteAttribute(jsObject: object, name: DOMStrings.startOffset) + _endContainer = ReadWriteAttribute(jsObject: object, name: DOMStrings.endContainer) + _endOffset = ReadWriteAttribute(jsObject: object, name: DOMStrings.endOffset) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var startContainer: Node + + @ReadWriteAttribute + public var startOffset: UInt32 + + @ReadWriteAttribute + public var endContainer: Node + + @ReadWriteAttribute + public var endOffset: UInt32 +} + +public class Text: CharacterData, Slottable { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Text].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _wholeText = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.wholeText) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } + + @inlinable public func splitText(offset: UInt32) -> Self { + let this = jsObject + return this[DOMStrings.splitText].function!(this: this, arguments: [offset.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var wholeText: String +} + +public class TreeWalker: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.TreeWalker].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _root = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.root) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.whatToShow) + _currentNode = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.currentNode) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var root: Node + + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @ReadWriteAttribute + public var currentNode: Node + + @inlinable public func parentNode() -> Node? { + let this = jsObject + return this[DOMStrings.parentNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func firstChild() -> Node? { + let this = jsObject + return this[DOMStrings.firstChild].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func lastChild() -> Node? { + let this = jsObject + return this[DOMStrings.lastChild].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousSibling() -> Node? { + let this = jsObject + return this[DOMStrings.previousSibling].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextSibling() -> Node? { + let this = jsObject + return this[DOMStrings.nextSibling].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[DOMStrings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[DOMStrings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } +} + +public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void +public class XMLDocument: Document { + @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.XMLDocument].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class XPathEvaluator: JSBridgedClass, XPathEvaluatorBase { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XPathEvaluator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol XPathEvaluatorBase: JSBridgedClass {} +public extension XPathEvaluatorBase { + // XXX: method 'createExpression' is ignored + + // XXX: method 'createNSResolver' is ignored + + // XXX: method 'evaluate' is ignored +} + +public class XPathExpression: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XPathExpression].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func evaluate(contextNode: Node, type: UInt16? = nil, result: XPathResult? = nil) -> XPathResult { + let this = jsObject + return this[DOMStrings.evaluate].function!(this: this, arguments: [contextNode.jsValue, type?.jsValue ?? .undefined, result?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class XPathResult: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XPathResult].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _resultType = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.resultType) + _numberValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.numberValue) + _stringValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.stringValue) + _booleanValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.booleanValue) + _singleNodeValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.singleNodeValue) + _invalidIteratorState = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.invalidIteratorState) + _snapshotLength = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.snapshotLength) + self.jsObject = jsObject + } + + public static let ANY_TYPE: UInt16 = 0 + + public static let NUMBER_TYPE: UInt16 = 1 + + public static let STRING_TYPE: UInt16 = 2 + + public static let BOOLEAN_TYPE: UInt16 = 3 + + public static let UNORDERED_NODE_ITERATOR_TYPE: UInt16 = 4 + + public static let ORDERED_NODE_ITERATOR_TYPE: UInt16 = 5 + + public static let UNORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 6 + + public static let ORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 7 + + public static let ANY_UNORDERED_NODE_TYPE: UInt16 = 8 + + public static let FIRST_ORDERED_NODE_TYPE: UInt16 = 9 + + @ReadonlyAttribute + public var resultType: UInt16 + + @ReadonlyAttribute + public var numberValue: Double + + @ReadonlyAttribute + public var stringValue: String + + @ReadonlyAttribute + public var booleanValue: Bool + + @ReadonlyAttribute + public var singleNodeValue: Node? + + @ReadonlyAttribute + public var invalidIteratorState: Bool + + @ReadonlyAttribute + public var snapshotLength: UInt32 + + @inlinable public func iterateNext() -> Node? { + let this = jsObject + return this[DOMStrings.iterateNext].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func snapshotItem(index: UInt32) -> Node? { + let this = jsObject + return this[DOMStrings.snapshotItem].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public class XSLTProcessor: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XSLTProcessor].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func importStylesheet(style: Node) { + let this = jsObject + _ = this[DOMStrings.importStylesheet].function!(this: this, arguments: [style.jsValue]) + } + + @inlinable public func transformToFragment(source: Node, output: Document) -> DocumentFragment { + let this = jsObject + return this[DOMStrings.transformToFragment].function!(this: this, arguments: [source.jsValue, output.jsValue]).fromJSValue()! + } + + @inlinable public func transformToDocument(source: Node) -> Document { + let this = jsObject + return this[DOMStrings.transformToDocument].function!(this: this, arguments: [source.jsValue]).fromJSValue()! + } + + @inlinable public func setParameter(namespaceURI: String, localName: String, value: JSValue) { + let this = jsObject + _ = this[DOMStrings.setParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue, value.jsValue]) + } + + @inlinable public func getParameter(namespaceURI: String, localName: String) -> JSValue { + let this = jsObject + return this[DOMStrings.getParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func removeParameter(namespaceURI: String, localName: String) { + let this = jsObject + _ = this[DOMStrings.removeParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]) + } + + @inlinable public func clearParameters() { + let this = jsObject + _ = this[DOMStrings.clearParameters].function!(this: this, arguments: []) + } + + @inlinable public func reset() { + let this = jsObject + _ = this[DOMStrings.reset].function!(this: this, arguments: []) + } +} + +/* variadic generics please */ +@propertyWrapper public final class ClosureAttribute2OptionalVoid + where A0: JSValueCompatible, A1: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0, A1) -> Void)? { + get { ClosureAttribute2OptionalVoid[name, in: jsObject] } + set { ClosureAttribute2OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue) } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute2Void + where A0: JSValueCompatible, A1: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0, A1) -> Void { + get { ClosureAttribute2Void[name, in: jsObject] } + set { ClosureAttribute2Void[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> Void { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue) } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) + return .undefined + }.jsValue + } + } +} + +@usableFromInline enum DOMStrings { + static let _self: JSString = "self" + @usableFromInline static let AbortController: JSString = "AbortController" + @usableFromInline static let AbortSignal: JSString = "AbortSignal" + @usableFromInline static let AbstractRange: JSString = "AbstractRange" + @usableFromInline static let Attr: JSString = "Attr" + @usableFromInline static let CDATASection: JSString = "CDATASection" + @usableFromInline static let CharacterData: JSString = "CharacterData" + @usableFromInline static let Comment: JSString = "Comment" + @usableFromInline static let CustomEvent: JSString = "CustomEvent" + @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" + @usableFromInline static let DOMTokenList: JSString = "DOMTokenList" + @usableFromInline static let Document: JSString = "Document" + @usableFromInline static let DocumentFragment: JSString = "DocumentFragment" + @usableFromInline static let DocumentType: JSString = "DocumentType" + @usableFromInline static let Element: JSString = "Element" + @usableFromInline static let Event: JSString = "Event" + @usableFromInline static let EventTarget: JSString = "EventTarget" + @usableFromInline static let HTMLCollection: JSString = "HTMLCollection" + @usableFromInline static let MutationObserver: JSString = "MutationObserver" + @usableFromInline static let MutationRecord: JSString = "MutationRecord" + @usableFromInline static let NamedNodeMap: JSString = "NamedNodeMap" + @usableFromInline static let Node: JSString = "Node" + @usableFromInline static let NodeIterator: JSString = "NodeIterator" + @usableFromInline static let NodeList: JSString = "NodeList" + @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let ProcessingInstruction: JSString = "ProcessingInstruction" + @usableFromInline static let Range: JSString = "Range" + @usableFromInline static let ShadowRoot: JSString = "ShadowRoot" + @usableFromInline static let StaticRange: JSString = "StaticRange" + @usableFromInline static let Text: JSString = "Text" + @usableFromInline static let TreeWalker: JSString = "TreeWalker" + @usableFromInline static let URL: JSString = "URL" + @usableFromInline static let XMLDocument: JSString = "XMLDocument" + @usableFromInline static let XPathEvaluator: JSString = "XPathEvaluator" + @usableFromInline static let XPathExpression: JSString = "XPathExpression" + @usableFromInline static let XPathResult: JSString = "XPathResult" + @usableFromInline static let XSLTProcessor: JSString = "XSLTProcessor" + @usableFromInline static let abort: JSString = "abort" + @usableFromInline static let aborted: JSString = "aborted" + @usableFromInline static let add: JSString = "add" + @usableFromInline static let addedNodes: JSString = "addedNodes" + @usableFromInline static let adoptNode: JSString = "adoptNode" + @usableFromInline static let after: JSString = "after" + @usableFromInline static let append: JSString = "append" + @usableFromInline static let appendChild: JSString = "appendChild" + @usableFromInline static let appendData: JSString = "appendData" + @usableFromInline static let assignedSlot: JSString = "assignedSlot" + @usableFromInline static let attachShadow: JSString = "attachShadow" + @usableFromInline static let attributeFilter: JSString = "attributeFilter" + @usableFromInline static let attributeName: JSString = "attributeName" + @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" + @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" + @usableFromInline static let attributes: JSString = "attributes" + @usableFromInline static let baseURI: JSString = "baseURI" + @usableFromInline static let before: JSString = "before" + @usableFromInline static let booleanValue: JSString = "booleanValue" + @usableFromInline static let bubbles: JSString = "bubbles" + @usableFromInline static let cancelBubble: JSString = "cancelBubble" + @usableFromInline static let cancelable: JSString = "cancelable" + @usableFromInline static let capture: JSString = "capture" + @usableFromInline static let characterData: JSString = "characterData" + @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" + @usableFromInline static let characterSet: JSString = "characterSet" + @usableFromInline static let charset: JSString = "charset" + @usableFromInline static let childElementCount: JSString = "childElementCount" + @usableFromInline static let childList: JSString = "childList" + @usableFromInline static let childNodes: JSString = "childNodes" + @usableFromInline static let children: JSString = "children" + @usableFromInline static let classList: JSString = "classList" + @usableFromInline static let className: JSString = "className" + @usableFromInline static let clearParameters: JSString = "clearParameters" + @usableFromInline static let cloneContents: JSString = "cloneContents" + @usableFromInline static let cloneNode: JSString = "cloneNode" + @usableFromInline static let cloneRange: JSString = "cloneRange" + @usableFromInline static let closest: JSString = "closest" + @usableFromInline static let collapse: JSString = "collapse" + @usableFromInline static let collapsed: JSString = "collapsed" + @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" + @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" + @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" + @usableFromInline static let comparePoint: JSString = "comparePoint" + @usableFromInline static let compatMode: JSString = "compatMode" + @usableFromInline static let composed: JSString = "composed" + @usableFromInline static let composedPath: JSString = "composedPath" + @usableFromInline static let contains: JSString = "contains" + @usableFromInline static let contentType: JSString = "contentType" + @usableFromInline static let createAttribute: JSString = "createAttribute" + @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" + @usableFromInline static let createCDATASection: JSString = "createCDATASection" + @usableFromInline static let createComment: JSString = "createComment" + @usableFromInline static let createDocument: JSString = "createDocument" + @usableFromInline static let createDocumentFragment: JSString = "createDocumentFragment" + @usableFromInline static let createDocumentType: JSString = "createDocumentType" + @usableFromInline static let createElement: JSString = "createElement" + @usableFromInline static let createElementNS: JSString = "createElementNS" + @usableFromInline static let createEvent: JSString = "createEvent" + @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" + @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" + @usableFromInline static let createRange: JSString = "createRange" + @usableFromInline static let createTextNode: JSString = "createTextNode" + @usableFromInline static let currentNode: JSString = "currentNode" + @usableFromInline static let currentTarget: JSString = "currentTarget" + @usableFromInline static let data: JSString = "data" + @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" + @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" + @usableFromInline static let deleteContents: JSString = "deleteContents" + @usableFromInline static let deleteData: JSString = "deleteData" + @usableFromInline static let detach: JSString = "detach" + @usableFromInline static let detail: JSString = "detail" + @usableFromInline static let disconnect: JSString = "disconnect" + @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" + @usableFromInline static let doctype: JSString = "doctype" + @usableFromInline static let documentElement: JSString = "documentElement" + @usableFromInline static let documentURI: JSString = "documentURI" + @usableFromInline static let endContainer: JSString = "endContainer" + @usableFromInline static let endOffset: JSString = "endOffset" + @usableFromInline static let evaluate: JSString = "evaluate" + @usableFromInline static let eventPhase: JSString = "eventPhase" + @usableFromInline static let extractContents: JSString = "extractContents" + @usableFromInline static let firstChild: JSString = "firstChild" + @usableFromInline static let firstElementChild: JSString = "firstElementChild" + @usableFromInline static let getAttribute: JSString = "getAttribute" + @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" + @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" + @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" + @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" + @usableFromInline static let getElementById: JSString = "getElementById" + @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" + @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" + @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" + @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" + @usableFromInline static let getParameter: JSString = "getParameter" + @usableFromInline static let getRootNode: JSString = "getRootNode" + @usableFromInline static let hasAttribute: JSString = "hasAttribute" + @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" + @usableFromInline static let hasAttributes: JSString = "hasAttributes" + @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" + @usableFromInline static let hasFeature: JSString = "hasFeature" + @usableFromInline static let host: JSString = "host" + @usableFromInline static let id: JSString = "id" + @usableFromInline static let implementation: JSString = "implementation" + @usableFromInline static let importNode: JSString = "importNode" + @usableFromInline static let importStylesheet: JSString = "importStylesheet" + @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" + @usableFromInline static let initEvent: JSString = "initEvent" + @usableFromInline static let inputEncoding: JSString = "inputEncoding" + @usableFromInline static let insertAdjacentElement: JSString = "insertAdjacentElement" + @usableFromInline static let insertAdjacentText: JSString = "insertAdjacentText" + @usableFromInline static let insertBefore: JSString = "insertBefore" + @usableFromInline static let insertData: JSString = "insertData" + @usableFromInline static let insertNode: JSString = "insertNode" + @usableFromInline static let intersectsNode: JSString = "intersectsNode" + @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" + @usableFromInline static let `is`: JSString = "is" + @usableFromInline static let isConnected: JSString = "isConnected" + @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" + @usableFromInline static let isEqualNode: JSString = "isEqualNode" + @usableFromInline static let isPointInRange: JSString = "isPointInRange" + @usableFromInline static let isSameNode: JSString = "isSameNode" + @usableFromInline static let isTrusted: JSString = "isTrusted" + @usableFromInline static let iterateNext: JSString = "iterateNext" + @usableFromInline static let lastChild: JSString = "lastChild" + @usableFromInline static let lastElementChild: JSString = "lastElementChild" + @usableFromInline static let length: JSString = "length" + @usableFromInline static let localName: JSString = "localName" + @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" + @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" + @usableFromInline static let matches: JSString = "matches" + @usableFromInline static let mode: JSString = "mode" + @usableFromInline static let name: JSString = "name" + @usableFromInline static let namespaceURI: JSString = "namespaceURI" + @usableFromInline static let nextElementSibling: JSString = "nextElementSibling" + @usableFromInline static let nextNode: JSString = "nextNode" + @usableFromInline static let nextSibling: JSString = "nextSibling" + @usableFromInline static let nodeName: JSString = "nodeName" + @usableFromInline static let nodeType: JSString = "nodeType" + @usableFromInline static let nodeValue: JSString = "nodeValue" + @usableFromInline static let normalize: JSString = "normalize" + @usableFromInline static let numberValue: JSString = "numberValue" + @usableFromInline static let observe: JSString = "observe" + @usableFromInline static let oldValue: JSString = "oldValue" + @usableFromInline static let onabort: JSString = "onabort" + @usableFromInline static let once: JSString = "once" + @usableFromInline static let onslotchange: JSString = "onslotchange" + @usableFromInline static let ownerDocument: JSString = "ownerDocument" + @usableFromInline static let ownerElement: JSString = "ownerElement" + @usableFromInline static let parentElement: JSString = "parentElement" + @usableFromInline static let parentNode: JSString = "parentNode" + @usableFromInline static let passive: JSString = "passive" + @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" + @usableFromInline static let prefix: JSString = "prefix" + @usableFromInline static let prepend: JSString = "prepend" + @usableFromInline static let preventDefault: JSString = "preventDefault" + @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" + @usableFromInline static let previousNode: JSString = "previousNode" + @usableFromInline static let previousSibling: JSString = "previousSibling" + @usableFromInline static let publicId: JSString = "publicId" + @usableFromInline static let querySelector: JSString = "querySelector" + @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" + @usableFromInline static let reason: JSString = "reason" + @usableFromInline static let referenceNode: JSString = "referenceNode" + @usableFromInline static let remove: JSString = "remove" + @usableFromInline static let removeAttribute: JSString = "removeAttribute" + @usableFromInline static let removeAttributeNS: JSString = "removeAttributeNS" + @usableFromInline static let removeAttributeNode: JSString = "removeAttributeNode" + @usableFromInline static let removeChild: JSString = "removeChild" + @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" + @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" + @usableFromInline static let removeParameter: JSString = "removeParameter" + @usableFromInline static let removedNodes: JSString = "removedNodes" + @usableFromInline static let replace: JSString = "replace" + @usableFromInline static let replaceChild: JSString = "replaceChild" + @usableFromInline static let replaceChildren: JSString = "replaceChildren" + @usableFromInline static let replaceData: JSString = "replaceData" + @usableFromInline static let replaceWith: JSString = "replaceWith" + @usableFromInline static let reset: JSString = "reset" + @usableFromInline static let resultType: JSString = "resultType" + @usableFromInline static let returnValue: JSString = "returnValue" + @usableFromInline static let root: JSString = "root" + @usableFromInline static let selectNode: JSString = "selectNode" + @usableFromInline static let selectNodeContents: JSString = "selectNodeContents" + @usableFromInline static let setAttribute: JSString = "setAttribute" + @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" + @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" + @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" + @usableFromInline static let setEnd: JSString = "setEnd" + @usableFromInline static let setEndAfter: JSString = "setEndAfter" + @usableFromInline static let setEndBefore: JSString = "setEndBefore" + @usableFromInline static let setNamedItem: JSString = "setNamedItem" + @usableFromInline static let setNamedItemNS: JSString = "setNamedItemNS" + @usableFromInline static let setParameter: JSString = "setParameter" + @usableFromInline static let setStart: JSString = "setStart" + @usableFromInline static let setStartAfter: JSString = "setStartAfter" + @usableFromInline static let setStartBefore: JSString = "setStartBefore" + @usableFromInline static let shadowRoot: JSString = "shadowRoot" + @usableFromInline static let signal: JSString = "signal" + @usableFromInline static let singleNodeValue: JSString = "singleNodeValue" + @usableFromInline static let slot: JSString = "slot" + @usableFromInline static let slotAssignment: JSString = "slotAssignment" + @usableFromInline static let snapshotItem: JSString = "snapshotItem" + @usableFromInline static let snapshotLength: JSString = "snapshotLength" + @usableFromInline static let specified: JSString = "specified" + @usableFromInline static let splitText: JSString = "splitText" + @usableFromInline static let srcElement: JSString = "srcElement" + @usableFromInline static let startContainer: JSString = "startContainer" + @usableFromInline static let startOffset: JSString = "startOffset" + @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" + @usableFromInline static let stopPropagation: JSString = "stopPropagation" + @usableFromInline static let stringValue: JSString = "stringValue" + @usableFromInline static let substringData: JSString = "substringData" + @usableFromInline static let subtree: JSString = "subtree" + @usableFromInline static let supports: JSString = "supports" + @usableFromInline static let surroundContents: JSString = "surroundContents" + @usableFromInline static let systemId: JSString = "systemId" + @usableFromInline static let tagName: JSString = "tagName" + @usableFromInline static let takeRecords: JSString = "takeRecords" + @usableFromInline static let target: JSString = "target" + @usableFromInline static let textContent: JSString = "textContent" + @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" + @usableFromInline static let timeStamp: JSString = "timeStamp" + @usableFromInline static let timeout: JSString = "timeout" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let toggle: JSString = "toggle" + @usableFromInline static let toggleAttribute: JSString = "toggleAttribute" + @usableFromInline static let transformToDocument: JSString = "transformToDocument" + @usableFromInline static let transformToFragment: JSString = "transformToFragment" + @usableFromInline static let type: JSString = "type" + @usableFromInline static let value: JSString = "value" + @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" + @usableFromInline static let whatToShow: JSString = "whatToShow" + @usableFromInline static let wholeText: JSString = "wholeText" +} + +public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} +extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} +extension String: Any_ElementCreationOptions_or_String {} + +public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { + case elementCreationOptions(ElementCreationOptions) + case string(String) + + var elementCreationOptions: ElementCreationOptions? { + switch self { + case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { + return .elementCreationOptions(elementCreationOptions) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .elementCreationOptions(elementCreationOptions): + return elementCreationOptions.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_Node_or_String: ConvertibleToJSValue {} +extension Node: Any_Node_or_String {} +extension String: Any_Node_or_String {} + +public enum Node_or_String: JSValueCompatible, Any_Node_or_String { + case node(Node) + case string(String) + + var node: Node? { + switch self { + case let .node(node): return node + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let node: Node = value.fromJSValue() { + return .node(node) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .node(node): + return node.jsValue + case let .string(string): + return string.jsValue + } + } +} diff --git a/Sources/DOMKitHTML/DOMKitHTML.swift b/Sources/DOMKitHTML/DOMKitHTML.swift new file mode 100644 index 00000000..44b4b2ef --- /dev/null +++ b/Sources/DOMKitHTML/DOMKitHTML.swift @@ -0,0 +1,9382 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol AbstractWorker: JSBridgedClass {} +public extension AbstractWorker { + @inlinable var onerror: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onerror, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onerror, in: jsObject] = newValue } + } +} + +public protocol AnimationFrameProvider: JSBridgedClass {} +public extension AnimationFrameProvider { + // XXX: method 'requestAnimationFrame' is ignored + + @inlinable func cancelAnimationFrame(handle: UInt32) { + let this = jsObject + _ = this[HTMLStrings.cancelAnimationFrame].function!(this: this, arguments: [handle.jsValue]) + } +} + +public class AssignedNodesOptions: BridgedDictionary { + public convenience init(flatten: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.flatten] = flatten.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _flatten = ReadWriteAttribute(jsObject: object, name: HTMLStrings.flatten) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var flatten: Bool +} + +public class AudioTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.AudioTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.language) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.enabled) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var enabled: Bool +} + +public class AudioTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.AudioTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> AudioTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> AudioTrack? { + let this = jsObject + return this[HTMLStrings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public class BarProp: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.BarProp].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _visible = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.visible) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var visible: Bool +} + +public class BeforeUnloadEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.BeforeUnloadEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + // XXX: member 'returnValue' is ignored +} + +public class BroadcastChannel: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.BroadcastChannel].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.name) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(name: String) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) + } + + @ReadonlyAttribute + public var name: String + + @inlinable public func postMessage(message: JSValue) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue]) + } + + @inlinable public func close() { + let this = jsObject + _ = this[HTMLStrings.close].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public enum CanPlayTypeResult: JSString, JSValueCompatible { + case _empty = "" + case maybe = "maybe" + case probably = "probably" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasCompositing: JSBridgedClass {} +public extension CanvasCompositing { + @inlinable var globalAlpha: Double { + get { ReadWriteAttribute[HTMLStrings.globalAlpha, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.globalAlpha, in: jsObject] = newValue } + } + + @inlinable var globalCompositeOperation: String { + get { ReadWriteAttribute[HTMLStrings.globalCompositeOperation, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.globalCompositeOperation, in: jsObject] = newValue } + } +} + +public enum CanvasDirection: JSString, JSValueCompatible { + case ltr = "ltr" + case rtl = "rtl" + case inherit = "inherit" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasDrawImage: JSBridgedClass {} +public extension CanvasDrawImage { + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { + let this = jsObject + _ = this[HTMLStrings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) + } + + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { + let this = jsObject + _ = this[HTMLStrings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) + } + + @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = dx.jsValue + let _arg6 = dy.jsValue + let _arg7 = dw.jsValue + let _arg8 = dh.jsValue + let this = jsObject + _ = this[HTMLStrings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } +} + +public protocol CanvasDrawPath: JSBridgedClass {} +public extension CanvasDrawPath { + @inlinable func beginPath() { + let this = jsObject + _ = this[HTMLStrings.beginPath].function!(this: this, arguments: []) + } + + @inlinable func fill(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[HTMLStrings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + } + + @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[HTMLStrings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + } + + @inlinable func stroke() { + let this = jsObject + _ = this[HTMLStrings.stroke].function!(this: this, arguments: []) + } + + @inlinable func stroke(path: Path2D) { + let this = jsObject + _ = this[HTMLStrings.stroke].function!(this: this, arguments: [path.jsValue]) + } + + @inlinable func clip(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[HTMLStrings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + } + + @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[HTMLStrings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + } + + @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[HTMLStrings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[HTMLStrings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { + let this = jsObject + return this[HTMLStrings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { + let this = jsObject + return this[HTMLStrings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } +} + +public enum CanvasFillRule: JSString, JSValueCompatible { + case nonzero = "nonzero" + case evenodd = "evenodd" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasFillStrokeStyles: JSBridgedClass {} +public extension CanvasFillStrokeStyles { + @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { + get { ReadWriteAttribute[HTMLStrings.strokeStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.strokeStyle, in: jsObject] = newValue } + } + + @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { + get { ReadWriteAttribute[HTMLStrings.fillStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.fillStyle, in: jsObject] = newValue } + } + + @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { + let this = jsObject + return this[HTMLStrings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! + } + + @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { + let _arg0 = x0.jsValue + let _arg1 = y0.jsValue + let _arg2 = r0.jsValue + let _arg3 = x1.jsValue + let _arg4 = y1.jsValue + let _arg5 = r1.jsValue + let this = jsObject + return this[HTMLStrings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { + let this = jsObject + return this[HTMLStrings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { + let this = jsObject + return this[HTMLStrings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! + } +} + +public class CanvasFilter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasFilter].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) + } +} + +public protocol CanvasFilters: JSBridgedClass {} +public extension CanvasFilters { + @inlinable var filter: CanvasFilter_or_String { + get { ReadWriteAttribute[HTMLStrings.filter, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.filter, in: jsObject] = newValue } + } +} + +public enum CanvasFontKerning: JSString, JSValueCompatible { + case auto = "auto" + case normal = "normal" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasFontStretch: JSString, JSValueCompatible { + case ultraCondensed = "ultra-condensed" + case extraCondensed = "extra-condensed" + case condensed = "condensed" + case semiCondensed = "semi-condensed" + case normal = "normal" + case semiExpanded = "semi-expanded" + case expanded = "expanded" + case extraExpanded = "extra-expanded" + case ultraExpanded = "ultra-expanded" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasFontVariantCaps: JSString, JSValueCompatible { + case normal = "normal" + case smallCaps = "small-caps" + case allSmallCaps = "all-small-caps" + case petiteCaps = "petite-caps" + case allPetiteCaps = "all-petite-caps" + case unicase = "unicase" + case titlingCaps = "titling-caps" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CanvasGradient: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasGradient].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func addColorStop(offset: Double, color: String) { + let this = jsObject + _ = this[HTMLStrings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) + } +} + +public protocol CanvasImageData: JSBridgedClass {} +public extension CanvasImageData { + @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + let this = jsObject + return this[HTMLStrings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func createImageData(imagedata: ImageData) -> ImageData { + let this = jsObject + return this[HTMLStrings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! + } + + @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + let this = jsObject + return this[HTMLStrings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { + let this = jsObject + _ = this[HTMLStrings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) + } + + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { + let _arg0 = imagedata.jsValue + let _arg1 = dx.jsValue + let _arg2 = dy.jsValue + let _arg3 = dirtyX.jsValue + let _arg4 = dirtyY.jsValue + let _arg5 = dirtyWidth.jsValue + let _arg6 = dirtyHeight.jsValue + let this = jsObject + _ = this[HTMLStrings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } +} + +public protocol CanvasImageSmoothing: JSBridgedClass {} +public extension CanvasImageSmoothing { + @inlinable var imageSmoothingEnabled: Bool { + get { ReadWriteAttribute[HTMLStrings.imageSmoothingEnabled, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.imageSmoothingEnabled, in: jsObject] = newValue } + } + + @inlinable var imageSmoothingQuality: ImageSmoothingQuality { + get { ReadWriteAttribute[HTMLStrings.imageSmoothingQuality, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.imageSmoothingQuality, in: jsObject] = newValue } + } +} + +public enum CanvasLineCap: JSString, JSValueCompatible { + case butt = "butt" + case round = "round" + case square = "square" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasLineJoin: JSString, JSValueCompatible { + case round = "round" + case bevel = "bevel" + case miter = "miter" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasPath: JSBridgedClass {} +public extension CanvasPath { + @inlinable func closePath() { + let this = jsObject + _ = this[HTMLStrings.closePath].function!(this: this, arguments: []) + } + + @inlinable func moveTo(x: Double, y: Double) { + let this = jsObject + _ = this[HTMLStrings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func lineTo(x: Double, y: Double) { + let this = jsObject + _ = this[HTMLStrings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { + let this = jsObject + _ = this[HTMLStrings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { + let _arg0 = cp1x.jsValue + let _arg1 = cp1y.jsValue + let _arg2 = cp2x.jsValue + let _arg3 = cp2y.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let this = jsObject + _ = this[HTMLStrings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { + let this = jsObject + _ = this[HTMLStrings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) + } + + @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[HTMLStrings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { + let this = jsObject + _ = this[HTMLStrings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) + } + + @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radius.jsValue + let _arg3 = startAngle.jsValue + let _arg4 = endAngle.jsValue + let _arg5 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[HTMLStrings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radiusX.jsValue + let _arg3 = radiusY.jsValue + let _arg4 = rotation.jsValue + let _arg5 = startAngle.jsValue + let _arg6 = endAngle.jsValue + let _arg7 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[HTMLStrings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public protocol CanvasPathDrawingStyles: JSBridgedClass {} +public extension CanvasPathDrawingStyles { + @inlinable var lineWidth: Double { + get { ReadWriteAttribute[HTMLStrings.lineWidth, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.lineWidth, in: jsObject] = newValue } + } + + @inlinable var lineCap: CanvasLineCap { + get { ReadWriteAttribute[HTMLStrings.lineCap, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.lineCap, in: jsObject] = newValue } + } + + @inlinable var lineJoin: CanvasLineJoin { + get { ReadWriteAttribute[HTMLStrings.lineJoin, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.lineJoin, in: jsObject] = newValue } + } + + @inlinable var miterLimit: Double { + get { ReadWriteAttribute[HTMLStrings.miterLimit, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.miterLimit, in: jsObject] = newValue } + } + + @inlinable func setLineDash(segments: [Double]) { + let this = jsObject + _ = this[HTMLStrings.setLineDash].function!(this: this, arguments: [segments.jsValue]) + } + + @inlinable func getLineDash() -> [Double] { + let this = jsObject + return this[HTMLStrings.getLineDash].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var lineDashOffset: Double { + get { ReadWriteAttribute[HTMLStrings.lineDashOffset, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.lineDashOffset, in: jsObject] = newValue } + } +} + +public class CanvasPattern: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasPattern].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[HTMLStrings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } +} + +public protocol CanvasRect: JSBridgedClass {} +public extension CanvasRect { + @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[HTMLStrings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[HTMLStrings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[HTMLStrings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } +} + +public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasRenderingContext2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: HTMLCanvasElement + + @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { + let this = jsObject + return this[HTMLStrings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class CanvasRenderingContext2DSettings: BridgedDictionary { + public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.alpha] = alpha.jsValue + object[HTMLStrings.desynchronized] = desynchronized.jsValue + object[HTMLStrings.colorSpace] = colorSpace.jsValue + object[HTMLStrings.willReadFrequently] = willReadFrequently.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: HTMLStrings.alpha) + _desynchronized = ReadWriteAttribute(jsObject: object, name: HTMLStrings.desynchronized) + _colorSpace = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colorSpace) + _willReadFrequently = ReadWriteAttribute(jsObject: object, name: HTMLStrings.willReadFrequently) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool + + @ReadWriteAttribute + public var desynchronized: Bool + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace + + @ReadWriteAttribute + public var willReadFrequently: Bool +} + +public protocol CanvasShadowStyles: JSBridgedClass {} +public extension CanvasShadowStyles { + @inlinable var shadowOffsetX: Double { + get { ReadWriteAttribute[HTMLStrings.shadowOffsetX, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.shadowOffsetX, in: jsObject] = newValue } + } + + @inlinable var shadowOffsetY: Double { + get { ReadWriteAttribute[HTMLStrings.shadowOffsetY, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.shadowOffsetY, in: jsObject] = newValue } + } + + @inlinable var shadowBlur: Double { + get { ReadWriteAttribute[HTMLStrings.shadowBlur, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.shadowBlur, in: jsObject] = newValue } + } + + @inlinable var shadowColor: String { + get { ReadWriteAttribute[HTMLStrings.shadowColor, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.shadowColor, in: jsObject] = newValue } + } +} + +public protocol CanvasState: JSBridgedClass {} +public extension CanvasState { + @inlinable func save() { + let this = jsObject + _ = this[HTMLStrings.save].function!(this: this, arguments: []) + } + + @inlinable func restore() { + let this = jsObject + _ = this[HTMLStrings.restore].function!(this: this, arguments: []) + } + + @inlinable func reset() { + let this = jsObject + _ = this[HTMLStrings.reset].function!(this: this, arguments: []) + } + + @inlinable func isContextLost() -> Bool { + let this = jsObject + return this[HTMLStrings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + } +} + +public protocol CanvasText: JSBridgedClass {} +public extension CanvasText { + @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + let this = jsObject + _ = this[HTMLStrings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + } + + @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + let this = jsObject + _ = this[HTMLStrings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + } + + @inlinable func measureText(text: String) -> TextMetrics { + let this = jsObject + return this[HTMLStrings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! + } +} + +public enum CanvasTextAlign: JSString, JSValueCompatible { + case start = "start" + case end = "end" + case left = "left" + case right = "right" + case center = "center" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasTextBaseline: JSString, JSValueCompatible { + case top = "top" + case hanging = "hanging" + case middle = "middle" + case alphabetic = "alphabetic" + case ideographic = "ideographic" + case bottom = "bottom" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTextDrawingStyles: JSBridgedClass {} +public extension CanvasTextDrawingStyles { + @inlinable var font: String { + get { ReadWriteAttribute[HTMLStrings.font, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.font, in: jsObject] = newValue } + } + + @inlinable var textAlign: CanvasTextAlign { + get { ReadWriteAttribute[HTMLStrings.textAlign, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.textAlign, in: jsObject] = newValue } + } + + @inlinable var textBaseline: CanvasTextBaseline { + get { ReadWriteAttribute[HTMLStrings.textBaseline, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.textBaseline, in: jsObject] = newValue } + } + + @inlinable var direction: CanvasDirection { + get { ReadWriteAttribute[HTMLStrings.direction, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.direction, in: jsObject] = newValue } + } + + @inlinable var letterSpacing: String { + get { ReadWriteAttribute[HTMLStrings.letterSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.letterSpacing, in: jsObject] = newValue } + } + + @inlinable var fontKerning: CanvasFontKerning { + get { ReadWriteAttribute[HTMLStrings.fontKerning, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.fontKerning, in: jsObject] = newValue } + } + + @inlinable var fontStretch: CanvasFontStretch { + get { ReadWriteAttribute[HTMLStrings.fontStretch, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.fontStretch, in: jsObject] = newValue } + } + + @inlinable var fontVariantCaps: CanvasFontVariantCaps { + get { ReadWriteAttribute[HTMLStrings.fontVariantCaps, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.fontVariantCaps, in: jsObject] = newValue } + } + + @inlinable var textRendering: CanvasTextRendering { + get { ReadWriteAttribute[HTMLStrings.textRendering, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.textRendering, in: jsObject] = newValue } + } + + @inlinable var wordSpacing: String { + get { ReadWriteAttribute[HTMLStrings.wordSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.wordSpacing, in: jsObject] = newValue } + } +} + +public enum CanvasTextRendering: JSString, JSValueCompatible { + case auto = "auto" + case optimizeSpeed = "optimizeSpeed" + case optimizeLegibility = "optimizeLegibility" + case geometricPrecision = "geometricPrecision" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTransform: JSBridgedClass {} +public extension CanvasTransform { + @inlinable func scale(x: Double, y: Double) { + let this = jsObject + _ = this[HTMLStrings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func rotate(angle: Double) { + let this = jsObject + _ = this[HTMLStrings.rotate].function!(this: this, arguments: [angle.jsValue]) + } + + @inlinable func translate(x: Double, y: Double) { + let this = jsObject + _ = this[HTMLStrings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[HTMLStrings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func getTransform() -> DOMMatrix { + let this = jsObject + return this[HTMLStrings.getTransform].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[HTMLStrings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[HTMLStrings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } + + @inlinable func resetTransform() { + let this = jsObject + _ = this[HTMLStrings.resetTransform].function!(this: this, arguments: []) + } +} + +public protocol CanvasUserInterface: JSBridgedClass {} +public extension CanvasUserInterface { + @inlinable func drawFocusIfNeeded(element: Element) { + let this = jsObject + _ = this[HTMLStrings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) + } + + @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { + let this = jsObject + _ = this[HTMLStrings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) + } + + @inlinable func scrollPathIntoView() { + let this = jsObject + _ = this[HTMLStrings.scrollPathIntoView].function!(this: this, arguments: []) + } + + @inlinable func scrollPathIntoView(path: Path2D) { + let this = jsObject + _ = this[HTMLStrings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) + } +} + +public enum ColorSpaceConversion: JSString, JSValueCompatible { + case none = "none" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CustomElementRegistry: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CustomElementRegistry].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { + let this = jsObject + _ = this[HTMLStrings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func get(name: String) -> CustomElementConstructor? { + let this = jsObject + return this[HTMLStrings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func whenDefined(name: String) -> JSPromise { + let this = jsObject + return this[HTMLStrings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func upgrade(root: Node) { + let this = jsObject + _ = this[HTMLStrings.upgrade].function!(this: this, arguments: [root.jsValue]) + } +} + +public class DOMParser: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DOMParser].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func parseFromString(string: String, type: DOMParserSupportedType) -> Document { + let this = jsObject + return this[HTMLStrings.parseFromString].function!(this: this, arguments: [string.jsValue, type.jsValue]).fromJSValue()! + } +} + +public enum DOMParserSupportedType: JSString, JSValueCompatible { + case textHtml = "text/html" + case textXml = "text/xml" + case applicationXml = "application/xml" + case applicationXhtmlXml = "application/xhtml+xml" + case imageSvgXml = "image/svg+xml" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DOMStringList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DOMStringList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> String? { + jsObject[key].fromJSValue() + } + + @inlinable public func contains(string: String) -> Bool { + let this = jsObject + return this[HTMLStrings.contains].function!(this: this, arguments: [string.jsValue]).fromJSValue()! + } +} + +public class DOMStringMap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DOMStringMap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public subscript(key: String) -> String { + jsObject[key].fromJSValue()! + } + + // XXX: unsupported setter for keys of type String + + // XXX: unsupported deleter for keys of type String +} + +public class DataTransfer: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DataTransfer].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _dropEffect = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dropEffect) + _effectAllowed = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.effectAllowed) + _items = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.items) + _types = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.types) + _files = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.files) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var dropEffect: String + + @ReadWriteAttribute + public var effectAllowed: String + + @ReadonlyAttribute + public var items: DataTransferItemList + + @inlinable public func setDragImage(image: Element, x: Int32, y: Int32) { + let this = jsObject + _ = this[HTMLStrings.setDragImage].function!(this: this, arguments: [image.jsValue, x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var types: [String] + + @inlinable public func getData(format: String) -> String { + let this = jsObject + return this[HTMLStrings.getData].function!(this: this, arguments: [format.jsValue]).fromJSValue()! + } + + @inlinable public func setData(format: String, data: String) { + let this = jsObject + _ = this[HTMLStrings.setData].function!(this: this, arguments: [format.jsValue, data.jsValue]) + } + + @inlinable public func clearData(format: String? = nil) { + let this = jsObject + _ = this[HTMLStrings.clearData].function!(this: this, arguments: [format?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var files: FileList +} + +public class DataTransferItem: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DataTransferItem].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) + _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var type: String + + // XXX: member 'getAsString' is ignored + + @inlinable public func getAsFile() -> File? { + let this = jsObject + return this[HTMLStrings.getAsFile].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DataTransferItemList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DataTransferItemList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> DataTransferItem { + jsObject[key].fromJSValue()! + } + + @inlinable public func add(data: String, type: String) -> DataTransferItem? { + let this = jsObject + return this[HTMLStrings.add].function!(this: this, arguments: [data.jsValue, type.jsValue]).fromJSValue()! + } + + @inlinable public func add(data: File) -> DataTransferItem? { + let this = jsObject + return this[HTMLStrings.add].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func remove(index: UInt32) { + let this = jsObject + _ = this[HTMLStrings.remove].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable public func clear() { + let this = jsObject + _ = this[HTMLStrings.clear].function!(this: this, arguments: []) + } +} + +public protocol DocumentAndElementEventHandlers: JSBridgedClass {} +public extension DocumentAndElementEventHandlers { + @inlinable var oncopy: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncopy, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncopy, in: jsObject] = newValue } + } + + @inlinable var oncut: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncut, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncut, in: jsObject] = newValue } + } + + @inlinable var onpaste: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onpaste, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpaste, in: jsObject] = newValue } + } +} + +public extension DocumentOrShadowRoot { + @inlinable var activeElement: Element? { ReadonlyAttribute[HTMLStrings.activeElement, in: jsObject] } +} + +public enum DocumentReadyState: JSString, JSValueCompatible { + case loading = "loading" + case interactive = "interactive" + case complete = "complete" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum DocumentVisibilityState: JSString, JSValueCompatible { + case visible = "visible" + case hidden = "hidden" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DragEvent: MouseEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.DragEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _dataTransfer = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.dataTransfer) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: DragEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var dataTransfer: DataTransfer? +} + +public class DragEventInit: BridgedDictionary { + public convenience init(dataTransfer: DataTransfer?) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.dataTransfer] = dataTransfer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _dataTransfer = ReadWriteAttribute(jsObject: object, name: HTMLStrings.dataTransfer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var dataTransfer: DataTransfer? +} + +public protocol ElementContentEditable: JSBridgedClass {} +public extension ElementContentEditable { + @inlinable var contentEditable: String { + get { ReadWriteAttribute[HTMLStrings.contentEditable, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.contentEditable, in: jsObject] = newValue } + } + + @inlinable var enterKeyHint: String { + get { ReadWriteAttribute[HTMLStrings.enterKeyHint, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.enterKeyHint, in: jsObject] = newValue } + } + + @inlinable var isContentEditable: Bool { ReadonlyAttribute[HTMLStrings.isContentEditable, in: jsObject] } + + @inlinable var inputMode: String { + get { ReadWriteAttribute[HTMLStrings.inputMode, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.inputMode, in: jsObject] = newValue } + } +} + +public class ElementDefinitionOptions: BridgedDictionary { + public convenience init(extends: String) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.extends] = extends.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _extends = ReadWriteAttribute(jsObject: object, name: HTMLStrings.extends) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var extends: String +} + +public class ElementInternals: JSBridgedClass, ARIAMixin { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ElementInternals].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.shadowRoot) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { + let this = jsObject + _ = this[HTMLStrings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { + let this = jsObject + _ = this[HTMLStrings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class ErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.ErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _message = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.message) + _filename = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.filename) + _lineno = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.lineno) + _colno = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.colno) + _error = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: ErrorEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var filename: String + + @ReadonlyAttribute + public var lineno: UInt32 + + @ReadonlyAttribute + public var colno: UInt32 + + @ReadonlyAttribute + public var error: JSValue +} + +public class ErrorEventInit: BridgedDictionary { + public convenience init(message: String, filename: String, lineno: UInt32, colno: UInt32, error: JSValue) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.message] = message.jsValue + object[HTMLStrings.filename] = filename.jsValue + object[HTMLStrings.lineno] = lineno.jsValue + object[HTMLStrings.colno] = colno.jsValue + object[HTMLStrings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _message = ReadWriteAttribute(jsObject: object, name: HTMLStrings.message) + _filename = ReadWriteAttribute(jsObject: object, name: HTMLStrings.filename) + _lineno = ReadWriteAttribute(jsObject: object, name: HTMLStrings.lineno) + _colno = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colno) + _error = ReadWriteAttribute(jsObject: object, name: HTMLStrings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var message: String + + @ReadWriteAttribute + public var filename: String + + @ReadWriteAttribute + public var lineno: UInt32 + + @ReadWriteAttribute + public var colno: UInt32 + + @ReadWriteAttribute + public var error: JSValue +} + +public class EventSource: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.EventSource].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _url = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.url) + _withCredentials = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.withCredentials) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.readyState) + _onopen = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onopen) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, eventSourceInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var withCredentials: Bool + + public static let CONNECTING: UInt16 = 0 + + public static let OPEN: UInt16 = 1 + + public static let CLOSED: UInt16 = 2 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ClosureAttribute1Optional + public var onopen: EventHandler + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @inlinable public func close() { + let this = jsObject + _ = this[HTMLStrings.close].function!(this: this, arguments: []) + } +} + +public class EventSourceInit: BridgedDictionary { + public convenience init(withCredentials: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.withCredentials] = withCredentials.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _withCredentials = ReadWriteAttribute(jsObject: object, name: HTMLStrings.withCredentials) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var withCredentials: Bool +} + +public class External: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.External].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func AddSearchProvider() { + let this = jsObject + _ = this[HTMLStrings.AddSearchProvider].function!(this: this, arguments: []) + } + + @inlinable public func IsSearchProviderInstalled() { + let this = jsObject + _ = this[HTMLStrings.IsSearchProviderInstalled].function!(this: this, arguments: []) + } +} + +public class FocusOptions: BridgedDictionary { + public convenience init(preventScroll: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.preventScroll] = preventScroll.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventScroll = ReadWriteAttribute(jsObject: object, name: HTMLStrings.preventScroll) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventScroll: Bool +} + +public class FormDataEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.FormDataEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _formData = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.formData) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: FormDataEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var formData: FormData +} + +public class FormDataEventInit: BridgedDictionary { + public convenience init(formData: FormData) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.formData] = formData.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _formData = ReadWriteAttribute(jsObject: object, name: HTMLStrings.formData) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var formData: FormData +} + +public protocol GlobalEventHandlers: JSBridgedClass {} +public extension GlobalEventHandlers { + @inlinable var onabort: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onabort, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onabort, in: jsObject] = newValue } + } + + @inlinable var onauxclick: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onauxclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onauxclick, in: jsObject] = newValue } + } + + @inlinable var onblur: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onblur, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onblur, in: jsObject] = newValue } + } + + @inlinable var oncancel: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncancel, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncancel, in: jsObject] = newValue } + } + + @inlinable var oncanplay: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncanplay, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncanplay, in: jsObject] = newValue } + } + + @inlinable var oncanplaythrough: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncanplaythrough, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncanplaythrough, in: jsObject] = newValue } + } + + @inlinable var onchange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onchange, in: jsObject] = newValue } + } + + @inlinable var onclick: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onclick, in: jsObject] = newValue } + } + + @inlinable var onclose: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onclose, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onclose, in: jsObject] = newValue } + } + + @inlinable var oncontextlost: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncontextlost, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncontextlost, in: jsObject] = newValue } + } + + @inlinable var oncontextmenu: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncontextmenu, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncontextmenu, in: jsObject] = newValue } + } + + @inlinable var oncontextrestored: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncontextrestored, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncontextrestored, in: jsObject] = newValue } + } + + @inlinable var oncuechange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oncuechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncuechange, in: jsObject] = newValue } + } + + @inlinable var ondblclick: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondblclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondblclick, in: jsObject] = newValue } + } + + @inlinable var ondrag: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondrag, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondrag, in: jsObject] = newValue } + } + + @inlinable var ondragend: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondragend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragend, in: jsObject] = newValue } + } + + @inlinable var ondragenter: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondragenter, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragenter, in: jsObject] = newValue } + } + + @inlinable var ondragleave: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondragleave, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragleave, in: jsObject] = newValue } + } + + @inlinable var ondragover: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondragover, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragover, in: jsObject] = newValue } + } + + @inlinable var ondragstart: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondragstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragstart, in: jsObject] = newValue } + } + + @inlinable var ondrop: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondrop, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondrop, in: jsObject] = newValue } + } + + @inlinable var ondurationchange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ondurationchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondurationchange, in: jsObject] = newValue } + } + + @inlinable var onemptied: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onemptied, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onemptied, in: jsObject] = newValue } + } + + @inlinable var onended: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onended, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onended, in: jsObject] = newValue } + } + + @inlinable var onerror: OnErrorEventHandler { + get { ClosureAttribute5Optional[HTMLStrings.onerror, in: jsObject] } + nonmutating set { ClosureAttribute5Optional[HTMLStrings.onerror, in: jsObject] = newValue } + } + + @inlinable var onfocus: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onfocus, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onfocus, in: jsObject] = newValue } + } + + @inlinable var onformdata: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onformdata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onformdata, in: jsObject] = newValue } + } + + @inlinable var oninput: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oninput, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oninput, in: jsObject] = newValue } + } + + @inlinable var oninvalid: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.oninvalid, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.oninvalid, in: jsObject] = newValue } + } + + @inlinable var onkeydown: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onkeydown, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onkeydown, in: jsObject] = newValue } + } + + @inlinable var onkeypress: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onkeypress, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onkeypress, in: jsObject] = newValue } + } + + @inlinable var onkeyup: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onkeyup, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onkeyup, in: jsObject] = newValue } + } + + @inlinable var onload: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onload, in: jsObject] = newValue } + } + + @inlinable var onloadeddata: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onloadeddata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onloadeddata, in: jsObject] = newValue } + } + + @inlinable var onloadedmetadata: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onloadedmetadata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onloadedmetadata, in: jsObject] = newValue } + } + + @inlinable var onloadstart: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onloadstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onloadstart, in: jsObject] = newValue } + } + + @inlinable var onmousedown: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmousedown, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmousedown, in: jsObject] = newValue } + } + + @inlinable var onmouseenter: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmouseenter, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseenter, in: jsObject] = newValue } + } + + @inlinable var onmouseleave: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmouseleave, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseleave, in: jsObject] = newValue } + } + + @inlinable var onmousemove: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmousemove, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmousemove, in: jsObject] = newValue } + } + + @inlinable var onmouseout: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmouseout, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseout, in: jsObject] = newValue } + } + + @inlinable var onmouseover: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmouseover, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseover, in: jsObject] = newValue } + } + + @inlinable var onmouseup: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmouseup, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseup, in: jsObject] = newValue } + } + + @inlinable var onpause: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onpause, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpause, in: jsObject] = newValue } + } + + @inlinable var onplay: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onplay, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onplay, in: jsObject] = newValue } + } + + @inlinable var onplaying: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onplaying, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onplaying, in: jsObject] = newValue } + } + + @inlinable var onprogress: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onprogress, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onprogress, in: jsObject] = newValue } + } + + @inlinable var onratechange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onratechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onratechange, in: jsObject] = newValue } + } + + @inlinable var onreset: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onreset, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onreset, in: jsObject] = newValue } + } + + @inlinable var onresize: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onresize, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onresize, in: jsObject] = newValue } + } + + @inlinable var onscroll: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onscroll, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onscroll, in: jsObject] = newValue } + } + + @inlinable var onsecuritypolicyviolation: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onsecuritypolicyviolation, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onsecuritypolicyviolation, in: jsObject] = newValue } + } + + @inlinable var onseeked: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onseeked, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onseeked, in: jsObject] = newValue } + } + + @inlinable var onseeking: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onseeking, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onseeking, in: jsObject] = newValue } + } + + @inlinable var onselect: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onselect, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onselect, in: jsObject] = newValue } + } + + @inlinable var onslotchange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onslotchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onslotchange, in: jsObject] = newValue } + } + + @inlinable var onstalled: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onstalled, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onstalled, in: jsObject] = newValue } + } + + @inlinable var onsubmit: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onsubmit, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onsubmit, in: jsObject] = newValue } + } + + @inlinable var onsuspend: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onsuspend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onsuspend, in: jsObject] = newValue } + } + + @inlinable var ontimeupdate: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ontimeupdate, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ontimeupdate, in: jsObject] = newValue } + } + + @inlinable var ontoggle: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ontoggle, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ontoggle, in: jsObject] = newValue } + } + + @inlinable var onvolumechange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onvolumechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onvolumechange, in: jsObject] = newValue } + } + + @inlinable var onwaiting: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onwaiting, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwaiting, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationend: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationend, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationiteration: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationiteration, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationiteration, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationstart: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationstart, in: jsObject] = newValue } + } + + @inlinable var onwebkittransitionend: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onwebkittransitionend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkittransitionend, in: jsObject] = newValue } + } + + @inlinable var onwheel: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onwheel, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwheel, in: jsObject] = newValue } + } +} + +public class HTMLAllCollection: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAllCollection].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element { + jsObject[key].fromJSValue()! + } + + @inlinable public subscript(key: String) -> Element_or_HTMLCollection? { + jsObject[key].fromJSValue() + } + + @inlinable public func item(nameOrIndex: String? = nil) -> Element_or_HTMLCollection? { + let this = jsObject + return this[HTMLStrings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class HTMLAnchorElement: HTMLElement, HTMLHyperlinkElementUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAnchorElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) + _download = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.download) + _ping = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ping) + _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) + _hreflang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hreflang) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) + _coords = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.coords) + _charset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.charset) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _rev = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rev) + _shape = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.shape) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var download: String + + @ReadWriteAttribute + public var ping: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var hreflang: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var coords: String + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var rev: String + + @ReadWriteAttribute + public var shape: String +} + +public class HTMLAreaElement: HTMLElement, HTMLHyperlinkElementUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAreaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _alt = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.alt) + _coords = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.coords) + _shape = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.shape) + _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) + _download = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.download) + _ping = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ping) + _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) + _noHref = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noHref) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var coords: String + + @ReadWriteAttribute + public var shape: String + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var download: String + + @ReadWriteAttribute + public var ping: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var noHref: Bool +} + +public class HTMLAudioElement: HTMLMediaElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAudioElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLBRElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLBRElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _clear = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.clear) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var clear: String +} + +public class HTMLBaseElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLBaseElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.href) + _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var href: String + + @ReadWriteAttribute + public var target: String +} + +public class HTMLBodyElement: HTMLElement, WindowEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLBodyElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) + _link = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.link) + _vLink = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vLink) + _aLink = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.aLink) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) + _background = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.background) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var link: String + + @ReadWriteAttribute + public var vLink: String + + @ReadWriteAttribute + public var aLink: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var background: String +} + +public class HTMLButtonElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLButtonElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _formAction = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formAction) + _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formEnctype) + _formMethod = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formMethod) + _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formNoValidate) + _formTarget = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formTarget) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var formAction: String + + @ReadWriteAttribute + public var formEnctype: String + + @ReadWriteAttribute + public var formMethod: String + + @ReadWriteAttribute + public var formNoValidate: Bool + + @ReadWriteAttribute + public var formTarget: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLCanvasElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLCanvasElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @inlinable public func getContext(contextId: String, options: JSValue? = nil) -> RenderingContext? { + let this = jsObject + return this[HTMLStrings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toDataURL(type: String? = nil, quality: JSValue? = nil) -> String { + let this = jsObject + return this[HTMLStrings.toDataURL].function!(this: this, arguments: [type?.jsValue ?? .undefined, quality?.jsValue ?? .undefined]).fromJSValue()! + } + + // XXX: member 'toBlob' is ignored + + @inlinable public func transferControlToOffscreen() -> OffscreenCanvas { + let this = jsObject + return this[HTMLStrings.transferControlToOffscreen].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLDListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLDataElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDataElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: String +} + +public class HTMLDataListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDataListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _options = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.options) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var options: HTMLCollection +} + +public class HTMLDetailsElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDetailsElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _open = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.open) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var open: Bool +} + +public class HTMLDialogElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDialogElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _open = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.open) + _returnValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.returnValue) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var open: Bool + + @ReadWriteAttribute + public var returnValue: String + + @inlinable public func show() { + let this = jsObject + _ = this[HTMLStrings.show].function!(this: this, arguments: []) + } + + @inlinable public func showModal() { + let this = jsObject + _ = this[HTMLStrings.showModal].function!(this: this, arguments: []) + } + + @inlinable public func close(returnValue: String? = nil) { + let this = jsObject + _ = this[HTMLStrings.close].function!(this: this, arguments: [returnValue?.jsValue ?? .undefined]) + } +} + +public class HTMLDirectoryElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDirectoryElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLDivElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDivElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _title = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.title) + _lang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.lang) + _translate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.translate) + _dir = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dir) + _hidden = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hidden) + _inert = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.inert) + _accessKey = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.accessKey) + _accessKeyLabel = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.accessKeyLabel) + _draggable = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.draggable) + _spellcheck = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.spellcheck) + _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocapitalize) + _innerText = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.innerText) + _outerText = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.outerText) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var title: String + + @ReadWriteAttribute + public var lang: String + + @ReadWriteAttribute + public var translate: Bool + + @ReadWriteAttribute + public var dir: String + + @ReadWriteAttribute + public var hidden: Bool + + @ReadWriteAttribute + public var inert: Bool + + @inlinable public func click() { + let this = jsObject + _ = this[HTMLStrings.click].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var accessKey: String + + @ReadonlyAttribute + public var accessKeyLabel: String + + @ReadWriteAttribute + public var draggable: Bool + + @ReadWriteAttribute + public var spellcheck: Bool + + @ReadWriteAttribute + public var autocapitalize: String + + @ReadWriteAttribute + public var innerText: String + + @ReadWriteAttribute + public var outerText: String + + @inlinable public func attachInternals() -> ElementInternals { + let this = jsObject + return this[HTMLStrings.attachInternals].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLEmbedElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLEmbedElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[HTMLStrings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var name: String +} + +public class HTMLFieldSetElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFieldSetElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) + _elements = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.elements) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var elements: HTMLCollection + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } +} + +public class HTMLFontElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFontElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _color = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.color) + _face = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.face) + _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var color: String + + @ReadWriteAttribute + public var face: String + + @ReadWriteAttribute + public var size: String +} + +public class HTMLFormControlsCollection: HTMLCollection { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFormControlsCollection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public subscript(key: String) -> Element_or_RadioNodeList? { + jsObject[key].fromJSValue() + } +} + +public class HTMLFormElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFormElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _acceptCharset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.acceptCharset) + _action = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.action) + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) + _enctype = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.enctype) + _encoding = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.encoding) + _method = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.method) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _noValidate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noValidate) + _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) + _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) + _elements = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.elements) + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var acceptCharset: String + + @ReadWriteAttribute + public var action: String + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var enctype: String + + @ReadWriteAttribute + public var encoding: String + + @ReadWriteAttribute + public var method: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var noValidate: Bool + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadonlyAttribute + public var elements: HTMLFormControlsCollection + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element { + jsObject[key].fromJSValue()! + } + + @inlinable public subscript(key: String) -> Element_or_RadioNodeList { + jsObject[key].fromJSValue()! + } + + @inlinable public func submit() { + let this = jsObject + _ = this[HTMLStrings.submit].function!(this: this, arguments: []) + } + + @inlinable public func requestSubmit(submitter: HTMLElement? = nil) { + let this = jsObject + _ = this[HTMLStrings.requestSubmit].function!(this: this, arguments: [submitter?.jsValue ?? .undefined]) + } + + @inlinable public func reset() { + let this = jsObject + _ = this[HTMLStrings.reset].function!(this: this, arguments: []) + } + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLFrameElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFrameElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _scrolling = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrolling) + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.frameBorder) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.longDesc) + _noResize = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noResize) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentWindow) + _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginHeight) + _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginWidth) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var scrolling: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var frameBorder: String + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var noResize: Bool + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @ReadWriteAttribute + public var marginHeight: String + + @ReadWriteAttribute + public var marginWidth: String +} + +public class HTMLFrameSetElement: HTMLElement, WindowEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFrameSetElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cols = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cols) + _rows = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rows) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cols: String + + @ReadWriteAttribute + public var rows: String +} + +public class HTMLHRElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHRElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _color = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.color) + _noShade = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noShade) + _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var color: String + + @ReadWriteAttribute + public var noShade: Bool + + @ReadWriteAttribute + public var size: String + + @ReadWriteAttribute + public var width: String +} + +public class HTMLHeadElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHeadElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLHeadingElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHeadingElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLHtmlElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHtmlElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _version = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.version) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var version: String +} + +public protocol HTMLHyperlinkElementUtils: JSBridgedClass {} +public extension HTMLHyperlinkElementUtils { + @inlinable var href: String { + get { ReadWriteAttribute[HTMLStrings.href, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.href, in: jsObject] = newValue } + } + + @inlinable var origin: String { ReadonlyAttribute[HTMLStrings.origin, in: jsObject] } + + @inlinable var `protocol`: String { + get { ReadWriteAttribute[HTMLStrings.protocol, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.protocol, in: jsObject] = newValue } + } + + @inlinable var username: String { + get { ReadWriteAttribute[HTMLStrings.username, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.username, in: jsObject] = newValue } + } + + @inlinable var password: String { + get { ReadWriteAttribute[HTMLStrings.password, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.password, in: jsObject] = newValue } + } + + @inlinable var host: String { + get { ReadWriteAttribute[HTMLStrings.host, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.host, in: jsObject] = newValue } + } + + @inlinable var hostname: String { + get { ReadWriteAttribute[HTMLStrings.hostname, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.hostname, in: jsObject] = newValue } + } + + @inlinable var port: String { + get { ReadWriteAttribute[HTMLStrings.port, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.port, in: jsObject] = newValue } + } + + @inlinable var pathname: String { + get { ReadWriteAttribute[HTMLStrings.pathname, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.pathname, in: jsObject] = newValue } + } + + @inlinable var search: String { + get { ReadWriteAttribute[HTMLStrings.search, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.search, in: jsObject] = newValue } + } + + @inlinable var hash: String { + get { ReadWriteAttribute[HTMLStrings.hash, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.hash, in: jsObject] = newValue } + } +} + +public class HTMLIFrameElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLIFrameElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _srcdoc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srcdoc) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _sandbox = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.sandbox) + _allow = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.allow) + _allowFullscreen = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.allowFullscreen) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) + _loading = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loading) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentWindow) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _scrolling = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrolling) + _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.frameBorder) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.longDesc) + _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginHeight) + _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginWidth) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srcdoc: String + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var sandbox: DOMTokenList + + @ReadWriteAttribute + public var allow: String + + @ReadWriteAttribute + public var allowFullscreen: Bool + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var loading: String + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[HTMLStrings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var scrolling: String + + @ReadWriteAttribute + public var frameBorder: String + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var marginHeight: String + + @ReadWriteAttribute + public var marginWidth: String +} + +public class HTMLImageElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLImageElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _alt = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.alt) + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _srcset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srcset) + _sizes = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.sizes) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.useMap) + _isMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.isMap) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _naturalWidth = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.naturalWidth) + _naturalHeight = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.naturalHeight) + _complete = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.complete) + _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.currentSrc) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) + _decoding = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.decoding) + _loading = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loading) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _lowsrc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.lowsrc) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hspace) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vspace) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.longDesc) + _border = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.border) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srcset: String + + @ReadWriteAttribute + public var sizes: String + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var useMap: String + + @ReadWriteAttribute + public var isMap: Bool + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var naturalWidth: UInt32 + + @ReadonlyAttribute + public var naturalHeight: UInt32 + + @ReadonlyAttribute + public var complete: Bool + + @ReadonlyAttribute + public var currentSrc: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var decoding: String + + @ReadWriteAttribute + public var loading: String + + @inlinable public func decode() -> JSPromise { + let this = jsObject + return this[HTMLStrings.decode].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func decode() async throws { + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.decode].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var lowsrc: String + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var border: String +} + +public class HTMLInputElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLInputElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _accept = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.accept) + _alt = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.alt) + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) + _defaultChecked = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultChecked) + _checked = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.checked) + _dirName = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dirName) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _files = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.files) + _formAction = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formAction) + _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formEnctype) + _formMethod = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formMethod) + _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formNoValidate) + _formTarget = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formTarget) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _indeterminate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.indeterminate) + _list = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.list) + _max = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.max) + _maxLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.maxLength) + _min = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.min) + _minLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.minLength) + _multiple = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.multiple) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _pattern = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.pattern) + _placeholder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.placeholder) + _readOnly = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.readOnly) + _required = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.required) + _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _step = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.step) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _valueAsDate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.valueAsDate) + _valueAsNumber = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.valueAsNumber) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionStart) + _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionEnd) + _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionDirection) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.useMap) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var accept: String + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var defaultChecked: Bool + + @ReadWriteAttribute + public var checked: Bool + + @ReadWriteAttribute + public var dirName: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var files: FileList? + + @ReadWriteAttribute + public var formAction: String + + @ReadWriteAttribute + public var formEnctype: String + + @ReadWriteAttribute + public var formMethod: String + + @ReadWriteAttribute + public var formNoValidate: Bool + + @ReadWriteAttribute + public var formTarget: String + + @ReadWriteAttribute + public var height: UInt32 + + @ReadWriteAttribute + public var indeterminate: Bool + + @ReadonlyAttribute + public var list: HTMLElement? + + @ReadWriteAttribute + public var max: String + + @ReadWriteAttribute + public var maxLength: Int32 + + @ReadWriteAttribute + public var min: String + + @ReadWriteAttribute + public var minLength: Int32 + + @ReadWriteAttribute + public var multiple: Bool + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var pattern: String + + @ReadWriteAttribute + public var placeholder: String + + @ReadWriteAttribute + public var readOnly: Bool + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var size: UInt32 + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var step: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var valueAsDate: JSObject? + + @ReadWriteAttribute + public var valueAsNumber: Double + + @ReadWriteAttribute + public var width: UInt32 + + @inlinable public func stepUp(n: Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.stepUp].function!(this: this, arguments: [n?.jsValue ?? .undefined]) + } + + @inlinable public func stepDown(n: Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.stepDown].function!(this: this, arguments: [n?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList? + + @inlinable public func select() { + let this = jsObject + _ = this[HTMLStrings.select].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var selectionStart: UInt32? + + @ReadWriteAttribute + public var selectionEnd: UInt32? + + @ReadWriteAttribute + public var selectionDirection: String? + + @inlinable public func setRangeText(replacement: String) { + let this = jsObject + _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) + } + + @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { + let this = jsObject + _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) + } + + @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { + let this = jsObject + _ = this[HTMLStrings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) + } + + @inlinable public func showPicker() { + let this = jsObject + _ = this[HTMLStrings.showPicker].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var useMap: String +} + +public class HTMLLIElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLIElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Int32 + + @ReadWriteAttribute + public var type: String +} + +public class HTMLLabelElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLabelElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.htmlFor) + _control = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.control) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var htmlFor: String + + @ReadonlyAttribute + public var control: HTMLElement? +} + +public class HTMLLegendElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLegendElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var align: String +} + +public class HTMLLinkElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLinkElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.href) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) + _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) + _as = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.as) + _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) + _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) + _integrity = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.integrity) + _hreflang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hreflang) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _sizes = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.sizes) + _imageSrcset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.imageSrcset) + _imageSizes = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.imageSizes) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.blocking) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _charset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.charset) + _rev = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rev) + _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var href: String + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var rel: String + + @ReadWriteAttribute + public var `as`: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var hreflang: String + + @ReadWriteAttribute + public var type: String + + @ReadonlyAttribute + public var sizes: DOMTokenList + + @ReadWriteAttribute + public var imageSrcset: String + + @ReadWriteAttribute + public var imageSizes: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @ReadWriteAttribute + public var disabled: Bool + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var rev: String + + @ReadWriteAttribute + public var target: String +} + +public class HTMLMapElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMapElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _areas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.areas) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var areas: HTMLCollection +} + +public class HTMLMarqueeElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMarqueeElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _behavior = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.behavior) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) + _direction = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.direction) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hspace) + _loop = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loop) + _scrollAmount = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrollAmount) + _scrollDelay = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrollDelay) + _trueSpeed = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.trueSpeed) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vspace) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var behavior: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var direction: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var loop: Int32 + + @ReadWriteAttribute + public var scrollAmount: UInt32 + + @ReadWriteAttribute + public var scrollDelay: UInt32 + + @ReadWriteAttribute + public var trueSpeed: Bool + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var width: String + + @inlinable public func start() { + let this = jsObject + _ = this[HTMLStrings.start].function!(this: this, arguments: []) + } + + @inlinable public func stop() { + let this = jsObject + _ = this[HTMLStrings.stop].function!(this: this, arguments: []) + } +} + +public class HTMLMediaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMediaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.error) + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.currentSrc) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) + _networkState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.networkState) + _preload = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.preload) + _buffered = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.buffered) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.readyState) + _seeking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.seeking) + _currentTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.currentTime) + _duration = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.duration) + _paused = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.paused) + _defaultPlaybackRate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultPlaybackRate) + _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.playbackRate) + _preservesPitch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.preservesPitch) + _played = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.played) + _seekable = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.seekable) + _ended = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ended) + _autoplay = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autoplay) + _loop = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loop) + _controls = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.controls) + _volume = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.volume) + _muted = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.muted) + _defaultMuted = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultMuted) + _audioTracks = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.audioTracks) + _videoTracks = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.videoTracks) + _textTracks = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.textTracks) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var error: MediaError? + + @ReadWriteAttribute + public var src: String + + // XXX: member 'srcObject' is ignored + + @ReadonlyAttribute + public var currentSrc: String + + @ReadWriteAttribute + public var crossOrigin: String? + + public static let NETWORK_EMPTY: UInt16 = 0 + + public static let NETWORK_IDLE: UInt16 = 1 + + public static let NETWORK_LOADING: UInt16 = 2 + + public static let NETWORK_NO_SOURCE: UInt16 = 3 + + @ReadonlyAttribute + public var networkState: UInt16 + + @ReadWriteAttribute + public var preload: String + + @ReadonlyAttribute + public var buffered: TimeRanges + + @inlinable public func load() { + let this = jsObject + _ = this[HTMLStrings.load].function!(this: this, arguments: []) + } + + @inlinable public func canPlayType(type: String) -> CanPlayTypeResult { + let this = jsObject + return this[HTMLStrings.canPlayType].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + public static let HAVE_NOTHING: UInt16 = 0 + + public static let HAVE_METADATA: UInt16 = 1 + + public static let HAVE_CURRENT_DATA: UInt16 = 2 + + public static let HAVE_FUTURE_DATA: UInt16 = 3 + + public static let HAVE_ENOUGH_DATA: UInt16 = 4 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var seeking: Bool + + @ReadWriteAttribute + public var currentTime: Double + + @inlinable public func fastSeek(time: Double) { + let this = jsObject + _ = this[HTMLStrings.fastSeek].function!(this: this, arguments: [time.jsValue]) + } + + @ReadonlyAttribute + public var duration: Double + + @inlinable public func getStartDate() -> JSObject { + let this = jsObject + return this[HTMLStrings.getStartDate].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var paused: Bool + + @ReadWriteAttribute + public var defaultPlaybackRate: Double + + @ReadWriteAttribute + public var playbackRate: Double + + @ReadWriteAttribute + public var preservesPitch: Bool + + @ReadonlyAttribute + public var played: TimeRanges + + @ReadonlyAttribute + public var seekable: TimeRanges + + @ReadonlyAttribute + public var ended: Bool + + @ReadWriteAttribute + public var autoplay: Bool + + @ReadWriteAttribute + public var loop: Bool + + @inlinable public func play() -> JSPromise { + let this = jsObject + return this[HTMLStrings.play].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func play() async throws { + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.play].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func pause() { + let this = jsObject + _ = this[HTMLStrings.pause].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var controls: Bool + + @ReadWriteAttribute + public var volume: Double + + @ReadWriteAttribute + public var muted: Bool + + @ReadWriteAttribute + public var defaultMuted: Bool + + @ReadonlyAttribute + public var audioTracks: AudioTrackList + + @ReadonlyAttribute + public var videoTracks: VideoTrackList + + @ReadonlyAttribute + public var textTracks: TextTrackList + + @inlinable public func addTextTrack(kind: TextTrackKind, label: String? = nil, language: String? = nil) -> TextTrack { + let this = jsObject + return this[HTMLStrings.addTextTrack].function!(this: this, arguments: [kind.jsValue, label?.jsValue ?? .undefined, language?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class HTMLMenuElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMenuElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLMetaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMetaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _httpEquiv = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.httpEquiv) + _content = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.content) + _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) + _scheme = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scheme) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var httpEquiv: String + + @ReadWriteAttribute + public var content: String + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var scheme: String +} + +public class HTMLMeterElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMeterElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _min = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.min) + _max = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.max) + _low = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.low) + _high = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.high) + _optimum = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.optimum) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Double + + @ReadWriteAttribute + public var min: Double + + @ReadWriteAttribute + public var max: Double + + @ReadWriteAttribute + public var low: Double + + @ReadWriteAttribute + public var high: Double + + @ReadWriteAttribute + public var optimum: Double + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLModElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLModElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cite = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cite) + _dateTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dateTime) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cite: String + + @ReadWriteAttribute + public var dateTime: String +} + +public class HTMLOListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _reversed = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.reversed) + _start = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.start) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var reversed: Bool + + @ReadWriteAttribute + public var start: Int32 + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLObjectElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLObjectElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.data) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentWindow) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _archive = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.archive) + _code = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.code) + _declare = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.declare) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hspace) + _standby = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.standby) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vspace) + _codeBase = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.codeBase) + _codeType = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.codeType) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.useMap) + _border = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.border) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var data: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[HTMLStrings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var archive: String + + @ReadWriteAttribute + public var code: String + + @ReadWriteAttribute + public var declare: Bool + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var standby: String + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var codeBase: String + + @ReadWriteAttribute + public var codeType: String + + @ReadWriteAttribute + public var useMap: String + + @ReadWriteAttribute + public var border: String +} + +public class HTMLOptGroupElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOptGroupElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _label = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.label) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadWriteAttribute + public var label: String +} + +public class HTMLOptionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOptionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _label = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.label) + _defaultSelected = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultSelected) + _selected = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selected) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) + _index = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.index) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var label: String + + @ReadWriteAttribute + public var defaultSelected: Bool + + @ReadWriteAttribute + public var selected: Bool + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var text: String + + @ReadonlyAttribute + public var index: Int32 +} + +public class HTMLOptionsCollection: HTMLCollection { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOptionsCollection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.length) + _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectedIndex) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var length: UInt32 + + // XXX: unsupported setter for keys of type UInt32 + + @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) + } + + @inlinable public func remove(index: Int32) { + let this = jsObject + _ = this[HTMLStrings.remove].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var selectedIndex: Int32 +} + +public protocol HTMLOrSVGElement: JSBridgedClass {} +public extension HTMLOrSVGElement { + @inlinable var dataset: DOMStringMap { ReadonlyAttribute[HTMLStrings.dataset, in: jsObject] } + + @inlinable var nonce: String { + get { ReadWriteAttribute[HTMLStrings.nonce, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.nonce, in: jsObject] = newValue } + } + + @inlinable var autofocus: Bool { + get { ReadWriteAttribute[HTMLStrings.autofocus, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.autofocus, in: jsObject] = newValue } + } + + @inlinable var tabIndex: Int32 { + get { ReadWriteAttribute[HTMLStrings.tabIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[HTMLStrings.tabIndex, in: jsObject] = newValue } + } + + @inlinable func focus(options: FocusOptions? = nil) { + let this = jsObject + _ = this[HTMLStrings.focus].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable func blur() { + let this = jsObject + _ = this[HTMLStrings.blur].function!(this: this, arguments: []) + } +} + +public class HTMLOutputElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOutputElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _htmlFor = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.htmlFor) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var htmlFor: DOMTokenList + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLParagraphElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLParagraphElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLParamElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLParamElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _valueType = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.valueType) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var valueType: String +} + +public class HTMLPictureElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLPictureElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLPreElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLPreElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: Int32 +} + +public class HTMLProgressElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLProgressElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _max = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.max) + _position = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.position) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Double + + @ReadWriteAttribute + public var max: Double + + @ReadonlyAttribute + public var position: Double + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLQuoteElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLQuoteElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cite = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cite) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cite: String +} + +public class HTMLScriptElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLScriptElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _noModule = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noModule) + _async = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.async) + _defer = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defer) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) + _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) + _integrity = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.integrity) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.blocking) + _charset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.charset) + _event = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.event) + _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.htmlFor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var noModule: Bool + + @ReadWriteAttribute + public var async: Bool + + @ReadWriteAttribute + public var `defer`: Bool + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @inlinable public static func supports(type: String) -> Bool { + let this = constructor + return this[HTMLStrings.supports].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var event: String + + @ReadWriteAttribute + public var htmlFor: String +} + +public class HTMLSelectElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSelectElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _multiple = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.multiple) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _required = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.required) + _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) + _options = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.options) + _length = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.length) + _selectedOptions = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.selectedOptions) + _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectedIndex) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var multiple: Bool + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var size: UInt32 + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var options: HTMLOptionsCollection + + @ReadWriteAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> HTMLOptionElement? { + jsObject[key].fromJSValue() + } + + @inlinable public func namedItem(name: String) -> HTMLOptionElement? { + let this = jsObject + return this[HTMLStrings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) + } + + @inlinable public func remove() { + let this = jsObject + _ = this[HTMLStrings.remove].function!(this: this, arguments: []) + } + + @inlinable public func remove(index: Int32) { + let this = jsObject + _ = this[HTMLStrings.remove].function!(this: this, arguments: [index.jsValue]) + } + + // XXX: unsupported setter for keys of type UInt32 + + @ReadonlyAttribute + public var selectedOptions: HTMLCollection + + @ReadWriteAttribute + public var selectedIndex: Int32 + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLSlotElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSlotElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @inlinable public func assignedNodes(options: AssignedNodesOptions? = nil) -> [Node] { + let this = jsObject + return this[HTMLStrings.assignedNodes].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func assignedElements(options: AssignedNodesOptions? = nil) -> [Element] { + let this = jsObject + return this[HTMLStrings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func assign(nodes: Element_or_Text...) { + let this = jsObject + _ = this[HTMLStrings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) + } +} + +public class HTMLSourceElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSourceElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + _srcset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srcset) + _sizes = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.sizes) + _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var srcset: String + + @ReadWriteAttribute + public var sizes: String + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 +} + +public class HTMLSpanElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSpanElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLStyleElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLStyleElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.blocking) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var media: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @ReadWriteAttribute + public var type: String +} + +public class HTMLTableCaptionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableCaptionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLTableCellElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableCellElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _colSpan = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.colSpan) + _rowSpan = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rowSpan) + _headers = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.headers) + _cellIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.cellIndex) + _scope = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scope) + _abbr = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.abbr) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _axis = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.axis) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) + _noWrap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noWrap) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var colSpan: UInt32 + + @ReadWriteAttribute + public var rowSpan: UInt32 + + @ReadWriteAttribute + public var headers: String + + @ReadonlyAttribute + public var cellIndex: Int32 + + @ReadWriteAttribute + public var scope: String + + @ReadWriteAttribute + public var abbr: String + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var axis: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var noWrap: Bool + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var bgColor: String +} + +public class HTMLTableColElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableColElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _span = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.span) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var span: UInt32 + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var width: String +} + +public class HTMLTableElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _caption = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.caption) + _tHead = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.tHead) + _tFoot = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.tFoot) + _tBodies = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.tBodies) + _rows = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rows) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _border = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.border) + _frame = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.frame) + _rules = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rules) + _summary = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.summary) + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) + _cellPadding = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cellPadding) + _cellSpacing = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cellSpacing) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var caption: HTMLTableCaptionElement? + + @inlinable public func createCaption() -> HTMLTableCaptionElement { + let this = jsObject + return this[HTMLStrings.createCaption].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteCaption() { + let this = jsObject + _ = this[HTMLStrings.deleteCaption].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var tHead: HTMLTableSectionElement? + + @inlinable public func createTHead() -> HTMLTableSectionElement { + let this = jsObject + return this[HTMLStrings.createTHead].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteTHead() { + let this = jsObject + _ = this[HTMLStrings.deleteTHead].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var tFoot: HTMLTableSectionElement? + + @inlinable public func createTFoot() -> HTMLTableSectionElement { + let this = jsObject + return this[HTMLStrings.createTFoot].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteTFoot() { + let this = jsObject + _ = this[HTMLStrings.deleteTFoot].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var tBodies: HTMLCollection + + @inlinable public func createTBody() -> HTMLTableSectionElement { + let this = jsObject + return this[HTMLStrings.createTBody].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var rows: HTMLCollection + + @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { + let this = jsObject + return this[HTMLStrings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteRow(index: Int32) { + let this = jsObject + _ = this[HTMLStrings.deleteRow].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var border: String + + @ReadWriteAttribute + public var frame: String + + @ReadWriteAttribute + public var rules: String + + @ReadWriteAttribute + public var summary: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var cellPadding: String + + @ReadWriteAttribute + public var cellSpacing: String +} + +public class HTMLTableRowElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableRowElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _rowIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rowIndex) + _sectionRowIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.sectionRowIndex) + _cells = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.cells) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var rowIndex: Int32 + + @ReadonlyAttribute + public var sectionRowIndex: Int32 + + @ReadonlyAttribute + public var cells: HTMLCollection + + @inlinable public func insertCell(index: Int32? = nil) -> HTMLTableCellElement { + let this = jsObject + return this[HTMLStrings.insertCell].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteCell(index: Int32) { + let this = jsObject + _ = this[HTMLStrings.deleteCell].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var bgColor: String +} + +public class HTMLTableSectionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableSectionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _rows = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rows) + _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var rows: HTMLCollection + + @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { + let this = jsObject + return this[HTMLStrings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteRow(index: Int32) { + let this = jsObject + _ = this[HTMLStrings.deleteRow].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String +} + +public class HTMLTemplateElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTemplateElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _content = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.content) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var content: DocumentFragment +} + +public class HTMLTextAreaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTextAreaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) + _cols = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cols) + _dirName = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dirName) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) + _maxLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.maxLength) + _minLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.minLength) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _placeholder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.placeholder) + _readOnly = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.readOnly) + _required = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.required) + _rows = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rows) + _wrap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.wrap) + _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + _textLength = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.textLength) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) + _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionStart) + _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionEnd) + _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionDirection) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var cols: UInt32 + + @ReadWriteAttribute + public var dirName: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var maxLength: Int32 + + @ReadWriteAttribute + public var minLength: Int32 + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var placeholder: String + + @ReadWriteAttribute + public var readOnly: Bool + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var rows: UInt32 + + @ReadWriteAttribute + public var wrap: String + + @ReadonlyAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var textLength: UInt32 + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList + + @inlinable public func select() { + let this = jsObject + _ = this[HTMLStrings.select].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var selectionStart: UInt32 + + @ReadWriteAttribute + public var selectionEnd: UInt32 + + @ReadWriteAttribute + public var selectionDirection: String + + @inlinable public func setRangeText(replacement: String) { + let this = jsObject + _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) + } + + @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { + let this = jsObject + _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) + } + + @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { + let this = jsObject + _ = this[HTMLStrings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) + } +} + +public class HTMLTimeElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTimeElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _dateTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dateTime) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var dateTime: String +} + +public class HTMLTitleElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTitleElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var text: String +} + +public class HTMLTrackElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTrackElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.kind) + _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) + _srclang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srclang) + _label = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.label) + _default = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.default) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.readyState) + _track = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var kind: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srclang: String + + @ReadWriteAttribute + public var label: String + + @ReadWriteAttribute + public var `default`: Bool + + public static let NONE: UInt16 = 0 + + public static let LOADING: UInt16 = 1 + + public static let LOADED: UInt16 = 2 + + public static let ERROR: UInt16 = 3 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var track: TextTrack +} + +public class HTMLUListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLUListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) + _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool + + @ReadWriteAttribute + public var type: String +} + +public class HTMLUnknownElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLUnknownElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class HTMLVideoElement: HTMLMediaElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLVideoElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _videoWidth = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.videoWidth) + _videoHeight = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.videoHeight) + _poster = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.poster) + _playsInline = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.playsInline) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var videoWidth: UInt32 + + @ReadonlyAttribute + public var videoHeight: UInt32 + + @ReadWriteAttribute + public var poster: String + + @ReadWriteAttribute + public var playsInline: Bool +} + +public class HashChangeEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HashChangeEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _oldURL = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.oldURL) + _newURL = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.newURL) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: HashChangeEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var oldURL: String + + @ReadonlyAttribute + public var newURL: String +} + +public class HashChangeEventInit: BridgedDictionary { + public convenience init(oldURL: String, newURL: String) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.oldURL] = oldURL.jsValue + object[HTMLStrings.newURL] = newURL.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _oldURL = ReadWriteAttribute(jsObject: object, name: HTMLStrings.oldURL) + _newURL = ReadWriteAttribute(jsObject: object, name: HTMLStrings.newURL) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var oldURL: String + + @ReadWriteAttribute + public var newURL: String +} + +public class History: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.History].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + _scrollRestoration = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrollRestoration) + _state = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.state) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @ReadWriteAttribute + public var scrollRestoration: ScrollRestoration + + @ReadonlyAttribute + public var state: JSValue + + @inlinable public func go(delta: Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.go].function!(this: this, arguments: [delta?.jsValue ?? .undefined]) + } + + @inlinable public func back() { + let this = jsObject + _ = this[HTMLStrings.back].function!(this: this, arguments: []) + } + + @inlinable public func forward() { + let this = jsObject + _ = this[HTMLStrings.forward].function!(this: this, arguments: []) + } + + @inlinable public func pushState(data: JSValue, unused: String, url: String? = nil) { + let this = jsObject + _ = this[HTMLStrings.pushState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) + } + + @inlinable public func replaceState(data: JSValue, unused: String, url: String? = nil) { + let this = jsObject + _ = this[HTMLStrings.replaceState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) + } +} + +public class ImageBitmap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ImageBitmap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.height) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var width: UInt32 + + @ReadonlyAttribute + public var height: UInt32 + + @inlinable public func close() { + let this = jsObject + _ = this[HTMLStrings.close].function!(this: this, arguments: []) + } +} + +public class ImageBitmapOptions: BridgedDictionary { + public convenience init(imageOrientation: ImageOrientation, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, resizeWidth: UInt32, resizeHeight: UInt32, resizeQuality: ResizeQuality) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.imageOrientation] = imageOrientation.jsValue + object[HTMLStrings.premultiplyAlpha] = premultiplyAlpha.jsValue + object[HTMLStrings.colorSpaceConversion] = colorSpaceConversion.jsValue + object[HTMLStrings.resizeWidth] = resizeWidth.jsValue + object[HTMLStrings.resizeHeight] = resizeHeight.jsValue + object[HTMLStrings.resizeQuality] = resizeQuality.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _imageOrientation = ReadWriteAttribute(jsObject: object, name: HTMLStrings.imageOrientation) + _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: HTMLStrings.premultiplyAlpha) + _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colorSpaceConversion) + _resizeWidth = ReadWriteAttribute(jsObject: object, name: HTMLStrings.resizeWidth) + _resizeHeight = ReadWriteAttribute(jsObject: object, name: HTMLStrings.resizeHeight) + _resizeQuality = ReadWriteAttribute(jsObject: object, name: HTMLStrings.resizeQuality) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var imageOrientation: ImageOrientation + + @ReadWriteAttribute + public var premultiplyAlpha: PremultiplyAlpha + + @ReadWriteAttribute + public var colorSpaceConversion: ColorSpaceConversion + + @ReadWriteAttribute + public var resizeWidth: UInt32 + + @ReadWriteAttribute + public var resizeHeight: UInt32 + + @ReadWriteAttribute + public var resizeQuality: ResizeQuality +} + +public class ImageBitmapRenderingContext: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ImageBitmapRenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: HTMLCanvasElement_or_OffscreenCanvas + + @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { + let this = jsObject + _ = this[HTMLStrings.transferFromImageBitmap].function!(this: this, arguments: [bitmap.jsValue]) + } +} + +public class ImageBitmapRenderingContextSettings: BridgedDictionary { + public convenience init(alpha: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.alpha] = alpha.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: HTMLStrings.alpha) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool +} + +public class ImageData: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ImageData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.height) + _data = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.data) + _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.colorSpace) + self.jsObject = jsObject + } + + @inlinable public convenience init(sw: UInt32, sh: UInt32, settings: ImageDataSettings? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(data: Uint8ClampedArray, sw: UInt32, sh: UInt32? = nil, settings: ImageDataSettings? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, sw.jsValue, sh?.jsValue ?? .undefined, settings?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var width: UInt32 + + @ReadonlyAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var data: Uint8ClampedArray + + @ReadonlyAttribute + public var colorSpace: PredefinedColorSpace +} + +public class ImageDataSettings: BridgedDictionary { + public convenience init(colorSpace: PredefinedColorSpace) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _colorSpace = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace +} + +public class ImageEncodeOptions: BridgedDictionary { + public convenience init(type: String, quality: Double) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.type] = type.jsValue + object[HTMLStrings.quality] = quality.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: HTMLStrings.type) + _quality = ReadWriteAttribute(jsObject: object, name: HTMLStrings.quality) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var quality: Double +} + +public enum ImageOrientation: JSString, JSValueCompatible { + case none = "none" + case flipY = "flipY" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ImageSmoothingQuality: JSString, JSValueCompatible { + case low = "low" + case medium = "medium" + case high = "high" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Location: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Location].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.protocol) + _host = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.search) + _hash = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hash) + _ancestorOrigins = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ancestorOrigins) + self.jsObject = jsObject + } + + @ReadWriteAttribute + public var href: String + + @ReadonlyAttribute + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String + + @ReadWriteAttribute + public var hash: String + + @inlinable public func assign(url: String) { + let this = jsObject + _ = this[HTMLStrings.assign].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public func replace(url: String) { + let this = jsObject + _ = this[HTMLStrings.replace].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public func reload() { + let this = jsObject + _ = this[HTMLStrings.reload].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var ancestorOrigins: DOMStringList +} + +public class MediaError: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MediaError].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _code = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.code) + _message = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.message) + self.jsObject = jsObject + } + + public static let MEDIA_ERR_ABORTED: UInt16 = 1 + + public static let MEDIA_ERR_NETWORK: UInt16 = 2 + + public static let MEDIA_ERR_DECODE: UInt16 = 3 + + public static let MEDIA_ERR_SRC_NOT_SUPPORTED: UInt16 = 4 + + @ReadonlyAttribute + public var code: UInt16 + + @ReadonlyAttribute + public var message: String +} + +public class MessageChannel: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MessageChannel].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _port1 = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.port1) + _port2 = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.port2) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var port1: MessagePort + + @ReadonlyAttribute + public var port2: MessagePort +} + +public class MessageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.MessageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.data) + _origin = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.origin) + _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.lastEventId) + _source = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.source) + _ports = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ports) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: JSValue + + @ReadonlyAttribute + public var origin: String + + @ReadonlyAttribute + public var lastEventId: String + + @ReadonlyAttribute + public var source: MessageEventSource? + + @ReadonlyAttribute + public var ports: [MessagePort] + + @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = data?.jsValue ?? .undefined + let _arg4 = origin?.jsValue ?? .undefined + let _arg5 = lastEventId?.jsValue ?? .undefined + let _arg6 = source?.jsValue ?? .undefined + let _arg7 = ports?.jsValue ?? .undefined + let this = jsObject + _ = this[HTMLStrings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class MessageEventInit: BridgedDictionary { + public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.data] = data.jsValue + object[HTMLStrings.origin] = origin.jsValue + object[HTMLStrings.lastEventId] = lastEventId.jsValue + object[HTMLStrings.source] = source.jsValue + object[HTMLStrings.ports] = ports.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: HTMLStrings.data) + _origin = ReadWriteAttribute(jsObject: object, name: HTMLStrings.origin) + _lastEventId = ReadWriteAttribute(jsObject: object, name: HTMLStrings.lastEventId) + _source = ReadWriteAttribute(jsObject: object, name: HTMLStrings.source) + _ports = ReadWriteAttribute(jsObject: object, name: HTMLStrings.ports) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: JSValue + + @ReadWriteAttribute + public var origin: String + + @ReadWriteAttribute + public var lastEventId: String + + @ReadWriteAttribute + public var source: MessageEventSource? + + @ReadWriteAttribute + public var ports: [MessagePort] +} + +public class MessagePort: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.MessagePort].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func start() { + let this = jsObject + _ = this[HTMLStrings.start].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[HTMLStrings.close].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class MimeType: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MimeType].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) + _description = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.description) + _suffixes = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.suffixes) + _enabledPlugin = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.enabledPlugin) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var description: String + + @ReadonlyAttribute + public var suffixes: String + + @ReadonlyAttribute + public var enabledPlugin: Plugin +} + +public class MimeTypeArray: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MimeTypeArray].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> MimeType? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> MimeType? { + jsObject[key].fromJSValue() + } +} + +public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Navigator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public protocol NavigatorConcurrentHardware: JSBridgedClass {} +public extension NavigatorConcurrentHardware { + @inlinable var hardwareConcurrency: UInt64 { ReadonlyAttribute[HTMLStrings.hardwareConcurrency, in: jsObject] } +} + +public protocol NavigatorContentUtils: JSBridgedClass {} +public extension NavigatorContentUtils { + @inlinable func registerProtocolHandler(scheme: String, url: String) { + let this = jsObject + _ = this[HTMLStrings.registerProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) + } + + @inlinable func unregisterProtocolHandler(scheme: String, url: String) { + let this = jsObject + _ = this[HTMLStrings.unregisterProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) + } +} + +public protocol NavigatorCookies: JSBridgedClass {} +public extension NavigatorCookies { + @inlinable var cookieEnabled: Bool { ReadonlyAttribute[HTMLStrings.cookieEnabled, in: jsObject] } +} + +public protocol NavigatorID: JSBridgedClass {} +public extension NavigatorID { + @inlinable var appCodeName: String { ReadonlyAttribute[HTMLStrings.appCodeName, in: jsObject] } + + @inlinable var appName: String { ReadonlyAttribute[HTMLStrings.appName, in: jsObject] } + + @inlinable var appVersion: String { ReadonlyAttribute[HTMLStrings.appVersion, in: jsObject] } + + @inlinable var platform: String { ReadonlyAttribute[HTMLStrings.platform, in: jsObject] } + + @inlinable var product: String { ReadonlyAttribute[HTMLStrings.product, in: jsObject] } + + @inlinable var productSub: String { ReadonlyAttribute[HTMLStrings.productSub, in: jsObject] } + + @inlinable var userAgent: String { ReadonlyAttribute[HTMLStrings.userAgent, in: jsObject] } + + @inlinable var vendor: String { ReadonlyAttribute[HTMLStrings.vendor, in: jsObject] } + + @inlinable var vendorSub: String { ReadonlyAttribute[HTMLStrings.vendorSub, in: jsObject] } + + @inlinable func taintEnabled() -> Bool { + let this = jsObject + return this[HTMLStrings.taintEnabled].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var oscpu: String { ReadonlyAttribute[HTMLStrings.oscpu, in: jsObject] } +} + +public protocol NavigatorLanguage: JSBridgedClass {} +public extension NavigatorLanguage { + @inlinable var language: String { ReadonlyAttribute[HTMLStrings.language, in: jsObject] } + + @inlinable var languages: [String] { ReadonlyAttribute[HTMLStrings.languages, in: jsObject] } +} + +public protocol NavigatorOnLine: JSBridgedClass {} +public extension NavigatorOnLine { + @inlinable var onLine: Bool { ReadonlyAttribute[HTMLStrings.onLine, in: jsObject] } +} + +public protocol NavigatorPlugins: JSBridgedClass {} +public extension NavigatorPlugins { + @inlinable var plugins: PluginArray { ReadonlyAttribute[HTMLStrings.plugins, in: jsObject] } + + @inlinable var mimeTypes: MimeTypeArray { ReadonlyAttribute[HTMLStrings.mimeTypes, in: jsObject] } + + @inlinable func javaEnabled() -> Bool { + let this = jsObject + return this[HTMLStrings.javaEnabled].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var pdfViewerEnabled: Bool { ReadonlyAttribute[HTMLStrings.pdfViewerEnabled, in: jsObject] } +} + +public class OffscreenCanvas: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.OffscreenCanvas].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) + _oncontextlost = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.oncontextlost) + _oncontextrestored = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.oncontextrestored) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(width: UInt64, height: UInt64) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [width.jsValue, height.jsValue])) + } + + @ReadWriteAttribute + public var width: UInt64 + + @ReadWriteAttribute + public var height: UInt64 + + @inlinable public func getContext(contextId: OffscreenRenderingContextId, options: JSValue? = nil) -> OffscreenRenderingContext? { + let this = jsObject + return this[HTMLStrings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func transferToImageBitmap() -> ImageBitmap { + let this = jsObject + return this[HTMLStrings.transferToImageBitmap].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise { + let this = jsObject + return this[HTMLStrings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob { + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ClosureAttribute1Optional + public var oncontextlost: EventHandler + + @ClosureAttribute1Optional + public var oncontextrestored: EventHandler +} + +public class OffscreenCanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.OffscreenCanvasRenderingContext2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.canvas) + self.jsObject = jsObject + } + + @inlinable public func commit() { + let this = jsObject + _ = this[HTMLStrings.commit].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var canvas: OffscreenCanvas +} + +public enum OffscreenRenderingContextId: JSString, JSValueCompatible { + case _2d = "2d" + case bitmaprenderer = "bitmaprenderer" + case webgl = "webgl" + case webgl2 = "webgl2" + case webgpu = "webgpu" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class PageTransitionEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.PageTransitionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _persisted = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.persisted) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PageTransitionEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var persisted: Bool +} + +public class PageTransitionEventInit: BridgedDictionary { + public convenience init(persisted: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.persisted] = persisted.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _persisted = ReadWriteAttribute(jsObject: object, name: HTMLStrings.persisted) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var persisted: Bool +} + +public class Path2D: JSBridgedClass, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Path2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(path: Path2D_or_String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) + } + + @inlinable public func addPath(path: Path2D, transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[HTMLStrings.addPath].function!(this: this, arguments: [path.jsValue, transform?.jsValue ?? .undefined]) + } +} + +public class Plugin: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Plugin].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.name) + _description = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.description) + _filename = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.filename) + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var description: String + + @ReadonlyAttribute + public var filename: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> MimeType? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> MimeType? { + jsObject[key].fromJSValue() + } +} + +public class PluginArray: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.PluginArray].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @inlinable public func refresh() { + let this = jsObject + _ = this[HTMLStrings.refresh].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Plugin? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Plugin? { + jsObject[key].fromJSValue() + } +} + +public class PopStateEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.PopStateEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.state) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PopStateEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var state: JSValue +} + +public class PopStateEventInit: BridgedDictionary { + public convenience init(state: JSValue) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.state] = state.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _state = ReadWriteAttribute(jsObject: object, name: HTMLStrings.state) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var state: JSValue +} + +public enum PredefinedColorSpace: JSString, JSValueCompatible { + case srgb = "srgb" + case displayP3 = "display-p3" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum PremultiplyAlpha: JSString, JSValueCompatible { + case none = "none" + case premultiply = "premultiply" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class PromiseRejectionEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.PromiseRejectionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _promise = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.promise) + _reason = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.reason) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PromiseRejectionEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var promise: JSPromise + + @ReadonlyAttribute + public var reason: JSValue +} + +public class PromiseRejectionEventInit: BridgedDictionary { + public convenience init(promise: JSPromise, reason: JSValue) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.promise] = promise.jsValue + object[HTMLStrings.reason] = reason.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _promise = ReadWriteAttribute(jsObject: object, name: HTMLStrings.promise) + _reason = ReadWriteAttribute(jsObject: object, name: HTMLStrings.reason) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var promise: JSPromise + + @ReadWriteAttribute + public var reason: JSValue +} + +public class RadioNodeList: NodeList { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.RadioNodeList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var value: String +} + +public enum ResizeQuality: JSString, JSValueCompatible { + case pixelated = "pixelated" + case low = "low" + case medium = "medium" + case high = "high" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ScrollRestoration: JSString, JSValueCompatible { + case auto = "auto" + case manual = "manual" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum SelectionMode: JSString, JSValueCompatible { + case select = "select" + case start = "start" + case end = "end" + case preserve = "preserve" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class SharedWorker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.SharedWorker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _port = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.port) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(scriptURL: String, options: String_or_WorkerOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var port: MessagePort +} + +public class Storage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Storage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func key(index: UInt32) -> String? { + let this = jsObject + return this[HTMLStrings.key].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public subscript(key: String) -> String? { + jsObject[key].fromJSValue() + } + + // XXX: unsupported setter for keys of type String + + // XXX: unsupported deleter for keys of type String + + @inlinable public func clear() { + let this = jsObject + _ = this[HTMLStrings.clear].function!(this: this, arguments: []) + } +} + +public class StorageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.StorageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _key = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.key) + _oldValue = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.oldValue) + _newValue = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.newValue) + _url = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.url) + _storageArea = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.storageArea) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: StorageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var key: String? + + @ReadonlyAttribute + public var oldValue: String? + + @ReadonlyAttribute + public var newValue: String? + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var storageArea: Storage? + + @inlinable public func initStorageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, key: String? = nil, oldValue: String? = nil, newValue: String? = nil, url: String? = nil, storageArea: Storage? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = key?.jsValue ?? .undefined + let _arg4 = oldValue?.jsValue ?? .undefined + let _arg5 = newValue?.jsValue ?? .undefined + let _arg6 = url?.jsValue ?? .undefined + let _arg7 = storageArea?.jsValue ?? .undefined + let this = jsObject + _ = this[HTMLStrings.initStorageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class StorageEventInit: BridgedDictionary { + public convenience init(key: String?, oldValue: String?, newValue: String?, url: String, storageArea: Storage?) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.key] = key.jsValue + object[HTMLStrings.oldValue] = oldValue.jsValue + object[HTMLStrings.newValue] = newValue.jsValue + object[HTMLStrings.url] = url.jsValue + object[HTMLStrings.storageArea] = storageArea.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _key = ReadWriteAttribute(jsObject: object, name: HTMLStrings.key) + _oldValue = ReadWriteAttribute(jsObject: object, name: HTMLStrings.oldValue) + _newValue = ReadWriteAttribute(jsObject: object, name: HTMLStrings.newValue) + _url = ReadWriteAttribute(jsObject: object, name: HTMLStrings.url) + _storageArea = ReadWriteAttribute(jsObject: object, name: HTMLStrings.storageArea) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var key: String? + + @ReadWriteAttribute + public var oldValue: String? + + @ReadWriteAttribute + public var newValue: String? + + @ReadWriteAttribute + public var url: String + + @ReadWriteAttribute + public var storageArea: Storage? +} + +public class StructuredSerializeOptions: BridgedDictionary { + public convenience init(transfer: [JSObject]) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.transfer] = transfer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _transfer = ReadWriteAttribute(jsObject: object, name: HTMLStrings.transfer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var transfer: [JSObject] +} + +public class SubmitEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.SubmitEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _submitter = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.submitter) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: SubmitEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var submitter: HTMLElement? +} + +public class SubmitEventInit: BridgedDictionary { + public convenience init(submitter: HTMLElement?) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.submitter] = submitter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _submitter = ReadWriteAttribute(jsObject: object, name: HTMLStrings.submitter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var submitter: HTMLElement? +} + +public class TextMetrics: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextMetrics].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.width) + _actualBoundingBoxLeft = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxLeft) + _actualBoundingBoxRight = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxRight) + _fontBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.fontBoundingBoxAscent) + _fontBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.fontBoundingBoxDescent) + _actualBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxAscent) + _actualBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxDescent) + _emHeightAscent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.emHeightAscent) + _emHeightDescent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.emHeightDescent) + _hangingBaseline = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.hangingBaseline) + _alphabeticBaseline = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.alphabeticBaseline) + _ideographicBaseline = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ideographicBaseline) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var width: Double + + @ReadonlyAttribute + public var actualBoundingBoxLeft: Double + + @ReadonlyAttribute + public var actualBoundingBoxRight: Double + + @ReadonlyAttribute + public var fontBoundingBoxAscent: Double + + @ReadonlyAttribute + public var fontBoundingBoxDescent: Double + + @ReadonlyAttribute + public var actualBoundingBoxAscent: Double + + @ReadonlyAttribute + public var actualBoundingBoxDescent: Double + + @ReadonlyAttribute + public var emHeightAscent: Double + + @ReadonlyAttribute + public var emHeightDescent: Double + + @ReadonlyAttribute + public var hangingBaseline: Double + + @ReadonlyAttribute + public var alphabeticBaseline: Double + + @ReadonlyAttribute + public var ideographicBaseline: Double +} + +public class TextTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.language) + _id = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.id) + _inBandMetadataTrackDispatchType = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.inBandMetadataTrackDispatchType) + _mode = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.mode) + _cues = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.cues) + _activeCues = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.activeCues) + _oncuechange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.oncuechange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var kind: TextTrackKind + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var inBandMetadataTrackDispatchType: String + + @ReadWriteAttribute + public var mode: TextTrackMode + + @ReadonlyAttribute + public var cues: TextTrackCueList? + + @ReadonlyAttribute + public var activeCues: TextTrackCueList? + + @inlinable public func addCue(cue: TextTrackCue) { + let this = jsObject + _ = this[HTMLStrings.addCue].function!(this: this, arguments: [cue.jsValue]) + } + + @inlinable public func removeCue(cue: TextTrackCue) { + let this = jsObject + _ = this[HTMLStrings.removeCue].function!(this: this, arguments: [cue.jsValue]) + } + + @ClosureAttribute1Optional + public var oncuechange: EventHandler +} + +public class TextTrackCue: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrackCue].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.track) + _id = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.id) + _startTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.startTime) + _endTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.endTime) + _pauseOnExit = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.pauseOnExit) + _onenter = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onenter) + _onexit = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onexit) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var track: TextTrack? + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var startTime: Double + + @ReadWriteAttribute + public var endTime: Double + + @ReadWriteAttribute + public var pauseOnExit: Bool + + @ClosureAttribute1Optional + public var onenter: EventHandler + + @ClosureAttribute1Optional + public var onexit: EventHandler +} + +public class TextTrackCueList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrackCueList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> TextTrackCue { + jsObject[key].fromJSValue()! + } + + @inlinable public func getCueById(id: String) -> TextTrackCue? { + let this = jsObject + return this[HTMLStrings.getCueById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } +} + +public enum TextTrackKind: JSString, JSValueCompatible { + case subtitles = "subtitles" + case captions = "captions" + case descriptions = "descriptions" + case chapters = "chapters" + case metadata = "metadata" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TextTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> TextTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> TextTrack? { + let this = jsObject + return this[HTMLStrings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public enum TextTrackMode: JSString, JSValueCompatible { + case disabled = "disabled" + case hidden = "hidden" + case showing = "showing" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TimeRanges: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.TimeRanges].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func start(index: UInt32) -> Double { + let this = jsObject + return this[HTMLStrings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public func end(index: UInt32) -> Double { + let this = jsObject + return this[HTMLStrings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public class TrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TrackEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var track: AudioTrack_or_TextTrack_or_VideoTrack? +} + +public class TrackEventInit: BridgedDictionary { + public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.track] = track.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _track = ReadWriteAttribute(jsObject: object, name: HTMLStrings.track) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var track: AudioTrack_or_TextTrack_or_VideoTrack? +} + +public typealias CanvasFilterInput = [String: JSValue] + +public typealias EventHandler = EventHandlerNonNull? +public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? +public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? + +public typealias BlobCallback = (Blob?) -> Void +public typealias FunctionStringCallback = (String) -> Void +public typealias EventHandlerNonNull = (Event) -> JSValue +public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue +public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? +public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void +public class ValidityState: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ValidityState].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.valueMissing) + _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.typeMismatch) + _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.patternMismatch) + _tooLong = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.tooLong) + _tooShort = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.tooShort) + _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rangeUnderflow) + _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rangeOverflow) + _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.stepMismatch) + _badInput = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.badInput) + _customError = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.customError) + _valid = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.valid) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var valueMissing: Bool + + @ReadonlyAttribute + public var typeMismatch: Bool + + @ReadonlyAttribute + public var patternMismatch: Bool + + @ReadonlyAttribute + public var tooLong: Bool + + @ReadonlyAttribute + public var tooShort: Bool + + @ReadonlyAttribute + public var rangeUnderflow: Bool + + @ReadonlyAttribute + public var rangeOverflow: Bool + + @ReadonlyAttribute + public var stepMismatch: Bool + + @ReadonlyAttribute + public var badInput: Bool + + @ReadonlyAttribute + public var customError: Bool + + @ReadonlyAttribute + public var valid: Bool +} + +public class ValidityStateFlags: BridgedDictionary { + public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.valueMissing] = valueMissing.jsValue + object[HTMLStrings.typeMismatch] = typeMismatch.jsValue + object[HTMLStrings.patternMismatch] = patternMismatch.jsValue + object[HTMLStrings.tooLong] = tooLong.jsValue + object[HTMLStrings.tooShort] = tooShort.jsValue + object[HTMLStrings.rangeUnderflow] = rangeUnderflow.jsValue + object[HTMLStrings.rangeOverflow] = rangeOverflow.jsValue + object[HTMLStrings.stepMismatch] = stepMismatch.jsValue + object[HTMLStrings.badInput] = badInput.jsValue + object[HTMLStrings.customError] = customError.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _valueMissing = ReadWriteAttribute(jsObject: object, name: HTMLStrings.valueMissing) + _typeMismatch = ReadWriteAttribute(jsObject: object, name: HTMLStrings.typeMismatch) + _patternMismatch = ReadWriteAttribute(jsObject: object, name: HTMLStrings.patternMismatch) + _tooLong = ReadWriteAttribute(jsObject: object, name: HTMLStrings.tooLong) + _tooShort = ReadWriteAttribute(jsObject: object, name: HTMLStrings.tooShort) + _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: HTMLStrings.rangeUnderflow) + _rangeOverflow = ReadWriteAttribute(jsObject: object, name: HTMLStrings.rangeOverflow) + _stepMismatch = ReadWriteAttribute(jsObject: object, name: HTMLStrings.stepMismatch) + _badInput = ReadWriteAttribute(jsObject: object, name: HTMLStrings.badInput) + _customError = ReadWriteAttribute(jsObject: object, name: HTMLStrings.customError) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var valueMissing: Bool + + @ReadWriteAttribute + public var typeMismatch: Bool + + @ReadWriteAttribute + public var patternMismatch: Bool + + @ReadWriteAttribute + public var tooLong: Bool + + @ReadWriteAttribute + public var tooShort: Bool + + @ReadWriteAttribute + public var rangeUnderflow: Bool + + @ReadWriteAttribute + public var rangeOverflow: Bool + + @ReadWriteAttribute + public var stepMismatch: Bool + + @ReadWriteAttribute + public var badInput: Bool + + @ReadWriteAttribute + public var customError: Bool +} + +public class VideoTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.VideoTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.language) + _selected = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selected) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var selected: Bool +} + +public class VideoTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.VideoTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.selectedIndex) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> VideoTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> VideoTrack? { + let this = jsObject + return this[HTMLStrings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.Window].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _window = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.window) + _self = ReadonlyAttribute(jsObject: jsObject, name: Strings._self) + _document = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.document) + _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) + _location = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.location) + _history = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.history) + _customElements = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.customElements) + _locationbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.locationbar) + _menubar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.menubar) + _personalbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.personalbar) + _scrollbars = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.scrollbars) + _statusbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.statusbar) + _toolbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.toolbar) + _status = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.status) + _closed = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.closed) + _frames = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.frames) + _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) + _top = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.top) + _opener = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.opener) + _parent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.parent) + _frameElement = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.frameElement) + _navigator = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.navigator) + _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.clientInformation) + _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.originAgentCluster) + _external = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.external) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var window: WindowProxy + + @ReadonlyAttribute + public var `self`: WindowProxy + + @ReadonlyAttribute + public var document: Document + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var location: Location + + @ReadonlyAttribute + public var history: History + + @ReadonlyAttribute + public var customElements: CustomElementRegistry + + @ReadonlyAttribute + public var locationbar: BarProp + + @ReadonlyAttribute + public var menubar: BarProp + + @ReadonlyAttribute + public var personalbar: BarProp + + @ReadonlyAttribute + public var scrollbars: BarProp + + @ReadonlyAttribute + public var statusbar: BarProp + + @ReadonlyAttribute + public var toolbar: BarProp + + @ReadWriteAttribute + public var status: String + + @inlinable public func close() { + let this = jsObject + _ = this[HTMLStrings.close].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var closed: Bool + + @inlinable public func stop() { + let this = jsObject + _ = this[HTMLStrings.stop].function!(this: this, arguments: []) + } + + @inlinable public func focus() { + let this = jsObject + _ = this[HTMLStrings.focus].function!(this: this, arguments: []) + } + + @inlinable public func blur() { + let this = jsObject + _ = this[HTMLStrings.blur].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var frames: WindowProxy + + @ReadonlyAttribute + public var length: UInt32 + + @ReadonlyAttribute + public var top: WindowProxy? + + @ReadWriteAttribute + public var opener: JSValue + + @ReadonlyAttribute + public var parent: WindowProxy? + + @ReadonlyAttribute + public var frameElement: Element? + + @inlinable public func open(url: String? = nil, target: String? = nil, features: String? = nil) -> WindowProxy? { + let this = jsObject + return this[HTMLStrings.open].function!(this: this, arguments: [url?.jsValue ?? .undefined, target?.jsValue ?? .undefined, features?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public subscript(key: String) -> JSObject { + jsObject[key].fromJSValue()! + } + + @ReadonlyAttribute + public var navigator: Navigator + + @ReadonlyAttribute + public var clientInformation: Navigator + + @ReadonlyAttribute + public var originAgentCluster: Bool + + @inlinable public func alert() { + let this = jsObject + _ = this[HTMLStrings.alert].function!(this: this, arguments: []) + } + + @inlinable public func alert(message: String) { + let this = jsObject + _ = this[HTMLStrings.alert].function!(this: this, arguments: [message.jsValue]) + } + + @inlinable public func confirm(message: String? = nil) -> Bool { + let this = jsObject + return this[HTMLStrings.confirm].function!(this: this, arguments: [message?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func prompt(message: String? = nil, default: String? = nil) -> String? { + let this = jsObject + return this[HTMLStrings.prompt].function!(this: this, arguments: [message?.jsValue ?? .undefined, `default`?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func print() { + let this = jsObject + _ = this[HTMLStrings.print].function!(this: this, arguments: []) + } + + @inlinable public func postMessage(message: JSValue, targetOrigin: String, transfer: [JSObject]? = nil) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, targetOrigin.jsValue, transfer?.jsValue ?? .undefined]) + } + + @inlinable public func postMessage(message: JSValue, options: WindowPostMessageOptions? = nil) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func captureEvents() { + let this = jsObject + _ = this[HTMLStrings.captureEvents].function!(this: this, arguments: []) + } + + @inlinable public func releaseEvents() { + let this = jsObject + _ = this[HTMLStrings.releaseEvents].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var external: External +} + +public protocol WindowEventHandlers: JSBridgedClass {} +public extension WindowEventHandlers { + @inlinable var onafterprint: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onafterprint, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onafterprint, in: jsObject] = newValue } + } + + @inlinable var onbeforeprint: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onbeforeprint, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onbeforeprint, in: jsObject] = newValue } + } + + @inlinable var onbeforeunload: OnBeforeUnloadEventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onbeforeunload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onbeforeunload, in: jsObject] = newValue } + } + + @inlinable var onhashchange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onhashchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onhashchange, in: jsObject] = newValue } + } + + @inlinable var onlanguagechange: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onlanguagechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onlanguagechange, in: jsObject] = newValue } + } + + @inlinable var onmessage: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmessage, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmessage, in: jsObject] = newValue } + } + + @inlinable var onmessageerror: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onmessageerror, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmessageerror, in: jsObject] = newValue } + } + + @inlinable var onoffline: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onoffline, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onoffline, in: jsObject] = newValue } + } + + @inlinable var ononline: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.ononline, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.ononline, in: jsObject] = newValue } + } + + @inlinable var onpagehide: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onpagehide, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpagehide, in: jsObject] = newValue } + } + + @inlinable var onpageshow: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onpageshow, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpageshow, in: jsObject] = newValue } + } + + @inlinable var onpopstate: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onpopstate, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpopstate, in: jsObject] = newValue } + } + + @inlinable var onrejectionhandled: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onrejectionhandled, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onrejectionhandled, in: jsObject] = newValue } + } + + @inlinable var onstorage: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onstorage, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onstorage, in: jsObject] = newValue } + } + + @inlinable var onunhandledrejection: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onunhandledrejection, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onunhandledrejection, in: jsObject] = newValue } + } + + @inlinable var onunload: EventHandler { + get { ClosureAttribute1Optional[HTMLStrings.onunload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[HTMLStrings.onunload, in: jsObject] = newValue } + } +} + +public protocol WindowLocalStorage: JSBridgedClass {} +public extension WindowLocalStorage { + @inlinable var localStorage: Storage { ReadonlyAttribute[HTMLStrings.localStorage, in: jsObject] } +} + +public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} +public extension WindowOrWorkerGlobalScope { + @inlinable var origin: String { ReadonlyAttribute[HTMLStrings.origin, in: jsObject] } + + @inlinable var isSecureContext: Bool { ReadonlyAttribute[HTMLStrings.isSecureContext, in: jsObject] } + + @inlinable var crossOriginIsolated: Bool { ReadonlyAttribute[HTMLStrings.crossOriginIsolated, in: jsObject] } + + @inlinable func reportError(e: JSValue) { + let this = jsObject + _ = this[HTMLStrings.reportError].function!(this: this, arguments: [e.jsValue]) + } + + @inlinable func btoa(data: String) -> String { + let this = jsObject + return this[HTMLStrings.btoa].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable func atob(data: String) -> String { + let this = jsObject + return this[HTMLStrings.atob].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable func setTimeout(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { + let this = jsObject + return this[HTMLStrings.setTimeout].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! + } + + @inlinable func clearTimeout(id: Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.clearTimeout].function!(this: this, arguments: [id?.jsValue ?? .undefined]) + } + + @inlinable func setInterval(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { + let this = jsObject + return this[HTMLStrings.setInterval].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! + } + + @inlinable func clearInterval(id: Int32? = nil) { + let this = jsObject + _ = this[HTMLStrings.clearInterval].function!(this: this, arguments: [id?.jsValue ?? .undefined]) + } + + // XXX: method 'queueMicrotask' is ignored + + @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) -> JSPromise { + let this = jsObject + return this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) -> JSPromise { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = options?.jsValue ?? .undefined + let this = jsObject + return this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = options?.jsValue ?? .undefined + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func structuredClone(value: JSValue, options: StructuredSerializeOptions? = nil) -> JSValue { + let this = jsObject + return this[HTMLStrings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class WindowPostMessageOptions: BridgedDictionary { + public convenience init(targetOrigin: String) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.targetOrigin] = targetOrigin.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _targetOrigin = ReadWriteAttribute(jsObject: object, name: HTMLStrings.targetOrigin) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var targetOrigin: String +} + +public protocol WindowSessionStorage: JSBridgedClass {} +public extension WindowSessionStorage { + @inlinable var sessionStorage: Storage { ReadonlyAttribute[HTMLStrings.sessionStorage, in: jsObject] } +} + +public class Worker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.Worker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(scriptURL: String, options: WorkerOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) + } + + @inlinable public func terminate() { + let this = jsObject + _ = this[HTMLStrings.terminate].function!(this: this, arguments: []) + } + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class WorkerOptions: BridgedDictionary { + public convenience init(type: WorkerType, credentials: RequestCredentials, name: String) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.type] = type.jsValue + object[HTMLStrings.credentials] = credentials.jsValue + object[HTMLStrings.name] = name.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: HTMLStrings.type) + _credentials = ReadWriteAttribute(jsObject: object, name: HTMLStrings.credentials) + _name = ReadWriteAttribute(jsObject: object, name: HTMLStrings.name) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: WorkerType + + @ReadWriteAttribute + public var credentials: RequestCredentials + + @ReadWriteAttribute + public var name: String +} + +public enum WorkerType: JSString, JSValueCompatible { + case classic = "classic" + case module = "module" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Worklet: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Worklet].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) -> JSPromise { + let this = jsObject + return this[HTMLStrings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[HTMLStrings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class WorkletOptions: BridgedDictionary { + public convenience init(credentials: RequestCredentials) { + let object = JSObject.global[HTMLStrings.Object].function!.new() + object[HTMLStrings.credentials] = credentials.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _credentials = ReadWriteAttribute(jsObject: object, name: HTMLStrings.credentials) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var credentials: RequestCredentials +} + +/* variadic generics please */ +@propertyWrapper public final class ClosureAttribute1 + where A0: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0) -> ReturnType { + get { ClosureAttribute1[name, in: jsObject] } + set { ClosureAttribute1[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!).jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute1Optional + where A0: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0) -> ReturnType)? { + get { ClosureAttribute1Optional[name, in: jsObject] } + set { ClosureAttribute1Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute1OptionalVoid + where A0: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0) -> Void)? { + get { ClosureAttribute1OptionalVoid[name, in: jsObject] } + set { ClosureAttribute1OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue) } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!) + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute1Void + where A0: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0) -> Void { + get { ClosureAttribute1Void[name, in: jsObject] } + set { ClosureAttribute1Void[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> Void { + get { + let function = jsObject[name].function! + return { function($0.jsValue) } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!) + return .undefined + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute5 + where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0, A1, A2, A3, A4) -> ReturnType { + get { ClosureAttribute5[name, in: jsObject] } + set { ClosureAttribute5[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1, A2, A3, A4) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute5Optional + where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0, A1, A2, A3, A4) -> ReturnType)? { + get { ClosureAttribute5Optional[name, in: jsObject] } + set { ClosureAttribute5Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1, A2, A3, A4) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@usableFromInline enum HTMLStrings { + static let _self: JSString = "self" + @usableFromInline static let AddSearchProvider: JSString = "AddSearchProvider" + @usableFromInline static let AudioTrack: JSString = "AudioTrack" + @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" + @usableFromInline static let BarProp: JSString = "BarProp" + @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" + @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" + @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" + @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" + @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" + @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" + @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" + @usableFromInline static let DOMParser: JSString = "DOMParser" + @usableFromInline static let DOMStringList: JSString = "DOMStringList" + @usableFromInline static let DOMStringMap: JSString = "DOMStringMap" + @usableFromInline static let DataTransfer: JSString = "DataTransfer" + @usableFromInline static let DataTransferItem: JSString = "DataTransferItem" + @usableFromInline static let DataTransferItemList: JSString = "DataTransferItemList" + @usableFromInline static let DragEvent: JSString = "DragEvent" + @usableFromInline static let ElementInternals: JSString = "ElementInternals" + @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" + @usableFromInline static let EventSource: JSString = "EventSource" + @usableFromInline static let External: JSString = "External" + @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" + @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" + @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" + @usableFromInline static let HTMLAreaElement: JSString = "HTMLAreaElement" + @usableFromInline static let HTMLAudioElement: JSString = "HTMLAudioElement" + @usableFromInline static let HTMLBRElement: JSString = "HTMLBRElement" + @usableFromInline static let HTMLBaseElement: JSString = "HTMLBaseElement" + @usableFromInline static let HTMLBodyElement: JSString = "HTMLBodyElement" + @usableFromInline static let HTMLButtonElement: JSString = "HTMLButtonElement" + @usableFromInline static let HTMLCanvasElement: JSString = "HTMLCanvasElement" + @usableFromInline static let HTMLDListElement: JSString = "HTMLDListElement" + @usableFromInline static let HTMLDataElement: JSString = "HTMLDataElement" + @usableFromInline static let HTMLDataListElement: JSString = "HTMLDataListElement" + @usableFromInline static let HTMLDetailsElement: JSString = "HTMLDetailsElement" + @usableFromInline static let HTMLDialogElement: JSString = "HTMLDialogElement" + @usableFromInline static let HTMLDirectoryElement: JSString = "HTMLDirectoryElement" + @usableFromInline static let HTMLDivElement: JSString = "HTMLDivElement" + @usableFromInline static let HTMLElement: JSString = "HTMLElement" + @usableFromInline static let HTMLEmbedElement: JSString = "HTMLEmbedElement" + @usableFromInline static let HTMLFieldSetElement: JSString = "HTMLFieldSetElement" + @usableFromInline static let HTMLFontElement: JSString = "HTMLFontElement" + @usableFromInline static let HTMLFormControlsCollection: JSString = "HTMLFormControlsCollection" + @usableFromInline static let HTMLFormElement: JSString = "HTMLFormElement" + @usableFromInline static let HTMLFrameElement: JSString = "HTMLFrameElement" + @usableFromInline static let HTMLFrameSetElement: JSString = "HTMLFrameSetElement" + @usableFromInline static let HTMLHRElement: JSString = "HTMLHRElement" + @usableFromInline static let HTMLHeadElement: JSString = "HTMLHeadElement" + @usableFromInline static let HTMLHeadingElement: JSString = "HTMLHeadingElement" + @usableFromInline static let HTMLHtmlElement: JSString = "HTMLHtmlElement" + @usableFromInline static let HTMLIFrameElement: JSString = "HTMLIFrameElement" + @usableFromInline static let HTMLImageElement: JSString = "HTMLImageElement" + @usableFromInline static let HTMLInputElement: JSString = "HTMLInputElement" + @usableFromInline static let HTMLLIElement: JSString = "HTMLLIElement" + @usableFromInline static let HTMLLabelElement: JSString = "HTMLLabelElement" + @usableFromInline static let HTMLLegendElement: JSString = "HTMLLegendElement" + @usableFromInline static let HTMLLinkElement: JSString = "HTMLLinkElement" + @usableFromInline static let HTMLMapElement: JSString = "HTMLMapElement" + @usableFromInline static let HTMLMarqueeElement: JSString = "HTMLMarqueeElement" + @usableFromInline static let HTMLMediaElement: JSString = "HTMLMediaElement" + @usableFromInline static let HTMLMenuElement: JSString = "HTMLMenuElement" + @usableFromInline static let HTMLMetaElement: JSString = "HTMLMetaElement" + @usableFromInline static let HTMLMeterElement: JSString = "HTMLMeterElement" + @usableFromInline static let HTMLModElement: JSString = "HTMLModElement" + @usableFromInline static let HTMLOListElement: JSString = "HTMLOListElement" + @usableFromInline static let HTMLObjectElement: JSString = "HTMLObjectElement" + @usableFromInline static let HTMLOptGroupElement: JSString = "HTMLOptGroupElement" + @usableFromInline static let HTMLOptionElement: JSString = "HTMLOptionElement" + @usableFromInline static let HTMLOptionsCollection: JSString = "HTMLOptionsCollection" + @usableFromInline static let HTMLOutputElement: JSString = "HTMLOutputElement" + @usableFromInline static let HTMLParagraphElement: JSString = "HTMLParagraphElement" + @usableFromInline static let HTMLParamElement: JSString = "HTMLParamElement" + @usableFromInline static let HTMLPictureElement: JSString = "HTMLPictureElement" + @usableFromInline static let HTMLPreElement: JSString = "HTMLPreElement" + @usableFromInline static let HTMLProgressElement: JSString = "HTMLProgressElement" + @usableFromInline static let HTMLQuoteElement: JSString = "HTMLQuoteElement" + @usableFromInline static let HTMLScriptElement: JSString = "HTMLScriptElement" + @usableFromInline static let HTMLSelectElement: JSString = "HTMLSelectElement" + @usableFromInline static let HTMLSlotElement: JSString = "HTMLSlotElement" + @usableFromInline static let HTMLSourceElement: JSString = "HTMLSourceElement" + @usableFromInline static let HTMLSpanElement: JSString = "HTMLSpanElement" + @usableFromInline static let HTMLStyleElement: JSString = "HTMLStyleElement" + @usableFromInline static let HTMLTableCaptionElement: JSString = "HTMLTableCaptionElement" + @usableFromInline static let HTMLTableCellElement: JSString = "HTMLTableCellElement" + @usableFromInline static let HTMLTableColElement: JSString = "HTMLTableColElement" + @usableFromInline static let HTMLTableElement: JSString = "HTMLTableElement" + @usableFromInline static let HTMLTableRowElement: JSString = "HTMLTableRowElement" + @usableFromInline static let HTMLTableSectionElement: JSString = "HTMLTableSectionElement" + @usableFromInline static let HTMLTemplateElement: JSString = "HTMLTemplateElement" + @usableFromInline static let HTMLTextAreaElement: JSString = "HTMLTextAreaElement" + @usableFromInline static let HTMLTimeElement: JSString = "HTMLTimeElement" + @usableFromInline static let HTMLTitleElement: JSString = "HTMLTitleElement" + @usableFromInline static let HTMLTrackElement: JSString = "HTMLTrackElement" + @usableFromInline static let HTMLUListElement: JSString = "HTMLUListElement" + @usableFromInline static let HTMLUnknownElement: JSString = "HTMLUnknownElement" + @usableFromInline static let HTMLVideoElement: JSString = "HTMLVideoElement" + @usableFromInline static let HashChangeEvent: JSString = "HashChangeEvent" + @usableFromInline static let History: JSString = "History" + @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" + @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" + @usableFromInline static let ImageData: JSString = "ImageData" + @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" + @usableFromInline static let Location: JSString = "Location" + @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MessageChannel: JSString = "MessageChannel" + @usableFromInline static let MessageEvent: JSString = "MessageEvent" + @usableFromInline static let MessagePort: JSString = "MessagePort" + @usableFromInline static let MimeType: JSString = "MimeType" + @usableFromInline static let MimeTypeArray: JSString = "MimeTypeArray" + @usableFromInline static let Navigator: JSString = "Navigator" + @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" + @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" + @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" + @usableFromInline static let Path2D: JSString = "Path2D" + @usableFromInline static let Plugin: JSString = "Plugin" + @usableFromInline static let PluginArray: JSString = "PluginArray" + @usableFromInline static let PopStateEvent: JSString = "PopStateEvent" + @usableFromInline static let PromiseRejectionEvent: JSString = "PromiseRejectionEvent" + @usableFromInline static let RadioNodeList: JSString = "RadioNodeList" + @usableFromInline static let SharedWorker: JSString = "SharedWorker" + @usableFromInline static let Storage: JSString = "Storage" + @usableFromInline static let StorageEvent: JSString = "StorageEvent" + @usableFromInline static let SubmitEvent: JSString = "SubmitEvent" + @usableFromInline static let TextMetrics: JSString = "TextMetrics" + @usableFromInline static let TextTrack: JSString = "TextTrack" + @usableFromInline static let TextTrackCue: JSString = "TextTrackCue" + @usableFromInline static let TextTrackCueList: JSString = "TextTrackCueList" + @usableFromInline static let TextTrackList: JSString = "TextTrackList" + @usableFromInline static let TimeRanges: JSString = "TimeRanges" + @usableFromInline static let TrackEvent: JSString = "TrackEvent" + @usableFromInline static let ValidityState: JSString = "ValidityState" + @usableFromInline static let VideoTrack: JSString = "VideoTrack" + @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" + @usableFromInline static let Window: JSString = "Window" + @usableFromInline static let Worker: JSString = "Worker" + @usableFromInline static let Worklet: JSString = "Worklet" + @usableFromInline static let aLink: JSString = "aLink" + @usableFromInline static let abbr: JSString = "abbr" + @usableFromInline static let accept: JSString = "accept" + @usableFromInline static let acceptCharset: JSString = "acceptCharset" + @usableFromInline static let accessKey: JSString = "accessKey" + @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" + @usableFromInline static let action: JSString = "action" + @usableFromInline static let activeCues: JSString = "activeCues" + @usableFromInline static let activeElement: JSString = "activeElement" + @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" + @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" + @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" + @usableFromInline static let actualBoundingBoxRight: JSString = "actualBoundingBoxRight" + @usableFromInline static let add: JSString = "add" + @usableFromInline static let addColorStop: JSString = "addColorStop" + @usableFromInline static let addCue: JSString = "addCue" + @usableFromInline static let addModule: JSString = "addModule" + @usableFromInline static let addPath: JSString = "addPath" + @usableFromInline static let addTextTrack: JSString = "addTextTrack" + @usableFromInline static let alert: JSString = "alert" + @usableFromInline static let align: JSString = "align" + @usableFromInline static let allow: JSString = "allow" + @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" + @usableFromInline static let alpha: JSString = "alpha" + @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" + @usableFromInline static let alt: JSString = "alt" + @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" + @usableFromInline static let appCodeName: JSString = "appCodeName" + @usableFromInline static let appName: JSString = "appName" + @usableFromInline static let appVersion: JSString = "appVersion" + @usableFromInline static let arc: JSString = "arc" + @usableFromInline static let arcTo: JSString = "arcTo" + @usableFromInline static let archive: JSString = "archive" + @usableFromInline static let areas: JSString = "areas" + @usableFromInline static let `as`: JSString = "as" + @usableFromInline static let assign: JSString = "assign" + @usableFromInline static let assignedElements: JSString = "assignedElements" + @usableFromInline static let assignedNodes: JSString = "assignedNodes" + @usableFromInline static let async: JSString = "async" + @usableFromInline static let atob: JSString = "atob" + @usableFromInline static let attachInternals: JSString = "attachInternals" + @usableFromInline static let audioTracks: JSString = "audioTracks" + @usableFromInline static let autocapitalize: JSString = "autocapitalize" + @usableFromInline static let autocomplete: JSString = "autocomplete" + @usableFromInline static let autofocus: JSString = "autofocus" + @usableFromInline static let autoplay: JSString = "autoplay" + @usableFromInline static let axis: JSString = "axis" + @usableFromInline static let back: JSString = "back" + @usableFromInline static let background: JSString = "background" + @usableFromInline static let badInput: JSString = "badInput" + @usableFromInline static let beginPath: JSString = "beginPath" + @usableFromInline static let behavior: JSString = "behavior" + @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" + @usableFromInline static let bgColor: JSString = "bgColor" + @usableFromInline static let blocking: JSString = "blocking" + @usableFromInline static let blur: JSString = "blur" + @usableFromInline static let border: JSString = "border" + @usableFromInline static let btoa: JSString = "btoa" + @usableFromInline static let buffered: JSString = "buffered" + @usableFromInline static let canPlayType: JSString = "canPlayType" + @usableFromInline static let cancelAnimationFrame: JSString = "cancelAnimationFrame" + @usableFromInline static let canvas: JSString = "canvas" + @usableFromInline static let caption: JSString = "caption" + @usableFromInline static let captureEvents: JSString = "captureEvents" + @usableFromInline static let cellIndex: JSString = "cellIndex" + @usableFromInline static let cellPadding: JSString = "cellPadding" + @usableFromInline static let cellSpacing: JSString = "cellSpacing" + @usableFromInline static let cells: JSString = "cells" + @usableFromInline static let ch: JSString = "ch" + @usableFromInline static let chOff: JSString = "chOff" + @usableFromInline static let charset: JSString = "charset" + @usableFromInline static let checkValidity: JSString = "checkValidity" + @usableFromInline static let checked: JSString = "checked" + @usableFromInline static let cite: JSString = "cite" + @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearData: JSString = "clearData" + @usableFromInline static let clearInterval: JSString = "clearInterval" + @usableFromInline static let clearRect: JSString = "clearRect" + @usableFromInline static let clearTimeout: JSString = "clearTimeout" + @usableFromInline static let click: JSString = "click" + @usableFromInline static let clientInformation: JSString = "clientInformation" + @usableFromInline static let clip: JSString = "clip" + @usableFromInline static let close: JSString = "close" + @usableFromInline static let closePath: JSString = "closePath" + @usableFromInline static let closed: JSString = "closed" + @usableFromInline static let code: JSString = "code" + @usableFromInline static let codeBase: JSString = "codeBase" + @usableFromInline static let codeType: JSString = "codeType" + @usableFromInline static let colSpan: JSString = "colSpan" + @usableFromInline static let colno: JSString = "colno" + @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorSpace: JSString = "colorSpace" + @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" + @usableFromInline static let cols: JSString = "cols" + @usableFromInline static let commit: JSString = "commit" + @usableFromInline static let compact: JSString = "compact" + @usableFromInline static let complete: JSString = "complete" + @usableFromInline static let confirm: JSString = "confirm" + @usableFromInline static let contains: JSString = "contains" + @usableFromInline static let content: JSString = "content" + @usableFromInline static let contentDocument: JSString = "contentDocument" + @usableFromInline static let contentEditable: JSString = "contentEditable" + @usableFromInline static let contentWindow: JSString = "contentWindow" + @usableFromInline static let control: JSString = "control" + @usableFromInline static let controls: JSString = "controls" + @usableFromInline static let convertToBlob: JSString = "convertToBlob" + @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" + @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let createCaption: JSString = "createCaption" + @usableFromInline static let createConicGradient: JSString = "createConicGradient" + @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" + @usableFromInline static let createImageData: JSString = "createImageData" + @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" + @usableFromInline static let createPattern: JSString = "createPattern" + @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" + @usableFromInline static let createTBody: JSString = "createTBody" + @usableFromInline static let createTFoot: JSString = "createTFoot" + @usableFromInline static let createTHead: JSString = "createTHead" + @usableFromInline static let credentials: JSString = "credentials" + @usableFromInline static let crossOrigin: JSString = "crossOrigin" + @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" + @usableFromInline static let cues: JSString = "cues" + @usableFromInline static let currentSrc: JSString = "currentSrc" + @usableFromInline static let currentTime: JSString = "currentTime" + @usableFromInline static let customElements: JSString = "customElements" + @usableFromInline static let customError: JSString = "customError" + @usableFromInline static let data: JSString = "data" + @usableFromInline static let dataTransfer: JSString = "dataTransfer" + @usableFromInline static let dataset: JSString = "dataset" + @usableFromInline static let dateTime: JSString = "dateTime" + @usableFromInline static let declare: JSString = "declare" + @usableFromInline static let decode: JSString = "decode" + @usableFromInline static let decoding: JSString = "decoding" + @usableFromInline static let `default`: JSString = "default" + @usableFromInline static let defaultChecked: JSString = "defaultChecked" + @usableFromInline static let defaultMuted: JSString = "defaultMuted" + @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" + @usableFromInline static let defaultSelected: JSString = "defaultSelected" + @usableFromInline static let defaultValue: JSString = "defaultValue" + @usableFromInline static let `defer`: JSString = "defer" + @usableFromInline static let define: JSString = "define" + @usableFromInline static let deleteCaption: JSString = "deleteCaption" + @usableFromInline static let deleteCell: JSString = "deleteCell" + @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" + @usableFromInline static let deleteTHead: JSString = "deleteTHead" + @usableFromInline static let description: JSString = "description" + @usableFromInline static let desynchronized: JSString = "desynchronized" + @usableFromInline static let dir: JSString = "dir" + @usableFromInline static let dirName: JSString = "dirName" + @usableFromInline static let direction: JSString = "direction" + @usableFromInline static let disabled: JSString = "disabled" + @usableFromInline static let document: JSString = "document" + @usableFromInline static let download: JSString = "download" + @usableFromInline static let draggable: JSString = "draggable" + @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" + @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let dropEffect: JSString = "dropEffect" + @usableFromInline static let duration: JSString = "duration" + @usableFromInline static let effectAllowed: JSString = "effectAllowed" + @usableFromInline static let elements: JSString = "elements" + @usableFromInline static let ellipse: JSString = "ellipse" + @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" + @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" + @usableFromInline static let enabled: JSString = "enabled" + @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" + @usableFromInline static let encoding: JSString = "encoding" + @usableFromInline static let enctype: JSString = "enctype" + @usableFromInline static let end: JSString = "end" + @usableFromInline static let endTime: JSString = "endTime" + @usableFromInline static let ended: JSString = "ended" + @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" + @usableFromInline static let error: JSString = "error" + @usableFromInline static let event: JSString = "event" + @usableFromInline static let extends: JSString = "extends" + @usableFromInline static let external: JSString = "external" + @usableFromInline static let face: JSString = "face" + @usableFromInline static let fastSeek: JSString = "fastSeek" + @usableFromInline static let filename: JSString = "filename" + @usableFromInline static let files: JSString = "files" + @usableFromInline static let fill: JSString = "fill" + @usableFromInline static let fillRect: JSString = "fillRect" + @usableFromInline static let fillStyle: JSString = "fillStyle" + @usableFromInline static let fillText: JSString = "fillText" + @usableFromInline static let filter: JSString = "filter" + @usableFromInline static let flatten: JSString = "flatten" + @usableFromInline static let focus: JSString = "focus" + @usableFromInline static let font: JSString = "font" + @usableFromInline static let fontBoundingBoxAscent: JSString = "fontBoundingBoxAscent" + @usableFromInline static let fontBoundingBoxDescent: JSString = "fontBoundingBoxDescent" + @usableFromInline static let fontKerning: JSString = "fontKerning" + @usableFromInline static let fontStretch: JSString = "fontStretch" + @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" + @usableFromInline static let form: JSString = "form" + @usableFromInline static let formAction: JSString = "formAction" + @usableFromInline static let formData: JSString = "formData" + @usableFromInline static let formEnctype: JSString = "formEnctype" + @usableFromInline static let formMethod: JSString = "formMethod" + @usableFromInline static let formNoValidate: JSString = "formNoValidate" + @usableFromInline static let formTarget: JSString = "formTarget" + @usableFromInline static let forward: JSString = "forward" + @usableFromInline static let frame: JSString = "frame" + @usableFromInline static let frameBorder: JSString = "frameBorder" + @usableFromInline static let frameElement: JSString = "frameElement" + @usableFromInline static let frames: JSString = "frames" + @usableFromInline static let get: JSString = "get" + @usableFromInline static let getAsFile: JSString = "getAsFile" + @usableFromInline static let getContext: JSString = "getContext" + @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" + @usableFromInline static let getCueById: JSString = "getCueById" + @usableFromInline static let getData: JSString = "getData" + @usableFromInline static let getImageData: JSString = "getImageData" + @usableFromInline static let getLineDash: JSString = "getLineDash" + @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getStartDate: JSString = "getStartDate" + @usableFromInline static let getTrackById: JSString = "getTrackById" + @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let globalAlpha: JSString = "globalAlpha" + @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" + @usableFromInline static let go: JSString = "go" + @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" + @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" + @usableFromInline static let hash: JSString = "hash" + @usableFromInline static let headers: JSString = "headers" + @usableFromInline static let height: JSString = "height" + @usableFromInline static let hidden: JSString = "hidden" + @usableFromInline static let high: JSString = "high" + @usableFromInline static let history: JSString = "history" + @usableFromInline static let host: JSString = "host" + @usableFromInline static let hostname: JSString = "hostname" + @usableFromInline static let href: JSString = "href" + @usableFromInline static let hreflang: JSString = "hreflang" + @usableFromInline static let hspace: JSString = "hspace" + @usableFromInline static let htmlFor: JSString = "htmlFor" + @usableFromInline static let httpEquiv: JSString = "httpEquiv" + @usableFromInline static let id: JSString = "id" + @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" + @usableFromInline static let imageOrientation: JSString = "imageOrientation" + @usableFromInline static let imageSizes: JSString = "imageSizes" + @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" + @usableFromInline static let imageSmoothingQuality: JSString = "imageSmoothingQuality" + @usableFromInline static let imageSrcset: JSString = "imageSrcset" + @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" + @usableFromInline static let indeterminate: JSString = "indeterminate" + @usableFromInline static let index: JSString = "index" + @usableFromInline static let inert: JSString = "inert" + @usableFromInline static let initMessageEvent: JSString = "initMessageEvent" + @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" + @usableFromInline static let innerText: JSString = "innerText" + @usableFromInline static let inputMode: JSString = "inputMode" + @usableFromInline static let insertCell: JSString = "insertCell" + @usableFromInline static let insertRow: JSString = "insertRow" + @usableFromInline static let integrity: JSString = "integrity" + @usableFromInline static let isContentEditable: JSString = "isContentEditable" + @usableFromInline static let isContextLost: JSString = "isContextLost" + @usableFromInline static let isMap: JSString = "isMap" + @usableFromInline static let isPointInPath: JSString = "isPointInPath" + @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" + @usableFromInline static let isSecureContext: JSString = "isSecureContext" + @usableFromInline static let item: JSString = "item" + @usableFromInline static let items: JSString = "items" + @usableFromInline static let javaEnabled: JSString = "javaEnabled" + @usableFromInline static let key: JSString = "key" + @usableFromInline static let kind: JSString = "kind" + @usableFromInline static let label: JSString = "label" + @usableFromInline static let labels: JSString = "labels" + @usableFromInline static let lang: JSString = "lang" + @usableFromInline static let language: JSString = "language" + @usableFromInline static let languages: JSString = "languages" + @usableFromInline static let lastEventId: JSString = "lastEventId" + @usableFromInline static let length: JSString = "length" + @usableFromInline static let letterSpacing: JSString = "letterSpacing" + @usableFromInline static let lineCap: JSString = "lineCap" + @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" + @usableFromInline static let lineJoin: JSString = "lineJoin" + @usableFromInline static let lineTo: JSString = "lineTo" + @usableFromInline static let lineWidth: JSString = "lineWidth" + @usableFromInline static let lineno: JSString = "lineno" + @usableFromInline static let link: JSString = "link" + @usableFromInline static let list: JSString = "list" + @usableFromInline static let load: JSString = "load" + @usableFromInline static let loading: JSString = "loading" + @usableFromInline static let localStorage: JSString = "localStorage" + @usableFromInline static let location: JSString = "location" + @usableFromInline static let locationbar: JSString = "locationbar" + @usableFromInline static let longDesc: JSString = "longDesc" + @usableFromInline static let loop: JSString = "loop" + @usableFromInline static let low: JSString = "low" + @usableFromInline static let lowsrc: JSString = "lowsrc" + @usableFromInline static let marginHeight: JSString = "marginHeight" + @usableFromInline static let marginWidth: JSString = "marginWidth" + @usableFromInline static let max: JSString = "max" + @usableFromInline static let maxLength: JSString = "maxLength" + @usableFromInline static let measureText: JSString = "measureText" + @usableFromInline static let media: JSString = "media" + @usableFromInline static let menubar: JSString = "menubar" + @usableFromInline static let message: JSString = "message" + @usableFromInline static let method: JSString = "method" + @usableFromInline static let mimeTypes: JSString = "mimeTypes" + @usableFromInline static let min: JSString = "min" + @usableFromInline static let minLength: JSString = "minLength" + @usableFromInline static let miterLimit: JSString = "miterLimit" + @usableFromInline static let mode: JSString = "mode" + @usableFromInline static let moveTo: JSString = "moveTo" + @usableFromInline static let multiple: JSString = "multiple" + @usableFromInline static let muted: JSString = "muted" + @usableFromInline static let name: JSString = "name" + @usableFromInline static let namedItem: JSString = "namedItem" + @usableFromInline static let naturalHeight: JSString = "naturalHeight" + @usableFromInline static let naturalWidth: JSString = "naturalWidth" + @usableFromInline static let navigator: JSString = "navigator" + @usableFromInline static let networkState: JSString = "networkState" + @usableFromInline static let newURL: JSString = "newURL" + @usableFromInline static let newValue: JSString = "newValue" + @usableFromInline static let noHref: JSString = "noHref" + @usableFromInline static let noModule: JSString = "noModule" + @usableFromInline static let noResize: JSString = "noResize" + @usableFromInline static let noShade: JSString = "noShade" + @usableFromInline static let noValidate: JSString = "noValidate" + @usableFromInline static let noWrap: JSString = "noWrap" + @usableFromInline static let nonce: JSString = "nonce" + @usableFromInline static let oldURL: JSString = "oldURL" + @usableFromInline static let oldValue: JSString = "oldValue" + @usableFromInline static let onLine: JSString = "onLine" + @usableFromInline static let onabort: JSString = "onabort" + @usableFromInline static let onaddtrack: JSString = "onaddtrack" + @usableFromInline static let onafterprint: JSString = "onafterprint" + @usableFromInline static let onauxclick: JSString = "onauxclick" + @usableFromInline static let onbeforeprint: JSString = "onbeforeprint" + @usableFromInline static let onbeforeunload: JSString = "onbeforeunload" + @usableFromInline static let onblur: JSString = "onblur" + @usableFromInline static let oncancel: JSString = "oncancel" + @usableFromInline static let oncanplay: JSString = "oncanplay" + @usableFromInline static let oncanplaythrough: JSString = "oncanplaythrough" + @usableFromInline static let onchange: JSString = "onchange" + @usableFromInline static let onclick: JSString = "onclick" + @usableFromInline static let onclose: JSString = "onclose" + @usableFromInline static let oncontextlost: JSString = "oncontextlost" + @usableFromInline static let oncontextmenu: JSString = "oncontextmenu" + @usableFromInline static let oncontextrestored: JSString = "oncontextrestored" + @usableFromInline static let oncopy: JSString = "oncopy" + @usableFromInline static let oncuechange: JSString = "oncuechange" + @usableFromInline static let oncut: JSString = "oncut" + @usableFromInline static let ondblclick: JSString = "ondblclick" + @usableFromInline static let ondrag: JSString = "ondrag" + @usableFromInline static let ondragend: JSString = "ondragend" + @usableFromInline static let ondragenter: JSString = "ondragenter" + @usableFromInline static let ondragleave: JSString = "ondragleave" + @usableFromInline static let ondragover: JSString = "ondragover" + @usableFromInline static let ondragstart: JSString = "ondragstart" + @usableFromInline static let ondrop: JSString = "ondrop" + @usableFromInline static let ondurationchange: JSString = "ondurationchange" + @usableFromInline static let onemptied: JSString = "onemptied" + @usableFromInline static let onended: JSString = "onended" + @usableFromInline static let onenter: JSString = "onenter" + @usableFromInline static let onerror: JSString = "onerror" + @usableFromInline static let onexit: JSString = "onexit" + @usableFromInline static let onfocus: JSString = "onfocus" + @usableFromInline static let onformdata: JSString = "onformdata" + @usableFromInline static let onhashchange: JSString = "onhashchange" + @usableFromInline static let oninput: JSString = "oninput" + @usableFromInline static let oninvalid: JSString = "oninvalid" + @usableFromInline static let onkeydown: JSString = "onkeydown" + @usableFromInline static let onkeypress: JSString = "onkeypress" + @usableFromInline static let onkeyup: JSString = "onkeyup" + @usableFromInline static let onlanguagechange: JSString = "onlanguagechange" + @usableFromInline static let onload: JSString = "onload" + @usableFromInline static let onloadeddata: JSString = "onloadeddata" + @usableFromInline static let onloadedmetadata: JSString = "onloadedmetadata" + @usableFromInline static let onloadstart: JSString = "onloadstart" + @usableFromInline static let onmessage: JSString = "onmessage" + @usableFromInline static let onmessageerror: JSString = "onmessageerror" + @usableFromInline static let onmousedown: JSString = "onmousedown" + @usableFromInline static let onmouseenter: JSString = "onmouseenter" + @usableFromInline static let onmouseleave: JSString = "onmouseleave" + @usableFromInline static let onmousemove: JSString = "onmousemove" + @usableFromInline static let onmouseout: JSString = "onmouseout" + @usableFromInline static let onmouseover: JSString = "onmouseover" + @usableFromInline static let onmouseup: JSString = "onmouseup" + @usableFromInline static let onoffline: JSString = "onoffline" + @usableFromInline static let ononline: JSString = "ononline" + @usableFromInline static let onopen: JSString = "onopen" + @usableFromInline static let onpagehide: JSString = "onpagehide" + @usableFromInline static let onpageshow: JSString = "onpageshow" + @usableFromInline static let onpaste: JSString = "onpaste" + @usableFromInline static let onpause: JSString = "onpause" + @usableFromInline static let onplay: JSString = "onplay" + @usableFromInline static let onplaying: JSString = "onplaying" + @usableFromInline static let onpopstate: JSString = "onpopstate" + @usableFromInline static let onprogress: JSString = "onprogress" + @usableFromInline static let onratechange: JSString = "onratechange" + @usableFromInline static let onrejectionhandled: JSString = "onrejectionhandled" + @usableFromInline static let onremovetrack: JSString = "onremovetrack" + @usableFromInline static let onreset: JSString = "onreset" + @usableFromInline static let onresize: JSString = "onresize" + @usableFromInline static let onscroll: JSString = "onscroll" + @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" + @usableFromInline static let onseeked: JSString = "onseeked" + @usableFromInline static let onseeking: JSString = "onseeking" + @usableFromInline static let onselect: JSString = "onselect" + @usableFromInline static let onslotchange: JSString = "onslotchange" + @usableFromInline static let onstalled: JSString = "onstalled" + @usableFromInline static let onstorage: JSString = "onstorage" + @usableFromInline static let onsubmit: JSString = "onsubmit" + @usableFromInline static let onsuspend: JSString = "onsuspend" + @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" + @usableFromInline static let ontoggle: JSString = "ontoggle" + @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" + @usableFromInline static let onunload: JSString = "onunload" + @usableFromInline static let onvolumechange: JSString = "onvolumechange" + @usableFromInline static let onwaiting: JSString = "onwaiting" + @usableFromInline static let onwebkitanimationend: JSString = "onwebkitanimationend" + @usableFromInline static let onwebkitanimationiteration: JSString = "onwebkitanimationiteration" + @usableFromInline static let onwebkitanimationstart: JSString = "onwebkitanimationstart" + @usableFromInline static let onwebkittransitionend: JSString = "onwebkittransitionend" + @usableFromInline static let onwheel: JSString = "onwheel" + @usableFromInline static let open: JSString = "open" + @usableFromInline static let opener: JSString = "opener" + @usableFromInline static let optimum: JSString = "optimum" + @usableFromInline static let options: JSString = "options" + @usableFromInline static let origin: JSString = "origin" + @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" + @usableFromInline static let oscpu: JSString = "oscpu" + @usableFromInline static let outerText: JSString = "outerText" + @usableFromInline static let parent: JSString = "parent" + @usableFromInline static let parseFromString: JSString = "parseFromString" + @usableFromInline static let password: JSString = "password" + @usableFromInline static let pathname: JSString = "pathname" + @usableFromInline static let pattern: JSString = "pattern" + @usableFromInline static let patternMismatch: JSString = "patternMismatch" + @usableFromInline static let pause: JSString = "pause" + @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" + @usableFromInline static let paused: JSString = "paused" + @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" + @usableFromInline static let persisted: JSString = "persisted" + @usableFromInline static let personalbar: JSString = "personalbar" + @usableFromInline static let ping: JSString = "ping" + @usableFromInline static let placeholder: JSString = "placeholder" + @usableFromInline static let platform: JSString = "platform" + @usableFromInline static let play: JSString = "play" + @usableFromInline static let playbackRate: JSString = "playbackRate" + @usableFromInline static let played: JSString = "played" + @usableFromInline static let playsInline: JSString = "playsInline" + @usableFromInline static let plugins: JSString = "plugins" + @usableFromInline static let port: JSString = "port" + @usableFromInline static let port1: JSString = "port1" + @usableFromInline static let port2: JSString = "port2" + @usableFromInline static let ports: JSString = "ports" + @usableFromInline static let position: JSString = "position" + @usableFromInline static let postMessage: JSString = "postMessage" + @usableFromInline static let poster: JSString = "poster" + @usableFromInline static let preload: JSString = "preload" + @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" + @usableFromInline static let preservesPitch: JSString = "preservesPitch" + @usableFromInline static let preventScroll: JSString = "preventScroll" + @usableFromInline static let print: JSString = "print" + @usableFromInline static let product: JSString = "product" + @usableFromInline static let productSub: JSString = "productSub" + @usableFromInline static let promise: JSString = "promise" + @usableFromInline static let prompt: JSString = "prompt" + @usableFromInline static let `protocol`: JSString = "protocol" + @usableFromInline static let pushState: JSString = "pushState" + @usableFromInline static let putImageData: JSString = "putImageData" + @usableFromInline static let quadraticCurveTo: JSString = "quadraticCurveTo" + @usableFromInline static let quality: JSString = "quality" + @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" + @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" + @usableFromInline static let readOnly: JSString = "readOnly" + @usableFromInline static let readyState: JSString = "readyState" + @usableFromInline static let reason: JSString = "reason" + @usableFromInline static let rect: JSString = "rect" + @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" + @usableFromInline static let refresh: JSString = "refresh" + @usableFromInline static let registerProtocolHandler: JSString = "registerProtocolHandler" + @usableFromInline static let rel: JSString = "rel" + @usableFromInline static let relList: JSString = "relList" + @usableFromInline static let releaseEvents: JSString = "releaseEvents" + @usableFromInline static let reload: JSString = "reload" + @usableFromInline static let remove: JSString = "remove" + @usableFromInline static let removeCue: JSString = "removeCue" + @usableFromInline static let replace: JSString = "replace" + @usableFromInline static let replaceState: JSString = "replaceState" + @usableFromInline static let reportError: JSString = "reportError" + @usableFromInline static let reportValidity: JSString = "reportValidity" + @usableFromInline static let requestSubmit: JSString = "requestSubmit" + @usableFromInline static let required: JSString = "required" + @usableFromInline static let reset: JSString = "reset" + @usableFromInline static let resetTransform: JSString = "resetTransform" + @usableFromInline static let resizeHeight: JSString = "resizeHeight" + @usableFromInline static let resizeQuality: JSString = "resizeQuality" + @usableFromInline static let resizeWidth: JSString = "resizeWidth" + @usableFromInline static let restore: JSString = "restore" + @usableFromInline static let returnValue: JSString = "returnValue" + @usableFromInline static let rev: JSString = "rev" + @usableFromInline static let reversed: JSString = "reversed" + @usableFromInline static let rotate: JSString = "rotate" + @usableFromInline static let roundRect: JSString = "roundRect" + @usableFromInline static let rowIndex: JSString = "rowIndex" + @usableFromInline static let rowSpan: JSString = "rowSpan" + @usableFromInline static let rows: JSString = "rows" + @usableFromInline static let rules: JSString = "rules" + @usableFromInline static let sandbox: JSString = "sandbox" + @usableFromInline static let save: JSString = "save" + @usableFromInline static let scale: JSString = "scale" + @usableFromInline static let scheme: JSString = "scheme" + @usableFromInline static let scope: JSString = "scope" + @usableFromInline static let scrollAmount: JSString = "scrollAmount" + @usableFromInline static let scrollDelay: JSString = "scrollDelay" + @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" + @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" + @usableFromInline static let scrollbars: JSString = "scrollbars" + @usableFromInline static let scrolling: JSString = "scrolling" + @usableFromInline static let search: JSString = "search" + @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" + @usableFromInline static let seekable: JSString = "seekable" + @usableFromInline static let seeking: JSString = "seeking" + @usableFromInline static let select: JSString = "select" + @usableFromInline static let selected: JSString = "selected" + @usableFromInline static let selectedIndex: JSString = "selectedIndex" + @usableFromInline static let selectedOptions: JSString = "selectedOptions" + @usableFromInline static let selectionDirection: JSString = "selectionDirection" + @usableFromInline static let selectionEnd: JSString = "selectionEnd" + @usableFromInline static let selectionStart: JSString = "selectionStart" + @usableFromInline static let sessionStorage: JSString = "sessionStorage" + @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" + @usableFromInline static let setData: JSString = "setData" + @usableFromInline static let setDragImage: JSString = "setDragImage" + @usableFromInline static let setFormValue: JSString = "setFormValue" + @usableFromInline static let setInterval: JSString = "setInterval" + @usableFromInline static let setLineDash: JSString = "setLineDash" + @usableFromInline static let setRangeText: JSString = "setRangeText" + @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" + @usableFromInline static let setTimeout: JSString = "setTimeout" + @usableFromInline static let setTransform: JSString = "setTransform" + @usableFromInline static let setValidity: JSString = "setValidity" + @usableFromInline static let shadowBlur: JSString = "shadowBlur" + @usableFromInline static let shadowColor: JSString = "shadowColor" + @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" + @usableFromInline static let shadowOffsetY: JSString = "shadowOffsetY" + @usableFromInline static let shadowRoot: JSString = "shadowRoot" + @usableFromInline static let shape: JSString = "shape" + @usableFromInline static let show: JSString = "show" + @usableFromInline static let showModal: JSString = "showModal" + @usableFromInline static let showPicker: JSString = "showPicker" + @usableFromInline static let size: JSString = "size" + @usableFromInline static let sizes: JSString = "sizes" + @usableFromInline static let source: JSString = "source" + @usableFromInline static let span: JSString = "span" + @usableFromInline static let spellcheck: JSString = "spellcheck" + @usableFromInline static let src: JSString = "src" + @usableFromInline static let srcdoc: JSString = "srcdoc" + @usableFromInline static let srclang: JSString = "srclang" + @usableFromInline static let srcset: JSString = "srcset" + @usableFromInline static let standby: JSString = "standby" + @usableFromInline static let start: JSString = "start" + @usableFromInline static let startTime: JSString = "startTime" + @usableFromInline static let state: JSString = "state" + @usableFromInline static let status: JSString = "status" + @usableFromInline static let statusbar: JSString = "statusbar" + @usableFromInline static let step: JSString = "step" + @usableFromInline static let stepDown: JSString = "stepDown" + @usableFromInline static let stepMismatch: JSString = "stepMismatch" + @usableFromInline static let stepUp: JSString = "stepUp" + @usableFromInline static let stop: JSString = "stop" + @usableFromInline static let storageArea: JSString = "storageArea" + @usableFromInline static let stroke: JSString = "stroke" + @usableFromInline static let strokeRect: JSString = "strokeRect" + @usableFromInline static let strokeStyle: JSString = "strokeStyle" + @usableFromInline static let strokeText: JSString = "strokeText" + @usableFromInline static let structuredClone: JSString = "structuredClone" + @usableFromInline static let submit: JSString = "submit" + @usableFromInline static let submitter: JSString = "submitter" + @usableFromInline static let suffixes: JSString = "suffixes" + @usableFromInline static let summary: JSString = "summary" + @usableFromInline static let supports: JSString = "supports" + @usableFromInline static let tBodies: JSString = "tBodies" + @usableFromInline static let tFoot: JSString = "tFoot" + @usableFromInline static let tHead: JSString = "tHead" + @usableFromInline static let tabIndex: JSString = "tabIndex" + @usableFromInline static let taintEnabled: JSString = "taintEnabled" + @usableFromInline static let target: JSString = "target" + @usableFromInline static let targetOrigin: JSString = "targetOrigin" + @usableFromInline static let terminate: JSString = "terminate" + @usableFromInline static let text: JSString = "text" + @usableFromInline static let textAlign: JSString = "textAlign" + @usableFromInline static let textBaseline: JSString = "textBaseline" + @usableFromInline static let textLength: JSString = "textLength" + @usableFromInline static let textRendering: JSString = "textRendering" + @usableFromInline static let textTracks: JSString = "textTracks" + @usableFromInline static let title: JSString = "title" + @usableFromInline static let toDataURL: JSString = "toDataURL" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let tooLong: JSString = "tooLong" + @usableFromInline static let tooShort: JSString = "tooShort" + @usableFromInline static let toolbar: JSString = "toolbar" + @usableFromInline static let top: JSString = "top" + @usableFromInline static let track: JSString = "track" + @usableFromInline static let transfer: JSString = "transfer" + @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" + @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" + @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" + @usableFromInline static let transform: JSString = "transform" + @usableFromInline static let translate: JSString = "translate" + @usableFromInline static let trueSpeed: JSString = "trueSpeed" + @usableFromInline static let type: JSString = "type" + @usableFromInline static let typeMismatch: JSString = "typeMismatch" + @usableFromInline static let types: JSString = "types" + @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" + @usableFromInline static let upgrade: JSString = "upgrade" + @usableFromInline static let url: JSString = "url" + @usableFromInline static let useMap: JSString = "useMap" + @usableFromInline static let userAgent: JSString = "userAgent" + @usableFromInline static let username: JSString = "username" + @usableFromInline static let vAlign: JSString = "vAlign" + @usableFromInline static let vLink: JSString = "vLink" + @usableFromInline static let valid: JSString = "valid" + @usableFromInline static let validationMessage: JSString = "validationMessage" + @usableFromInline static let validity: JSString = "validity" + @usableFromInline static let value: JSString = "value" + @usableFromInline static let valueAsDate: JSString = "valueAsDate" + @usableFromInline static let valueAsNumber: JSString = "valueAsNumber" + @usableFromInline static let valueMissing: JSString = "valueMissing" + @usableFromInline static let valueType: JSString = "valueType" + @usableFromInline static let vendor: JSString = "vendor" + @usableFromInline static let vendorSub: JSString = "vendorSub" + @usableFromInline static let version: JSString = "version" + @usableFromInline static let videoHeight: JSString = "videoHeight" + @usableFromInline static let videoTracks: JSString = "videoTracks" + @usableFromInline static let videoWidth: JSString = "videoWidth" + @usableFromInline static let visible: JSString = "visible" + @usableFromInline static let volume: JSString = "volume" + @usableFromInline static let vspace: JSString = "vspace" + @usableFromInline static let whenDefined: JSString = "whenDefined" + @usableFromInline static let width: JSString = "width" + @usableFromInline static let willReadFrequently: JSString = "willReadFrequently" + @usableFromInline static let willValidate: JSString = "willValidate" + @usableFromInline static let window: JSString = "window" + @usableFromInline static let withCredentials: JSString = "withCredentials" + @usableFromInline static let wordSpacing: JSString = "wordSpacing" + @usableFromInline static let wrap: JSString = "wrap" +} + +public protocol Any_AudioTrack_or_TextTrack_or_VideoTrack: ConvertibleToJSValue {} +extension AudioTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} +extension TextTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} +extension VideoTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} + +public enum AudioTrack_or_TextTrack_or_VideoTrack: JSValueCompatible, Any_AudioTrack_or_TextTrack_or_VideoTrack { + case audioTrack(AudioTrack) + case textTrack(TextTrack) + case videoTrack(VideoTrack) + + var audioTrack: AudioTrack? { + switch self { + case let .audioTrack(audioTrack): return audioTrack + default: return nil + } + } + + var textTrack: TextTrack? { + switch self { + case let .textTrack(textTrack): return textTrack + default: return nil + } + } + + var videoTrack: VideoTrack? { + switch self { + case let .videoTrack(videoTrack): return videoTrack + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let audioTrack: AudioTrack = value.fromJSValue() { + return .audioTrack(audioTrack) + } + if let textTrack: TextTrack = value.fromJSValue() { + return .textTrack(textTrack) + } + if let videoTrack: VideoTrack = value.fromJSValue() { + return .videoTrack(videoTrack) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .audioTrack(audioTrack): + return audioTrack.jsValue + case let .textTrack(textTrack): + return textTrack.jsValue + case let .videoTrack(videoTrack): + return videoTrack.jsValue + } + } +} + +public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} +extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} +extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} + +public enum CanvasFilterInput_or_seq_of_CanvasFilterInput: JSValueCompatible, Any_CanvasFilterInput_or_seq_of_CanvasFilterInput { + case canvasFilterInput(CanvasFilterInput) + case seq_of_CanvasFilterInput([CanvasFilterInput]) + + var canvasFilterInput: CanvasFilterInput? { + switch self { + case let .canvasFilterInput(canvasFilterInput): return canvasFilterInput + default: return nil + } + } + + var seq_of_CanvasFilterInput: [CanvasFilterInput]? { + switch self { + case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): return seq_of_CanvasFilterInput + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasFilterInput: CanvasFilterInput = value.fromJSValue() { + return .canvasFilterInput(canvasFilterInput) + } + if let seq_of_CanvasFilterInput: [CanvasFilterInput] = value.fromJSValue() { + return .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasFilterInput(canvasFilterInput): + return canvasFilterInput.jsValue + case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): + return seq_of_CanvasFilterInput.jsValue + } + } +} + +public protocol Any_CanvasFilter_or_String: ConvertibleToJSValue {} +extension CanvasFilter: Any_CanvasFilter_or_String {} +extension String: Any_CanvasFilter_or_String {} + +public enum CanvasFilter_or_String: JSValueCompatible, Any_CanvasFilter_or_String { + case canvasFilter(CanvasFilter) + case string(String) + + var canvasFilter: CanvasFilter? { + switch self { + case let .canvasFilter(canvasFilter): return canvasFilter + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasFilter: CanvasFilter = value.fromJSValue() { + return .canvasFilter(canvasFilter) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasFilter(canvasFilter): + return canvasFilter.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_CanvasGradient_or_CanvasPattern_or_String: ConvertibleToJSValue {} +extension CanvasGradient: Any_CanvasGradient_or_CanvasPattern_or_String {} +extension CanvasPattern: Any_CanvasGradient_or_CanvasPattern_or_String {} +extension String: Any_CanvasGradient_or_CanvasPattern_or_String {} + +public enum CanvasGradient_or_CanvasPattern_or_String: JSValueCompatible, Any_CanvasGradient_or_CanvasPattern_or_String { + case canvasGradient(CanvasGradient) + case canvasPattern(CanvasPattern) + case string(String) + + var canvasGradient: CanvasGradient? { + switch self { + case let .canvasGradient(canvasGradient): return canvasGradient + default: return nil + } + } + + var canvasPattern: CanvasPattern? { + switch self { + case let .canvasPattern(canvasPattern): return canvasPattern + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasGradient: CanvasGradient = value.fromJSValue() { + return .canvasGradient(canvasGradient) + } + if let canvasPattern: CanvasPattern = value.fromJSValue() { + return .canvasPattern(canvasPattern) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasGradient(canvasGradient): + return canvasGradient.jsValue + case let .canvasPattern(canvasPattern): + return canvasPattern.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_DOMPointInit_or_Double: ConvertibleToJSValue {} +extension DOMPointInit: Any_DOMPointInit_or_Double {} +extension Double: Any_DOMPointInit_or_Double {} + +public enum DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double { + case domPointInit(DOMPointInit) + case double(Double) + + var domPointInit: DOMPointInit? { + switch self { + case let .domPointInit(domPointInit): return domPointInit + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let domPointInit: DOMPointInit = value.fromJSValue() { + return .domPointInit(domPointInit) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .domPointInit(domPointInit): + return domPointInit.jsValue + case let .double(double): + return double.jsValue + } + } +} + +public protocol Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: ConvertibleToJSValue {} +extension DOMPointInit: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} +extension Double: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} +extension Array: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double where Element == DOMPointInit_or_Double {} + +public enum DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double { + case domPointInit(DOMPointInit) + case double(Double) + case seq_of_DOMPointInit_or_Double([DOMPointInit_or_Double]) + + var domPointInit: DOMPointInit? { + switch self { + case let .domPointInit(domPointInit): return domPointInit + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double]? { + switch self { + case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): return seq_of_DOMPointInit_or_Double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let domPointInit: DOMPointInit = value.fromJSValue() { + return .domPointInit(domPointInit) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { + return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .domPointInit(domPointInit): + return domPointInit.jsValue + case let .double(double): + return double.jsValue + case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): + return seq_of_DOMPointInit_or_Double.jsValue + } + } +} + +public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} +extension Element: Any_Element_or_HTMLCollection {} +extension HTMLCollection: Any_Element_or_HTMLCollection {} + +public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { + case element(Element) + case htmlCollection(HTMLCollection) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var htmlCollection: HTMLCollection? { + switch self { + case let .htmlCollection(htmlCollection): return htmlCollection + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let htmlCollection: HTMLCollection = value.fromJSValue() { + return .htmlCollection(htmlCollection) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .element(element): + return element.jsValue + case let .htmlCollection(htmlCollection): + return htmlCollection.jsValue + } + } +} + +public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} +extension Element: Any_Element_or_RadioNodeList {} +extension RadioNodeList: Any_Element_or_RadioNodeList {} + +public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { + case element(Element) + case radioNodeList(RadioNodeList) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var radioNodeList: RadioNodeList? { + switch self { + case let .radioNodeList(radioNodeList): return radioNodeList + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let radioNodeList: RadioNodeList = value.fromJSValue() { + return .radioNodeList(radioNodeList) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .element(element): + return element.jsValue + case let .radioNodeList(radioNodeList): + return radioNodeList.jsValue + } + } +} + +public protocol Any_Element_or_Text: ConvertibleToJSValue {} +extension Element: Any_Element_or_Text {} +extension Text: Any_Element_or_Text {} + +public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { + case element(Element) + case text(Text) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var text: Text? { + switch self { + case let .text(text): return text + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let text: Text = value.fromJSValue() { + return .text(text) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .element(element): + return element.jsValue + case let .text(text): + return text.jsValue + } + } +} + +public protocol Any_Event_or_String: ConvertibleToJSValue {} +extension Event: Any_Event_or_String {} +extension String: Any_Event_or_String {} + +public enum Event_or_String: JSValueCompatible, Any_Event_or_String { + case event(Event) + case string(String) + + var event: Event? { + switch self { + case let .event(event): return event + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let event: Event = value.fromJSValue() { + return .event(event) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .event(event): + return event.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} +extension File: Any_File_or_FormData_or_String {} +extension FormData: Any_File_or_FormData_or_String {} +extension String: Any_File_or_FormData_or_String {} + +public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { + case file(File) + case formData(FormData) + case string(String) + + var file: File? { + switch self { + case let .file(file): return file + default: return nil + } + } + + var formData: FormData? { + switch self { + case let .formData(formData): return formData + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let file: File = value.fromJSValue() { + return .file(file) + } + if let formData: FormData = value.fromJSValue() { + return .formData(formData) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .file(file): + return file.jsValue + case let .formData(formData): + return formData.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} +extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} +extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} + +public enum HTMLCanvasElement_or_OffscreenCanvas: JSValueCompatible, Any_HTMLCanvasElement_or_OffscreenCanvas { + case htmlCanvasElement(HTMLCanvasElement) + case offscreenCanvas(OffscreenCanvas) + + var htmlCanvasElement: HTMLCanvasElement? { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement + default: return nil + } + } + + var offscreenCanvas: OffscreenCanvas? { + switch self { + case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { + return .htmlCanvasElement(htmlCanvasElement) + } + if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { + return .offscreenCanvas(offscreenCanvas) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): + return htmlCanvasElement.jsValue + case let .offscreenCanvas(offscreenCanvas): + return offscreenCanvas.jsValue + } + } +} + +public protocol Any_HTMLElement_or_Int32: ConvertibleToJSValue {} +extension HTMLElement: Any_HTMLElement_or_Int32 {} +extension Int32: Any_HTMLElement_or_Int32 {} + +public enum HTMLElement_or_Int32: JSValueCompatible, Any_HTMLElement_or_Int32 { + case htmlElement(HTMLElement) + case int32(Int32) + + var htmlElement: HTMLElement? { + switch self { + case let .htmlElement(htmlElement): return htmlElement + default: return nil + } + } + + var int32: Int32? { + switch self { + case let .int32(int32): return int32 + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlElement: HTMLElement = value.fromJSValue() { + return .htmlElement(htmlElement) + } + if let int32: Int32 = value.fromJSValue() { + return .int32(int32) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlElement(htmlElement): + return htmlElement.jsValue + case let .int32(int32): + return int32.jsValue + } + } +} + +public protocol Any_HTMLOptGroupElement_or_HTMLOptionElement: ConvertibleToJSValue {} +extension HTMLOptGroupElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} +extension HTMLOptionElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} + +public enum HTMLOptGroupElement_or_HTMLOptionElement: JSValueCompatible, Any_HTMLOptGroupElement_or_HTMLOptionElement { + case htmlOptGroupElement(HTMLOptGroupElement) + case htmlOptionElement(HTMLOptionElement) + + var htmlOptGroupElement: HTMLOptGroupElement? { + switch self { + case let .htmlOptGroupElement(htmlOptGroupElement): return htmlOptGroupElement + default: return nil + } + } + + var htmlOptionElement: HTMLOptionElement? { + switch self { + case let .htmlOptionElement(htmlOptionElement): return htmlOptionElement + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlOptGroupElement: HTMLOptGroupElement = value.fromJSValue() { + return .htmlOptGroupElement(htmlOptGroupElement) + } + if let htmlOptionElement: HTMLOptionElement = value.fromJSValue() { + return .htmlOptionElement(htmlOptionElement) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlOptGroupElement(htmlOptGroupElement): + return htmlOptGroupElement.jsValue + case let .htmlOptionElement(htmlOptionElement): + return htmlOptionElement.jsValue + } + } +} + +public protocol Any_ImageBitmapSource: ConvertibleToJSValue {} +extension Blob: Any_ImageBitmapSource {} +extension CanvasImageSource: Any_ImageBitmapSource {} +extension ImageData: Any_ImageBitmapSource {} + +public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource { + case blob(Blob) + case canvasImageSource(CanvasImageSource) + case imageData(ImageData) + + var blob: Blob? { + switch self { + case let .blob(blob): return blob + default: return nil + } + } + + var canvasImageSource: CanvasImageSource? { + switch self { + case let .canvasImageSource(canvasImageSource): return canvasImageSource + default: return nil + } + } + + var imageData: ImageData? { + switch self { + case let .imageData(imageData): return imageData + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let blob: Blob = value.fromJSValue() { + return .blob(blob) + } + if let canvasImageSource: CanvasImageSource = value.fromJSValue() { + return .canvasImageSource(canvasImageSource) + } + if let imageData: ImageData = value.fromJSValue() { + return .imageData(imageData) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .blob(blob): + return blob.jsValue + case let .canvasImageSource(canvasImageSource): + return canvasImageSource.jsValue + case let .imageData(imageData): + return imageData.jsValue + } + } +} + +public protocol Any_MessageEventSource: ConvertibleToJSValue {} +extension MessagePort: Any_MessageEventSource {} +extension ServiceWorker: Any_MessageEventSource {} +extension WindowProxy: Any_MessageEventSource {} + +public enum MessageEventSource: JSValueCompatible, Any_MessageEventSource { + case messagePort(MessagePort) + case serviceWorker(ServiceWorker) + case windowProxy(WindowProxy) + + var messagePort: MessagePort? { + switch self { + case let .messagePort(messagePort): return messagePort + default: return nil + } + } + + var serviceWorker: ServiceWorker? { + switch self { + case let .serviceWorker(serviceWorker): return serviceWorker + default: return nil + } + } + + var windowProxy: WindowProxy? { + switch self { + case let .windowProxy(windowProxy): return windowProxy + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let messagePort: MessagePort = value.fromJSValue() { + return .messagePort(messagePort) + } + if let serviceWorker: ServiceWorker = value.fromJSValue() { + return .serviceWorker(serviceWorker) + } + if let windowProxy: WindowProxy = value.fromJSValue() { + return .windowProxy(windowProxy) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .messagePort(messagePort): + return messagePort.jsValue + case let .serviceWorker(serviceWorker): + return serviceWorker.jsValue + case let .windowProxy(windowProxy): + return windowProxy.jsValue + } + } +} + +public protocol Any_Path2D_or_String: ConvertibleToJSValue {} +extension Path2D: Any_Path2D_or_String {} +extension String: Any_Path2D_or_String {} + +public enum Path2D_or_String: JSValueCompatible, Any_Path2D_or_String { + case path2D(Path2D) + case string(String) + + var path2D: Path2D? { + switch self { + case let .path2D(path2D): return path2D + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let path2D: Path2D = value.fromJSValue() { + return .path2D(path2D) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .path2D(path2D): + return path2D.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_String_or_WorkerOptions: ConvertibleToJSValue {} +extension String: Any_String_or_WorkerOptions {} +extension WorkerOptions: Any_String_or_WorkerOptions {} + +public enum String_or_WorkerOptions: JSValueCompatible, Any_String_or_WorkerOptions { + case string(String) + case workerOptions(WorkerOptions) + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var workerOptions: WorkerOptions? { + switch self { + case let .workerOptions(workerOptions): return workerOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let string: String = value.fromJSValue() { + return .string(string) + } + if let workerOptions: WorkerOptions = value.fromJSValue() { + return .workerOptions(workerOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .string(string): + return string.jsValue + case let .workerOptions(workerOptions): + return workerOptions.jsValue + } + } +} + +public protocol Any_TimerHandler: ConvertibleToJSValue {} +extension JSFunction: Any_TimerHandler {} +extension String: Any_TimerHandler {} + +public enum TimerHandler: JSValueCompatible, Any_TimerHandler { + case jsFunction(JSFunction) + case string(String) + + var jsFunction: JSFunction? { + switch self { + case let .jsFunction(jsFunction): return jsFunction + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let jsFunction: JSFunction = value.fromJSValue() { + return .jsFunction(jsFunction) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .jsFunction(jsFunction): + return jsFunction.jsValue + case let .string(string): + return string.jsValue + } + } +} diff --git a/Sources/DOMKitHTML/ServiceWorker.swift b/Sources/DOMKitHTML/ServiceWorker.swift new file mode 100644 index 00000000..e2557e32 --- /dev/null +++ b/Sources/DOMKitHTML/ServiceWorker.swift @@ -0,0 +1,697 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class Cache: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.Cache].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func add(request: RequestInfo) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func add(request: RequestInfo) async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addAll(requests: [RequestInfo]) async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func put(request: RequestInfo, response: Response) async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class CacheQueryOptions: BridgedDictionary { + public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + object[ServiceWorkerStrings.ignoreSearch] = ignoreSearch.jsValue + object[ServiceWorkerStrings.ignoreMethod] = ignoreMethod.jsValue + object[ServiceWorkerStrings.ignoreVary] = ignoreVary.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _ignoreSearch = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.ignoreSearch) + _ignoreMethod = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.ignoreMethod) + _ignoreVary = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.ignoreVary) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var ignoreSearch: Bool + + @ReadWriteAttribute + public var ignoreMethod: Bool + + @ReadWriteAttribute + public var ignoreVary: Bool +} + +public class CacheStorage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.CacheStorage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func has(cacheName: String) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func has(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func open(cacheName: String) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func open(cacheName: String) async throws -> Cache { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func delete(cacheName: String) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func keys() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.keys].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys() async throws -> [String] { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.keys].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class ClientQueryOptions: BridgedDictionary { + public convenience init(includeUncontrolled: Bool, type: ClientType) { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + object[ServiceWorkerStrings.includeUncontrolled] = includeUncontrolled.jsValue + object[ServiceWorkerStrings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.includeUncontrolled) + _type = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.type) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var includeUncontrolled: Bool + + @ReadWriteAttribute + public var type: ClientType +} + +public enum ClientType: JSString, JSValueCompatible { + case window = "window" + case worker = "worker" + case sharedworker = "sharedworker" + case all = "all" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ExtendableEventInit: BridgedDictionary { + public convenience init() { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class FetchEventInit: BridgedDictionary { + public convenience init(request: Request, preloadResponse: JSPromise, clientId: String, resultingClientId: String, replacesClientId: String, handled: JSPromise) { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + object[ServiceWorkerStrings.request] = request.jsValue + object[ServiceWorkerStrings.preloadResponse] = preloadResponse.jsValue + object[ServiceWorkerStrings.clientId] = clientId.jsValue + object[ServiceWorkerStrings.resultingClientId] = resultingClientId.jsValue + object[ServiceWorkerStrings.replacesClientId] = replacesClientId.jsValue + object[ServiceWorkerStrings.handled] = handled.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _request = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.request) + _preloadResponse = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.preloadResponse) + _clientId = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.clientId) + _resultingClientId = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.resultingClientId) + _replacesClientId = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.replacesClientId) + _handled = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.handled) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var request: Request + + @ReadWriteAttribute + public var preloadResponse: JSPromise + + @ReadWriteAttribute + public var clientId: String + + @ReadWriteAttribute + public var resultingClientId: String + + @ReadWriteAttribute + public var replacesClientId: String + + @ReadWriteAttribute + public var handled: JSPromise +} + +public enum FrameType: JSString, JSValueCompatible { + case auxiliary = "auxiliary" + case topLevel = "top-level" + case nested = "nested" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class MultiCacheQueryOptions: BridgedDictionary { + public convenience init(cacheName: String) { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + object[ServiceWorkerStrings.cacheName] = cacheName.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _cacheName = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.cacheName) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var cacheName: String +} + +public class NavigationPreloadManager: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.NavigationPreloadManager].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func enable() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.enable].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func enable() async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.enable].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func disable() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.disable].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func disable() async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.disable].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func setHeaderValue(value: String) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func setHeaderValue(value: String) async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getState() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.getState].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getState() async throws -> NavigationPreloadState { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.getState].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class NavigationPreloadState: BridgedDictionary { + public convenience init(enabled: Bool, headerValue: String) { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + object[ServiceWorkerStrings.enabled] = enabled.jsValue + object[ServiceWorkerStrings.headerValue] = headerValue.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _enabled = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.enabled) + _headerValue = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.headerValue) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var enabled: Bool + + @ReadWriteAttribute + public var headerValue: String +} + +public class RegistrationOptions: BridgedDictionary { + public convenience init(scope: String, type: WorkerType, updateViaCache: ServiceWorkerUpdateViaCache) { + let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() + object[ServiceWorkerStrings.scope] = scope.jsValue + object[ServiceWorkerStrings.type] = type.jsValue + object[ServiceWorkerStrings.updateViaCache] = updateViaCache.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _scope = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.scope) + _type = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.type) + _updateViaCache = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.updateViaCache) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var scope: String + + @ReadWriteAttribute + public var type: WorkerType + + @ReadWriteAttribute + public var updateViaCache: ServiceWorkerUpdateViaCache +} + +public class ServiceWorker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.ServiceWorker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _scriptURL = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.scriptURL) + _state = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.state) + _onstatechange = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onstatechange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var scriptURL: String + + @ReadonlyAttribute + public var state: ServiceWorkerState + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[ServiceWorkerStrings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[ServiceWorkerStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @ReadWriteAttribute + public var onstatechange: EventHandler +} + +public class ServiceWorkerContainer: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.ServiceWorkerContainer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _controller = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.controller) + _ready = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.ready) + _oncontrollerchange = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.oncontrollerchange) + _onmessage = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onmessage) + _onmessageerror = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var controller: ServiceWorker? + + @ReadonlyAttribute + public var ready: JSPromise + + @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) async throws -> ServiceWorkerRegistration { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getRegistration(clientURL: String? = nil) -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getRegistration(clientURL: String? = nil) async throws -> ServiceWorkerRegistration? { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getRegistrations() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getRegistrations() async throws -> [ServiceWorkerRegistration] { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func startMessages() { + let this = jsObject + _ = this[ServiceWorkerStrings.startMessages].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var oncontrollerchange: EventHandler + + @ReadWriteAttribute + public var onmessage: EventHandler + + @ReadWriteAttribute + public var onmessageerror: EventHandler +} + +public class ServiceWorkerRegistration: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.ServiceWorkerRegistration].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _installing = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.installing) + _waiting = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.waiting) + _active = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.active) + _navigationPreload = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.navigationPreload) + _scope = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.scope) + _updateViaCache = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.updateViaCache) + _onupdatefound = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onupdatefound) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var installing: ServiceWorker? + + @ReadonlyAttribute + public var waiting: ServiceWorker? + + @ReadonlyAttribute + public var active: ServiceWorker? + + @ReadonlyAttribute + public var navigationPreload: NavigationPreloadManager + + @ReadonlyAttribute + public var scope: String + + @ReadonlyAttribute + public var updateViaCache: ServiceWorkerUpdateViaCache + + @inlinable public func update() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.update].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func update() async throws { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.update].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func unregister() -> JSPromise { + let this = jsObject + return this[ServiceWorkerStrings.unregister].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func unregister() async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[ServiceWorkerStrings.unregister].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ReadWriteAttribute + public var onupdatefound: EventHandler +} + +public enum ServiceWorkerState: JSString, JSValueCompatible { + case parsed = "parsed" + case installing = "installing" + case installed = "installed" + case activating = "activating" + case activated = "activated" + case redundant = "redundant" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ServiceWorkerUpdateViaCache: JSString, JSValueCompatible { + case imports = "imports" + case all = "all" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public extension WindowOrWorkerGlobalScope { + @inlinable var caches: CacheStorage { ReadonlyAttribute[ServiceWorkerStrings.caches, in: jsObject] } +} + +/* variadic generics please */ + +@usableFromInline enum ServiceWorkerStrings { + static let _self: JSString = "self" + @usableFromInline static let Cache: JSString = "Cache" + @usableFromInline static let CacheStorage: JSString = "CacheStorage" + @usableFromInline static let NavigationPreloadManager: JSString = "NavigationPreloadManager" + @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" + @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" + @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" + @usableFromInline static let active: JSString = "active" + @usableFromInline static let add: JSString = "add" + @usableFromInline static let addAll: JSString = "addAll" + @usableFromInline static let cacheName: JSString = "cacheName" + @usableFromInline static let caches: JSString = "caches" + @usableFromInline static let clientId: JSString = "clientId" + @usableFromInline static let controller: JSString = "controller" + @usableFromInline static let delete: JSString = "delete" + @usableFromInline static let disable: JSString = "disable" + @usableFromInline static let enable: JSString = "enable" + @usableFromInline static let enabled: JSString = "enabled" + @usableFromInline static let getRegistration: JSString = "getRegistration" + @usableFromInline static let getRegistrations: JSString = "getRegistrations" + @usableFromInline static let getState: JSString = "getState" + @usableFromInline static let handled: JSString = "handled" + @usableFromInline static let has: JSString = "has" + @usableFromInline static let headerValue: JSString = "headerValue" + @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" + @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" + @usableFromInline static let ignoreVary: JSString = "ignoreVary" + @usableFromInline static let includeUncontrolled: JSString = "includeUncontrolled" + @usableFromInline static let installing: JSString = "installing" + @usableFromInline static let keys: JSString = "keys" + @usableFromInline static let match: JSString = "match" + @usableFromInline static let matchAll: JSString = "matchAll" + @usableFromInline static let navigationPreload: JSString = "navigationPreload" + @usableFromInline static let oncontrollerchange: JSString = "oncontrollerchange" + @usableFromInline static let onmessage: JSString = "onmessage" + @usableFromInline static let onmessageerror: JSString = "onmessageerror" + @usableFromInline static let onstatechange: JSString = "onstatechange" + @usableFromInline static let onupdatefound: JSString = "onupdatefound" + @usableFromInline static let open: JSString = "open" + @usableFromInline static let postMessage: JSString = "postMessage" + @usableFromInline static let preloadResponse: JSString = "preloadResponse" + @usableFromInline static let put: JSString = "put" + @usableFromInline static let ready: JSString = "ready" + @usableFromInline static let register: JSString = "register" + @usableFromInline static let replacesClientId: JSString = "replacesClientId" + @usableFromInline static let request: JSString = "request" + @usableFromInline static let resultingClientId: JSString = "resultingClientId" + @usableFromInline static let scope: JSString = "scope" + @usableFromInline static let scriptURL: JSString = "scriptURL" + @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" + @usableFromInline static let startMessages: JSString = "startMessages" + @usableFromInline static let state: JSString = "state" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let type: JSString = "type" + @usableFromInline static let unregister: JSString = "unregister" + @usableFromInline static let update: JSString = "update" + @usableFromInline static let updateViaCache: JSString = "updateViaCache" + @usableFromInline static let waiting: JSString = "waiting" +} diff --git a/Sources/DOMKitHTML/Support.swift b/Sources/DOMKitHTML/Support.swift new file mode 100644 index 00000000..89e4f0c8 --- /dev/null +++ b/Sources/DOMKitHTML/Support.swift @@ -0,0 +1,4 @@ +@_exported import ECMAScript +import JavaScriptKit + +public typealias RequestInfo = JSValue From 89ecce4adbfbb8fff3d8651b96200d673a364939 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 06:10:53 +0900 Subject: [PATCH 13/24] Allow to generate sources into separate files within a module per idl file --- Sources/WebIDLToSwift/IDLParser.swift | 41 ++++++++++++++------------- Sources/WebIDLToSwift/main.swift | 13 ++++++++- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 8413345b..82362ff7 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -23,31 +23,32 @@ enum IDLParser { return try JSONDecoder().decode(GenericCollection.self, from: data) } - static func defaultIDLs() -> [URL] { - let enabledIDLs = [ - "dom", - "fetch", - "FileAPI", - "html", - "geometry", - "hr-time", - "referrer-policy", - "uievents", - "wai-aria", - "webidl", - "web-animations", - "xhr", - "service-workers", - "url", - "streams", - "console", + static func defaultIDLs() -> [(path: URL, shouldBeMerged: Bool)] { + let enabledIDLs: [(name: String, shouldBeMerged: Bool)] = [ + ("dom", true), + ("fetch", true), + ("FileAPI", true), + ("html", true), + ("geometry", true), + ("hr-time", true), + ("referrer-policy", true), + ("uievents", true), + ("wai-aria", true), + ("webidl", true), + ("web-animations", true), + ("xhr", true), + ("service-workers", true), + ("url", true), + ("streams", true), + ("console", true), ] return enabledIDLs.map { idl in - packageDir + let path = packageDir .appendingPathComponent("node_modules") .appendingPathComponent("@webref") .appendingPathComponent("idl") - .appendingPathComponent(idl + ".idl") + .appendingPathComponent(idl.name + ".idl") + return (path, idl.shouldBeMerged) } } } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 2ee97487..d33dca75 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -6,7 +6,18 @@ func parseOptions() -> [(outputPath: String, idlPaths: [URL])] { if args.count > 2 { return [(args[1], Array(args[2...].map(URL.init(fileURLWithPath: ))))] } else { - return [("Sources/DOMKit/Generated.swift", IDLParser.defaultIDLs())] + var mergedSources: [URL] = [] + var separateSources: [(String, [URL])] = [] + for idl in IDLParser.defaultIDLs() { + if idl.shouldBeMerged { + mergedSources.append(idl.path) + } else { + let name = idl.path.deletingPathExtension().lastPathComponent + let outputPath = "Sources/DOMKit/\(name).swift" + separateSources.append((outputPath, [idl.path])) + } + } + return [("Sources/DOMKit/Generated.swift", mergedSources)] + separateSources } } From 18534171333e7c8a85c8d69d5f18e7b85f5757e6 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 06:39:23 +0900 Subject: [PATCH 14/24] Record string literal, closure type, union use for each outputs --- Sources/WebIDLToSwift/Context.swift | 49 +++++++++++++------ Sources/WebIDLToSwift/IDLBuilder.swift | 8 +-- .../UnionType+SwiftRepresentable.swift | 8 ++- Sources/WebIDLToSwift/UnionType.swift | 2 +- .../WebIDL+SwiftRepresentation.swift | 28 +++++------ Sources/WebIDLToSwift/main.swift | 1 + 6 files changed, 58 insertions(+), 38 deletions(-) diff --git a/Sources/WebIDLToSwift/Context.swift b/Sources/WebIDLToSwift/Context.swift index 495eb878..86a9f389 100644 --- a/Sources/WebIDLToSwift/Context.swift +++ b/Sources/WebIDLToSwift/Context.swift @@ -4,19 +4,6 @@ import WebIDL enum Context { private(set) static var current = State() - static var closurePatterns: Set = [] - private(set) static var strings: Set = ["toString"] - static var unions: Set = [] - - static func source(for name: String) -> SwiftSource { - assert(!name.isEmpty) - if name == "self" { - return "Strings._self" - } - strings.insert(name) - return "Strings.\(name)" - } - private static var stack: [State] = [] static func withState(_ new: State, body: () throws -> T) rethrows -> T { stack.append(current) @@ -75,7 +62,7 @@ enum Context { return newState } - static func root( + static func rootForIDLFile( interfaces: [String: MergedInterface], ignored: [String: Set], types: [String: IDLTypealias] @@ -88,3 +75,37 @@ enum Context { } } } + +struct Record { + private(set) var closurePatterns: Set = [] + private(set) var strings: Set = ["toString"] + private(set) var unions: Set = [] + private(set) static var current = Record() + + static func reset() { + current = Record() + } + + static func useStringLiteral(for name: String) -> SwiftSource { + assert(!name.isEmpty) + if name == "self" { + return "Strings._self" + } + current.strings.insert(name) + return "Strings.\(name)" + } + + @discardableResult + static func useUnion(_ types: Set) -> String { + let union = current.unions.first(where: { $0.types == types }) ?? UnionType(types: types) + useUnion(union) + return union.name + } + static func useUnion(_ union: UnionType) { + current.unions.insert(union) + } + + static func useClosurePattern(_ closurePattern: ClosurePattern) { + current.closurePatterns.insert(closurePattern) + } +} diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index 925e3c1d..68b54aa7 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -43,7 +43,7 @@ enum IDLBuilder { continue } - let nodeContent = Context.withState(.root( + let nodeContent = Context.withState(.rootForIDLFile( interfaces: merged.interfaces, ignored: [ // functions as parameters are unsupported @@ -110,12 +110,12 @@ enum IDLBuilder { static func generateClosureTypes() throws -> SwiftSource { return """ /* variadic generics please */ - \(lines: Context.closurePatterns.sorted().map(\.swiftRepresentation)) + \(lines: Record.current.closurePatterns.sorted().map(\.swiftRepresentation)) """ } static func generateStrings() throws -> SwiftSource { - let strings = Context.strings.sorted() + let strings = Record.current.strings.sorted() return """ @usableFromInline enum Strings { static let _self: JSString = "self" @@ -126,7 +126,7 @@ enum IDLBuilder { static func generateUnions() throws -> SwiftSource { var contents: [SwiftSource] = [] - for union in Context.unions.sorted(by: { $0.name < $1.name }) { + for union in Record.current.unions.sorted(by: { $0.name < $1.name }) { guard !ignoredNames.contains(union.name) else { continue } contents.append(union.swiftRepresentation) } diff --git a/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift b/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift index 9624df68..45843508 100644 --- a/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift +++ b/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift @@ -171,7 +171,7 @@ extension SlimIDLType.TypeValue: SwiftRepresentable { return "\(name)" } case let .union(types): - return "\(unionName(types: types))" + return "\(Record.useUnion(types))" } } @@ -201,13 +201,11 @@ extension SlimIDLType.TypeValue: SwiftRepresentable { return "\(name)" } case let .union(types): - return "\(unionName(types: types))" + return "\(Record.useUnion(types))" } } } func unionName(types: Set) -> String { - let union = Context.unions.first(where: { $0.types == types }) ?? UnionType(types: types) - Context.unions.insert(union) - return union.name + Record.useUnion(types) } diff --git a/Sources/WebIDLToSwift/UnionType.swift b/Sources/WebIDLToSwift/UnionType.swift index 430dd7db..a22f210e 100644 --- a/Sources/WebIDLToSwift/UnionType.swift +++ b/Sources/WebIDLToSwift/UnionType.swift @@ -59,7 +59,7 @@ struct SlimIDLType: Hashable, Encodable { case let .union(types): let slimmed = Set(types.map(SlimIDLType.init)) self = .union(slimmed) - Context.unions.insert(UnionType(types: slimmed)) + Record.useUnion(UnionType(types: slimmed)) } } } diff --git a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift index 52568878..a8ca6afe 100644 --- a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift +++ b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift @@ -39,12 +39,12 @@ extension IDLAttribute: SwiftRepresentable, Initializable { } else if Context.constructor == nil || Context.static { // can't do property wrappers on extensions let setter: SwiftSource = """ - nonmutating set { \(idlType.propertyWrapper(readonly: readonly))[\(Context.source(for: name)), in: jsObject] = newValue } + nonmutating set { \(idlType.propertyWrapper(readonly: readonly))[\(Record.useStringLiteral(for: name)), in: jsObject] = newValue } """ return """ @inlinable public\(raw: Context.static ? " static" : "") var \(name): \(idlType) { - get { \(idlType.propertyWrapper(readonly: readonly))[\(Context.source(for: name)), in: jsObject] } + get { \(idlType.propertyWrapper(readonly: readonly))[\(Record.useStringLiteral(for: name)), in: jsObject] } \(readonly ? "" : setter) } """ @@ -59,7 +59,7 @@ extension IDLAttribute: SwiftRepresentable, Initializable { var initializer: SwiftSource? { assert(!Context.static) return """ - \(wrapperName) = \(idlType.propertyWrapper(readonly: readonly))(jsObject: jsObject, name: \(Context.source(for: name))) + \(wrapperName) = \(idlType.propertyWrapper(readonly: readonly))(jsObject: jsObject, name: \(Record.useStringLiteral(for: name))) """ } } @@ -86,15 +86,15 @@ extension MergedDictionary: SwiftRepresentable { } return """ public convenience init(\(sequence: params)) { - let object = JSObject.global[\(Context.source(for: "Object"))].function!.new() + let object = JSObject.global[\(Record.useStringLiteral(for: "Object"))].function!.new() \(lines: membersWithPropertyWrapper.map { member, wrapper in if member.idlType.isFunction { return """ - \(wrapper)[\(Context.source(for: member.name)), in: object] = \(member.name) + \(wrapper)[\(Record.useStringLiteral(for: member.name)), in: object] = \(member.name) """ } else { return """ - object[\(Context.source(for: member.name))] = \(member.name).jsValue + object[\(Record.useStringLiteral(for: member.name))] = \(member.name).jsValue """ } }) @@ -103,7 +103,7 @@ extension MergedDictionary: SwiftRepresentable { public required init(unsafelyWrapping object: JSObject) { \(lines: membersWithPropertyWrapper.map { member, wrapper in - "_\(raw: member.name) = \(wrapper)(jsObject: object, name: \(Context.source(for: member.name)))" + "_\(raw: member.name) = \(wrapper)(jsObject: object, name: \(Record.useStringLiteral(for: member.name)))" }) super.init(unsafelyWrapping: object) } @@ -146,8 +146,8 @@ extension IDLEnum: SwiftRepresentable { extension IDLCallback: SwiftRepresentable { var swiftRepresentation: SwiftSource { let isVoid = idlType.swiftRepresentation == "Void" - Context.closurePatterns.insert(ClosurePattern(nullable: false, void: isVoid, argCount: arguments.count)) - Context.closurePatterns.insert(ClosurePattern(nullable: true, void: isVoid, argCount: arguments.count)) + Record.useClosurePattern(ClosurePattern(nullable: false, void: isVoid, argCount: arguments.count)) + Record.useClosurePattern(ClosurePattern(nullable: true, void: isVoid, argCount: arguments.count)) return """ public typealias \(name) = (\(sequence: arguments.map { "\($0.idlType)\($0.variadic ? "..." : "")" @@ -168,7 +168,7 @@ protocol Initializable { extension MergedInterface: SwiftRepresentable { var swiftRepresentation: SwiftSource { - let constructor: SwiftSource = "JSObject.global[\(Context.source(for: name))].function!" + let constructor: SwiftSource = "JSObject.global[\(Record.useStringLiteral(for: name))].function!" let body = Context.withState(.instance(constructor: constructor, this: "jsObject", className: "\(name)")) { members.map { member in let isOverride: Bool @@ -330,7 +330,7 @@ extension IDLIterableDeclaration: SwiftRepresentable, Initializable { extension MergedNamespace: SwiftRepresentable { var swiftRepresentation: SwiftSource { - let this: SwiftSource = "JSObject.global[\(Context.source(for: name))].object!" + let this: SwiftSource = "JSObject.global[\(Record.useStringLiteral(for: name))].object!" let body = Context.withState(.static(this: this, inClass: false, className: "\(name)")) { members.map(toSwift).joined(separator: "\n\n") } @@ -425,7 +425,7 @@ extension IDLOperation: SwiftRepresentable, Initializable { argsArray = "[\(sequence: args)]" } - let function: SwiftSource = "this[\(Context.source(for: name))].function!" + let function: SwiftSource = "this[\(Record.useStringLiteral(for: name))].function!" return ( prep: """ \(lines: prep) @@ -641,7 +641,7 @@ extension IDLTypedef: SwiftRepresentable { var swiftRepresentation: SwiftSource { if case let .union(types) = idlType.value { let typeSet = Set(types.map(SlimIDLType.init)) - if let existing = Context.unions.first(where: { $0.types == typeSet }) { + if let existing = Record.current.unions.first(where: { $0.types == typeSet }) { if let existingName = existing.friendlyName { return "public typealias \(name) = \(existingName)" } else { @@ -649,7 +649,7 @@ extension IDLTypedef: SwiftRepresentable { return "" } } else { - Context.unions.insert(UnionType(types: typeSet, friendlyName: name)) + Record.useUnion(UnionType(types: typeSet, friendlyName: name)) return "" } } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index d33dca75..45c0cffb 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -27,6 +27,7 @@ func main() { do { let options = parseOptions() for (outputPath, idlPaths) in options { + Record.reset() let startTime = Date() print("Generating bindings for \(idlPaths.map(\.path))...") let idls = try idlPaths.map { try IDLParser.parseIDL(path: $0) } From 87b4e744765a6cfc90f900c0fc1e98671e800d7b Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 08:19:57 +0900 Subject: [PATCH 15/24] WIP --- Package.swift | 17 +- .../DOMKit/{Generated.swift => DOMKit.swift} | 694 +- Sources/DOMKit/Support.swift | 3 +- Sources/DOMKitConsole/DOMKitConsole.swift | 1 + Sources/DOMKitFileAPI/DOMKitFileAPI.swift | 387 + Sources/DOMKitFileAPI/Support.swift | 16 + Sources/DOMKitHTML/DOM.swift | 2334 ---- Sources/DOMKitHTML/DOMKitHTML.swift | 9382 ----------------- Sources/DOMKitHTML/ServiceWorker.swift | 697 -- Sources/DOMKitHTML/Support.swift | 4 - Sources/DOMKitWebIDL/DOMKitWebIDL.swift | 198 + Sources/WebIDLToSwift/IDLBuilder.swift | 20 +- Sources/WebIDLToSwift/IDLParser.swift | 52 +- Sources/WebIDLToSwift/main.swift | 32 +- 14 files changed, 695 insertions(+), 13142 deletions(-) rename Sources/DOMKit/{Generated.swift => DOMKit.swift} (96%) create mode 100644 Sources/DOMKitFileAPI/DOMKitFileAPI.swift create mode 100644 Sources/DOMKitFileAPI/Support.swift delete mode 100644 Sources/DOMKitHTML/DOM.swift delete mode 100644 Sources/DOMKitHTML/DOMKitHTML.swift delete mode 100644 Sources/DOMKitHTML/ServiceWorker.swift delete mode 100644 Sources/DOMKitHTML/Support.swift create mode 100644 Sources/DOMKitWebIDL/DOMKitWebIDL.swift diff --git a/Package.swift b/Package.swift index d2fb7be8..034ac61d 100644 --- a/Package.swift +++ b/Package.swift @@ -3,6 +3,8 @@ import PackageDescription +let dependencyOfWebIDLToSwift: [Target.Dependency] = ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")] + let package = Package( name: "DOMKit", products: [ @@ -26,13 +28,14 @@ let package = Package( dependencies: ["DOMKit"]), .target( name: "DOMKit", - dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), - .target( - name: "DOMKitConsole", - dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), - .target( - name: "DOMKitFetch", - dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + dependencies: dependencyOfWebIDLToSwift + [ + "DOMKitFileAPI", + "DOMKitConsole", + "DOMKitWebIDL" + ]), + .target(name: "DOMKitConsole", dependencies: dependencyOfWebIDLToSwift), + .target(name: "DOMKitFileAPI", dependencies: dependencyOfWebIDLToSwift + ["DOMKitWebIDL"]), + .target(name: "DOMKitWebIDL", dependencies: dependencyOfWebIDLToSwift), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/DOMKit.swift similarity index 96% rename from Sources/DOMKit/Generated.swift rename to Sources/DOMKit/DOMKit.swift index f2a075f0..521af76c 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/DOMKit.swift @@ -1,5 +1,9 @@ // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! +import DOMKitConsole +import DOMKitFileAPI +import DOMKitWebIDL +import ECMAScript import JavaScriptEventLoop import JavaScriptKit @@ -760,80 +764,6 @@ public class BeforeUnloadEvent: Event { // XXX: member 'returnValue' is ignored } -public class Blob: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - self.jsObject = jsObject - } - - @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var size: UInt64 - - @ReadonlyAttribute - public var type: String - - @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { - let this = jsObject - return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! - } - - // XXX: member 'stream' is ignored - - @inlinable public func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class BlobPropertyBag: BridgedDictionary { - public convenience init(type: String, endings: EndingType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.endings] = endings.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var endings: EndingType -} - public protocol Body: JSBridgedClass {} public extension Body { // XXX: attribute 'body' is ignored @@ -2318,82 +2248,6 @@ public class CustomEventInit: BridgedDictionary { public var detail: JSValue } -public class DOMException: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - self.jsObject = jsObject - } - - @inlinable public convenience init(message: String? = nil, name: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var message: String - - @ReadonlyAttribute - public var code: UInt16 - - public static let INDEX_SIZE_ERR: UInt16 = 1 - - public static let DOMSTRING_SIZE_ERR: UInt16 = 2 - - public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 - - public static let WRONG_DOCUMENT_ERR: UInt16 = 4 - - public static let INVALID_CHARACTER_ERR: UInt16 = 5 - - public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 - - public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 - - public static let NOT_FOUND_ERR: UInt16 = 8 - - public static let NOT_SUPPORTED_ERR: UInt16 = 9 - - public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 - - public static let INVALID_STATE_ERR: UInt16 = 11 - - public static let SYNTAX_ERR: UInt16 = 12 - - public static let INVALID_MODIFICATION_ERR: UInt16 = 13 - - public static let NAMESPACE_ERR: UInt16 = 14 - - public static let INVALID_ACCESS_ERR: UInt16 = 15 - - public static let VALIDATION_ERR: UInt16 = 16 - - public static let TYPE_MISMATCH_ERR: UInt16 = 17 - - public static let SECURITY_ERR: UInt16 = 18 - - public static let NETWORK_ERR: UInt16 = 19 - - public static let ABORT_ERR: UInt16 = 20 - - public static let URL_MISMATCH_ERR: UInt16 = 21 - - public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 - - public static let TIMEOUT_ERR: UInt16 = 23 - - public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 - - public static let DATA_CLONE_ERR: UInt16 = 25 -} - public class DOMImplementation: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMImplementation].function! } @@ -3629,6 +3483,7 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } public required init(unsafelyWrapping jsObject: JSObject) { + _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) _implementation = ReadonlyAttribute(jsObject: jsObject, name: Strings.implementation) _URL = ReadonlyAttribute(jsObject: jsObject, name: Strings.URL) _documentURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentURI) @@ -3670,10 +3525,12 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN _anchors = ReadonlyAttribute(jsObject: jsObject, name: Strings.anchors) _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) - _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) super.init(unsafelyWrapping: jsObject) } + @ReadonlyAttribute + public var timeline: DocumentTimeline + @inlinable public convenience init() { self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) } @@ -3968,9 +3825,6 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN @ReadonlyAttribute public var all: HTMLAllCollection - - @ReadonlyAttribute - public var timeline: DocumentTimeline } public protocol DocumentAndElementEventHandlers: JSBridgedClass {} @@ -4005,12 +3859,12 @@ public class DocumentFragment: Node, NonElementParentNode, ParentNode { public protocol DocumentOrShadowRoot: JSBridgedClass {} public extension DocumentOrShadowRoot { - @inlinable var activeElement: Element? { ReadonlyAttribute[Strings.activeElement, in: jsObject] } - @inlinable func getAnimations() -> [Animation] { let this = jsObject return this[Strings.getAnimations].function!(this: this, arguments: []).fromJSValue()! } + + @inlinable var activeElement: Element? { ReadonlyAttribute[Strings.activeElement, in: jsObject] } } public enum DocumentReadyState: JSString, JSValueCompatible { @@ -4176,7 +4030,7 @@ public class EffectTiming: BridgedDictionary { public var easing: String } -public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable { +public class Element: Node, ARIAMixin, Animatable, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4455,24 +4309,6 @@ public class ElementInternals: JSBridgedClass, ARIAMixin { public var labels: NodeList } -public enum EndingType: JSString, JSValueCompatible { - case transparent = "transparent" - case native = "native" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - public class ErrorEvent: Event { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ErrorEvent].function! } @@ -4922,139 +4758,6 @@ public class FetchEventInit: BridgedDictionary { public var handled: JSPromise } -public class File: Blob { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var lastModified: Int64 -} - -public class FileList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> File? { - jsObject[key].fromJSValue() - } - - @ReadonlyAttribute - public var length: UInt32 -} - -public class FilePropertyBag: BridgedDictionary { - public convenience init(lastModified: Int64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.lastModified] = lastModified.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var lastModified: Int64 -} - -public class FileReader: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) - _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) - _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) - _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func readAsArrayBuffer(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func readAsBinaryString(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { - let this = jsObject - _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) - } - - @inlinable public func readAsDataURL(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func abort() { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: []) - } - - public static let EMPTY: UInt16 = 0 - - public static let LOADING: UInt16 = 1 - - public static let DONE: UInt16 = 2 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var result: ArrayBuffer_or_String? - - @ReadonlyAttribute - public var error: DOMException? - - @ClosureAttribute1Optional - public var onloadstart: EventHandler - - @ClosureAttribute1Optional - public var onprogress: EventHandler - - @ClosureAttribute1Optional - public var onload: EventHandler - - @ClosureAttribute1Optional - public var onabort: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @ClosureAttribute1Optional - public var onloadend: EventHandler -} - public enum FillMode: JSString, JSValueCompatible { case none = "none" case forwards = "forwards" @@ -13201,25 +12904,15 @@ public class TreeWalker: JSBridgedClass { } } +public typealias DOMHighResTimeStamp = Double +public typealias EpochTimeStamp = UInt64 + public typealias CanvasFilterInput = [String: JSValue] public typealias EventHandler = EventHandlerNonNull? public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? -public typealias DOMHighResTimeStamp = Double -public typealias EpochTimeStamp = UInt64 - -public typealias DOMTimeStamp = UInt64 - -public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void -public typealias BlobCallback = (Blob?) -> Void -public typealias FunctionStringCallback = (String) -> Void -public typealias EventHandlerNonNull = (Event) -> JSValue -public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue -public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? -public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void -public typealias VoidFunction = () -> Void public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise @@ -13231,6 +12924,13 @@ public typealias TransformerStartCallback = (TransformStreamDefaultController) - public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise public typealias QueuingStrategySize = (JSValue) -> Double +public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void +public typealias BlobCallback = (Blob?) -> Void +public typealias FunctionStringCallback = (String) -> Void +public typealias EventHandlerNonNull = (Event) -> JSValue +public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue +public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? +public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void public class UIEvent: Event { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } @@ -13307,16 +13007,6 @@ public class URL: JSBridgedClass { self.jsObject = jsObject } - @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { - let this = constructor - return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! - } - - @inlinable public static func revokeObjectURL(url: String) { - let this = constructor - _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) - } - @inlinable public convenience init(url: String, base: String? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) } @@ -14028,6 +13718,10 @@ public extension WindowOrWorkerGlobalScope { return try await _promise.value.fromJSValue()! } + @inlinable var performance: Performance { ReadonlyAttribute[Strings.performance, in: jsObject] } + + @inlinable var caches: CacheStorage { ReadonlyAttribute[Strings.caches, in: jsObject] } + @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } @inlinable var isSecureContext: Bool { ReadonlyAttribute[Strings.isSecureContext, in: jsObject] } @@ -14111,10 +13805,6 @@ public extension WindowOrWorkerGlobalScope { let this = jsObject return this[Strings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } - - @inlinable var performance: Performance { ReadonlyAttribute[Strings.performance, in: jsObject] } - - @inlinable var caches: CacheStorage { ReadonlyAttribute[Strings.caches, in: jsObject] } } public class WindowPostMessageOptions: BridgedDictionary { @@ -14732,107 +14422,6 @@ public class XSLTProcessor: JSBridgedClass { } } -public enum console { - @inlinable public static var jsObject: JSObject { - JSObject.global[Strings.console].object! - } - - @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func clear() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public static func debug(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func error(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func info(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func log(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) - } - - @inlinable public static func trace(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func warn(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) - } - - @inlinable public static func dirxml(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func count(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func countReset(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func group(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupCollapsed(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupEnd() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupEnd].function!(this: this, arguments: []) - } - - @inlinable public static func time(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func timeEnd(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } -} - /* variadic generics please */ @propertyWrapper public final class ClosureAttribute0 where ReturnType: JSValueCompatible @@ -14898,68 +14487,6 @@ public enum console { } } -@propertyWrapper public final class ClosureAttribute0OptionalVoid { - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (() -> Void)? { - get { ClosureAttribute0OptionalVoid[name, in: jsObject] } - set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function() } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { _ in - newValue() - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute0Void { - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: () -> Void { - get { ClosureAttribute0Void[name, in: jsObject] } - set { ClosureAttribute0Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { - get { - let function = jsObject[name].function! - return { function() } - } - set { - jsObject[name] = JSClosure { _ in - newValue() - return .undefined - }.jsValue - } - } -} - @propertyWrapper public final class ClosureAttribute1 where A0: JSValueCompatible, ReturnType: JSValueCompatible { @@ -15298,7 +14825,6 @@ public enum console { @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" @usableFromInline static let BarProp: JSString = "BarProp" @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" - @usableFromInline static let Blob: JSString = "Blob" @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" @usableFromInline static let CDATASection: JSString = "CDATASection" @@ -15314,7 +14840,6 @@ public enum console { @usableFromInline static let CountQueuingStrategy: JSString = "CountQueuingStrategy" @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" @usableFromInline static let CustomEvent: JSString = "CustomEvent" - @usableFromInline static let DOMException: JSString = "DOMException" @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" @usableFromInline static let DOMMatrix: JSString = "DOMMatrix" @usableFromInline static let DOMMatrixReadOnly: JSString = "DOMMatrixReadOnly" @@ -15343,9 +14868,6 @@ public enum console { @usableFromInline static let EventSource: JSString = "EventSource" @usableFromInline static let EventTarget: JSString = "EventTarget" @usableFromInline static let External: JSString = "External" - @usableFromInline static let File: JSString = "File" - @usableFromInline static let FileList: JSString = "FileList" - @usableFromInline static let FileReader: JSString = "FileReader" @usableFromInline static let FocusEvent: JSString = "FocusEvent" @usableFromInline static let FormData: JSString = "FormData" @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" @@ -15607,7 +15129,6 @@ public enum console { @usableFromInline static let ariaValueText: JSString = "ariaValueText" @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" @usableFromInline static let `as`: JSString = "as" - @usableFromInline static let assert: JSString = "assert" @usableFromInline static let assign: JSString = "assign" @usableFromInline static let assignedElements: JSString = "assignedElements" @usableFromInline static let assignedNodes: JSString = "assignedNodes" @@ -15732,7 +15253,6 @@ public enum console { @usableFromInline static let composite: JSString = "composite" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let confirm: JSString = "confirm" - @usableFromInline static let console: JSString = "console" @usableFromInline static let contains: JSString = "contains" @usableFromInline static let content: JSString = "content" @usableFromInline static let contentDocument: JSString = "contentDocument" @@ -15746,8 +15266,6 @@ public enum console { @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" - @usableFromInline static let count: JSString = "count" - @usableFromInline static let countReset: JSString = "countReset" @usableFromInline static let createAttribute: JSString = "createAttribute" @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" @usableFromInline static let createCDATASection: JSString = "createCDATASection" @@ -15764,7 +15282,6 @@ public enum console { @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" @usableFromInline static let createImageData: JSString = "createImageData" @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" - @usableFromInline static let createObjectURL: JSString = "createObjectURL" @usableFromInline static let createPattern: JSString = "createPattern" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @@ -15791,7 +15308,6 @@ public enum console { @usableFromInline static let dataTransfer: JSString = "dataTransfer" @usableFromInline static let dataset: JSString = "dataset" @usableFromInline static let dateTime: JSString = "dateTime" - @usableFromInline static let debug: JSString = "debug" @usableFromInline static let declare: JSString = "declare" @usableFromInline static let decode: JSString = "decode" @usableFromInline static let decoding: JSString = "decoding" @@ -15829,7 +15345,6 @@ public enum console { @usableFromInline static let dir: JSString = "dir" @usableFromInline static let dirName: JSString = "dirName" @usableFromInline static let direction: JSString = "direction" - @usableFromInline static let dirxml: JSString = "dirxml" @usableFromInline static let disable: JSString = "disable" @usableFromInline static let disabled: JSString = "disabled" @usableFromInline static let disconnect: JSString = "disconnect" @@ -15866,7 +15381,6 @@ public enum console { @usableFromInline static let endOffset: JSString = "endOffset" @usableFromInline static let endTime: JSString = "endTime" @usableFromInline static let ended: JSString = "ended" - @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" @usableFromInline static let error: JSString = "error" @@ -15965,9 +15479,6 @@ public enum console { @usableFromInline static let globalAlpha: JSString = "globalAlpha" @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" @usableFromInline static let go: JSString = "go" - @usableFromInline static let group: JSString = "group" - @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" - @usableFromInline static let groupEnd: JSString = "groupEnd" @usableFromInline static let handled: JSString = "handled" @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" @@ -16013,7 +15524,6 @@ public enum console { @usableFromInline static let indeterminate: JSString = "indeterminate" @usableFromInline static let index: JSString = "index" @usableFromInline static let inert: JSString = "inert" - @usableFromInline static let info: JSString = "info" @usableFromInline static let initCompositionEvent: JSString = "initCompositionEvent" @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" @usableFromInline static let initEvent: JSString = "initEvent" @@ -16101,7 +15611,6 @@ public enum console { @usableFromInline static let location: JSString = "location" @usableFromInline static let locationbar: JSString = "locationbar" @usableFromInline static let locked: JSString = "locked" - @usableFromInline static let log: JSString = "log" @usableFromInline static let longDesc: JSString = "longDesc" @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" @@ -16387,10 +15896,6 @@ public enum console { @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" @usableFromInline static let read: JSString = "read" - @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" - @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" - @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" - @usableFromInline static let readAsText: JSString = "readAsText" @usableFromInline static let readOnly: JSString = "readOnly" @usableFromInline static let readable: JSString = "readable" @usableFromInline static let readableType: JSString = "readableType" @@ -16449,14 +15954,12 @@ public enum console { @usableFromInline static let responseURL: JSString = "responseURL" @usableFromInline static let responseXML: JSString = "responseXML" @usableFromInline static let restore: JSString = "restore" - @usableFromInline static let result: JSString = "result" @usableFromInline static let resultType: JSString = "resultType" @usableFromInline static let resultingClientId: JSString = "resultingClientId" @usableFromInline static let returnValue: JSString = "returnValue" @usableFromInline static let rev: JSString = "rev" @usableFromInline static let reverse: JSString = "reverse" @usableFromInline static let reversed: JSString = "reversed" - @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" @usableFromInline static let right: JSString = "right" @usableFromInline static let role: JSString = "role" @usableFromInline static let root: JSString = "root" @@ -16554,7 +16057,6 @@ public enum console { @usableFromInline static let skewXSelf: JSString = "skewXSelf" @usableFromInline static let skewY: JSString = "skewY" @usableFromInline static let skewYSelf: JSString = "skewYSelf" - @usableFromInline static let slice: JSString = "slice" @usableFromInline static let slot: JSString = "slot" @usableFromInline static let slotAssignment: JSString = "slotAssignment" @usableFromInline static let snapshotItem: JSString = "snapshotItem" @@ -16607,7 +16109,6 @@ public enum console { @usableFromInline static let tFoot: JSString = "tFoot" @usableFromInline static let tHead: JSString = "tHead" @usableFromInline static let tabIndex: JSString = "tabIndex" - @usableFromInline static let table: JSString = "table" @usableFromInline static let tagName: JSString = "tagName" @usableFromInline static let taintEnabled: JSString = "taintEnabled" @usableFromInline static let takeRecords: JSString = "takeRecords" @@ -16623,9 +16124,6 @@ public enum console { @usableFromInline static let textRendering: JSString = "textRendering" @usableFromInline static let textTracks: JSString = "textTracks" @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" - @usableFromInline static let time: JSString = "time" - @usableFromInline static let timeEnd: JSString = "timeEnd" - @usableFromInline static let timeLog: JSString = "timeLog" @usableFromInline static let timeOrigin: JSString = "timeOrigin" @usableFromInline static let timeStamp: JSString = "timeStamp" @usableFromInline static let timeline: JSString = "timeline" @@ -16643,7 +16141,6 @@ public enum console { @usableFromInline static let toolbar: JSString = "toolbar" @usableFromInline static let top: JSString = "top" @usableFromInline static let total: JSString = "total" - @usableFromInline static let trace: JSString = "trace" @usableFromInline static let track: JSString = "track" @usableFromInline static let transfer: JSString = "transfer" @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" @@ -16695,7 +16192,6 @@ public enum console { @usableFromInline static let vspace: JSString = "vspace" @usableFromInline static let w: JSString = "w" @usableFromInline static let waiting: JSString = "waiting" - @usableFromInline static let warn: JSString = "warn" @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" @usableFromInline static let whatToShow: JSString = "whatToShow" @usableFromInline static let whenDefined: JSString = "whenDefined" @@ -16717,48 +16213,6 @@ public enum console { @usableFromInline static let z: JSString = "z" } -public protocol Any_ArrayBuffer_or_String: ConvertibleToJSValue {} -extension ArrayBuffer: Any_ArrayBuffer_or_String {} -extension String: Any_ArrayBuffer_or_String {} - -public enum ArrayBuffer_or_String: JSValueCompatible, Any_ArrayBuffer_or_String { - case arrayBuffer(ArrayBuffer) - case string(String) - - var arrayBuffer: ArrayBuffer? { - switch self { - case let .arrayBuffer(arrayBuffer): return arrayBuffer - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let arrayBuffer: ArrayBuffer = value.fromJSValue() { - return .arrayBuffer(arrayBuffer) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .arrayBuffer(arrayBuffer): - return arrayBuffer.jsValue - case let .string(string): - return string.jsValue - } - } -} - public protocol Any_AudioTrack_or_TextTrack_or_VideoTrack: ConvertibleToJSValue {} extension AudioTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} extension TextTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} @@ -16815,104 +16269,6 @@ public enum AudioTrack_or_TextTrack_or_VideoTrack: JSValueCompatible, Any_AudioT } } -public protocol Any_BlobPart: ConvertibleToJSValue {} -extension Blob: Any_BlobPart {} -extension BufferSource: Any_BlobPart {} -extension String: Any_BlobPart {} - -public enum BlobPart: JSValueCompatible, Any_BlobPart { - case blob(Blob) - case bufferSource(BufferSource) - case string(String) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_BufferSource: ConvertibleToJSValue {} -extension ArrayBuffer: Any_BufferSource {} -extension ArrayBufferView: Any_BufferSource {} - -public enum BufferSource: JSValueCompatible, Any_BufferSource { - case arrayBuffer(ArrayBuffer) - case arrayBufferView(ArrayBufferView) - - var arrayBuffer: ArrayBuffer? { - switch self { - case let .arrayBuffer(arrayBuffer): return arrayBuffer - default: return nil - } - } - - var arrayBufferView: ArrayBufferView? { - switch self { - case let .arrayBufferView(arrayBufferView): return arrayBufferView - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let arrayBuffer: ArrayBuffer = value.fromJSValue() { - return .arrayBuffer(arrayBuffer) - } - if let arrayBufferView: ArrayBufferView = value.fromJSValue() { - return .arrayBufferView(arrayBufferView) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .arrayBuffer(arrayBuffer): - return arrayBuffer.jsValue - case let .arrayBufferView(arrayBufferView): - return arrayBufferView.jsValue - } - } -} - public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} diff --git a/Sources/DOMKit/Support.swift b/Sources/DOMKit/Support.swift index df39886f..7ea147e4 100644 --- a/Sources/DOMKit/Support.swift +++ b/Sources/DOMKit/Support.swift @@ -1,5 +1,6 @@ import JavaScriptKit -@_exported import ECMAScript +import ECMAScript +import DOMKitFileAPI /* TODO: fix this */ public typealias __UNSUPPORTED_BIGINT__ = JSValue diff --git a/Sources/DOMKitConsole/DOMKitConsole.swift b/Sources/DOMKitConsole/DOMKitConsole.swift index bc1f0800..1bc9b851 100644 --- a/Sources/DOMKitConsole/DOMKitConsole.swift +++ b/Sources/DOMKitConsole/DOMKitConsole.swift @@ -1,5 +1,6 @@ // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! +import ECMAScript import JavaScriptEventLoop import JavaScriptKit diff --git a/Sources/DOMKitFileAPI/DOMKitFileAPI.swift b/Sources/DOMKitFileAPI/DOMKitFileAPI.swift new file mode 100644 index 00000000..a670b129 --- /dev/null +++ b/Sources/DOMKitFileAPI/DOMKitFileAPI.swift @@ -0,0 +1,387 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import DOMKitWebIDL +import ECMAScript +import JavaScriptEventLoop +import JavaScriptKit + +public class Blob: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + self.jsObject = jsObject + } + + @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var size: UInt64 + + @ReadonlyAttribute + public var type: String + + @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { + let this = jsObject + return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! + } + + // XXX: member 'stream' is ignored + + @inlinable public func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class BlobPropertyBag: BridgedDictionary { + public convenience init(type: String, endings: EndingType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.endings] = endings.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var endings: EndingType +} + +public enum EndingType: JSString, JSValueCompatible { + case transparent = "transparent" + case native = "native" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class File: Blob { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var lastModified: Int64 +} + +public class FileList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> File? { + jsObject[key].fromJSValue() + } + + @ReadonlyAttribute + public var length: UInt32 +} + +public class FilePropertyBag: BridgedDictionary { + public convenience init(lastModified: Int64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.lastModified] = lastModified.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var lastModified: Int64 +} + +public class FileReader: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + _onloadstart = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadstart) + _onprogress = ReadWriteAttribute(jsObject: jsObject, name: Strings.onprogress) + _onload = ReadWriteAttribute(jsObject: jsObject, name: Strings.onload) + _onabort = ReadWriteAttribute(jsObject: jsObject, name: Strings.onabort) + _onerror = ReadWriteAttribute(jsObject: jsObject, name: Strings.onerror) + _onloadend = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadend) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func readAsArrayBuffer(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func readAsBinaryString(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { + let this = jsObject + _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) + } + + @inlinable public func readAsDataURL(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func abort() { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: []) + } + + public static let EMPTY: UInt16 = 0 + + public static let LOADING: UInt16 = 1 + + public static let DONE: UInt16 = 2 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var result: ArrayBuffer_or_String? + + @ReadonlyAttribute + public var error: DOMException? + + @ReadWriteAttribute + public var onloadstart: EventHandler + + @ReadWriteAttribute + public var onprogress: EventHandler + + @ReadWriteAttribute + public var onload: EventHandler + + @ReadWriteAttribute + public var onabort: EventHandler + + @ReadWriteAttribute + public var onerror: EventHandler + + @ReadWriteAttribute + public var onloadend: EventHandler +} + +public class URL: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { + let this = constructor + return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! + } + + @inlinable public static func revokeObjectURL(url: String) { + let this = constructor + _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) + } +} + +/* variadic generics please */ + +@usableFromInline enum Strings { + static let _self: JSString = "self" + @usableFromInline static let Blob: JSString = "Blob" + @usableFromInline static let File: JSString = "File" + @usableFromInline static let FileList: JSString = "FileList" + @usableFromInline static let FileReader: JSString = "FileReader" + @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let URL: JSString = "URL" + @usableFromInline static let abort: JSString = "abort" + @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" + @usableFromInline static let createObjectURL: JSString = "createObjectURL" + @usableFromInline static let endings: JSString = "endings" + @usableFromInline static let error: JSString = "error" + @usableFromInline static let lastModified: JSString = "lastModified" + @usableFromInline static let length: JSString = "length" + @usableFromInline static let name: JSString = "name" + @usableFromInline static let onabort: JSString = "onabort" + @usableFromInline static let onerror: JSString = "onerror" + @usableFromInline static let onload: JSString = "onload" + @usableFromInline static let onloadend: JSString = "onloadend" + @usableFromInline static let onloadstart: JSString = "onloadstart" + @usableFromInline static let onprogress: JSString = "onprogress" + @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" + @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" + @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" + @usableFromInline static let readAsText: JSString = "readAsText" + @usableFromInline static let readyState: JSString = "readyState" + @usableFromInline static let result: JSString = "result" + @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" + @usableFromInline static let size: JSString = "size" + @usableFromInline static let slice: JSString = "slice" + @usableFromInline static let text: JSString = "text" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let type: JSString = "type" +} + +public protocol Any_ArrayBuffer_or_String: ConvertibleToJSValue {} +extension ArrayBuffer: Any_ArrayBuffer_or_String {} +extension String: Any_ArrayBuffer_or_String {} + +public enum ArrayBuffer_or_String: JSValueCompatible, Any_ArrayBuffer_or_String { + case arrayBuffer(ArrayBuffer) + case string(String) + + var arrayBuffer: ArrayBuffer? { + switch self { + case let .arrayBuffer(arrayBuffer): return arrayBuffer + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let arrayBuffer: ArrayBuffer = value.fromJSValue() { + return .arrayBuffer(arrayBuffer) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .arrayBuffer(arrayBuffer): + return arrayBuffer.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_BlobPart: ConvertibleToJSValue {} +extension Blob: Any_BlobPart {} +extension BufferSource: Any_BlobPart {} +extension String: Any_BlobPart {} + +public enum BlobPart: JSValueCompatible, Any_BlobPart { + case blob(Blob) + case bufferSource(BufferSource) + case string(String) + + var blob: Blob? { + switch self { + case let .blob(blob): return blob + default: return nil + } + } + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let blob: Blob = value.fromJSValue() { + return .blob(blob) + } + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .blob(blob): + return blob.jsValue + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .string(string): + return string.jsValue + } + } +} diff --git a/Sources/DOMKitFileAPI/Support.swift b/Sources/DOMKitFileAPI/Support.swift new file mode 100644 index 00000000..c79d4add --- /dev/null +++ b/Sources/DOMKitFileAPI/Support.swift @@ -0,0 +1,16 @@ +import JavaScriptKit + +public class EventTarget: JSBridgedClass { + public class var constructor: JSFunction { + JSObject.global["EventTarget"].function! + } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + +} +public typealias Blob_or_MediaSource = JSValue +public typealias EventHandler = JSValue diff --git a/Sources/DOMKitHTML/DOM.swift b/Sources/DOMKitHTML/DOM.swift deleted file mode 100644 index 3880d673..00000000 --- a/Sources/DOMKitHTML/DOM.swift +++ /dev/null @@ -1,2334 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AbortController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.AbortController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _signal = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.signal) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func abort(reason: JSValue? = nil) { - let this = jsObject - _ = this[DOMStrings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) - } -} - -public class AbortSignal: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.AbortSignal].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _aborted = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.aborted) - _reason = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.reason) - _onabort = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.onabort) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public static func abort(reason: JSValue? = nil) -> Self { - let this = constructor - return this[DOMStrings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public static func timeout(milliseconds: UInt64) -> Self { - let this = constructor - return this[DOMStrings.timeout].function!(this: this, arguments: [milliseconds.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var aborted: Bool - - @ReadonlyAttribute - public var reason: JSValue - - @inlinable public func throwIfAborted() { - let this = jsObject - _ = this[DOMStrings.throwIfAborted].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var onabort: EventHandler -} - -public class AbstractRange: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.AbstractRange].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _startContainer = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.startContainer) - _startOffset = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.startOffset) - _endContainer = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.endContainer) - _endOffset = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.endOffset) - _collapsed = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.collapsed) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var startContainer: Node - - @ReadonlyAttribute - public var startOffset: UInt32 - - @ReadonlyAttribute - public var endContainer: Node - - @ReadonlyAttribute - public var endOffset: UInt32 - - @ReadonlyAttribute - public var collapsed: Bool -} - -public class AddEventListenerOptions: BridgedDictionary { - public convenience init(passive: Bool, once: Bool, signal: AbortSignal) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.passive] = passive.jsValue - object[DOMStrings.once] = once.jsValue - object[DOMStrings.signal] = signal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _passive = ReadWriteAttribute(jsObject: object, name: DOMStrings.passive) - _once = ReadWriteAttribute(jsObject: object, name: DOMStrings.once) - _signal = ReadWriteAttribute(jsObject: object, name: DOMStrings.signal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var passive: Bool - - @ReadWriteAttribute - public var once: Bool - - @ReadWriteAttribute - public var signal: AbortSignal -} - -public class Attr: Node { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Attr].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.namespaceURI) - _prefix = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.prefix) - _localName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.localName) - _name = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.name) - _value = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.value) - _ownerElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.ownerElement) - _specified = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.specified) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var namespaceURI: String? - - @ReadonlyAttribute - public var prefix: String? - - @ReadonlyAttribute - public var localName: String - - @ReadonlyAttribute - public var name: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var ownerElement: Element? - - @ReadonlyAttribute - public var specified: Bool -} - -public class CDATASection: Text { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.CDATASection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.CharacterData].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.data) - _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var data: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { - let this = jsObject - return this[DOMStrings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! - } - - @inlinable public func appendData(data: String) { - let this = jsObject - _ = this[DOMStrings.appendData].function!(this: this, arguments: [data.jsValue]) - } - - @inlinable public func insertData(offset: UInt32, data: String) { - let this = jsObject - _ = this[DOMStrings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) - } - - @inlinable public func deleteData(offset: UInt32, count: UInt32) { - let this = jsObject - _ = this[DOMStrings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) - } - - @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { - let this = jsObject - _ = this[DOMStrings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) - } -} - -public protocol ChildNode: JSBridgedClass {} -public extension ChildNode { - @inlinable func before(nodes: Node_or_String...) { - let this = jsObject - _ = this[DOMStrings.before].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func after(nodes: Node_or_String...) { - let this = jsObject - _ = this[DOMStrings.after].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func replaceWith(nodes: Node_or_String...) { - let this = jsObject - _ = this[DOMStrings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func remove() { - let this = jsObject - _ = this[DOMStrings.remove].function!(this: this, arguments: []) - } -} - -public class Comment: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Comment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) - } -} - -public class CustomEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.CustomEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _detail = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.detail) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var detail: JSValue - - @inlinable public func initCustomEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, detail: JSValue? = nil) { - let this = jsObject - _ = this[DOMStrings.initCustomEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined, detail?.jsValue ?? .undefined]) - } -} - -public class CustomEventInit: BridgedDictionary { - public convenience init(detail: JSValue) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.detail] = detail.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _detail = ReadWriteAttribute(jsObject: object, name: DOMStrings.detail) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var detail: JSValue -} - -public class DOMImplementation: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.DOMImplementation].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func createDocumentType(qualifiedName: String, publicId: String, systemId: String) -> DocumentType { - let this = jsObject - return this[DOMStrings.createDocumentType].function!(this: this, arguments: [qualifiedName.jsValue, publicId.jsValue, systemId.jsValue]).fromJSValue()! - } - - @inlinable public func createDocument(namespace: String?, qualifiedName: String, doctype: DocumentType? = nil) -> XMLDocument { - let this = jsObject - return this[DOMStrings.createDocument].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, doctype?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createHTMLDocument(title: String? = nil) -> Document { - let this = jsObject - return this[DOMStrings.createHTMLDocument].function!(this: this, arguments: [title?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func hasFeature() -> Bool { - let this = jsObject - return this[DOMStrings.hasFeature].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DOMTokenList: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.DOMTokenList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) - _value = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.value) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> String? { - jsObject[key].fromJSValue() - } - - @inlinable public func contains(token: String) -> Bool { - let this = jsObject - return this[DOMStrings.contains].function!(this: this, arguments: [token.jsValue]).fromJSValue()! - } - - @inlinable public func add(tokens: String...) { - let this = jsObject - _ = this[DOMStrings.add].function!(this: this, arguments: tokens.map(\.jsValue)) - } - - @inlinable public func remove(tokens: String...) { - let this = jsObject - _ = this[DOMStrings.remove].function!(this: this, arguments: tokens.map(\.jsValue)) - } - - @inlinable public func toggle(token: String, force: Bool? = nil) -> Bool { - let this = jsObject - return this[DOMStrings.toggle].function!(this: this, arguments: [token.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func replace(token: String, newToken: String) -> Bool { - let this = jsObject - return this[DOMStrings.replace].function!(this: this, arguments: [token.jsValue, newToken.jsValue]).fromJSValue()! - } - - @inlinable public func supports(token: String) -> Bool { - let this = jsObject - return this[DOMStrings.supports].function!(this: this, arguments: [token.jsValue]).fromJSValue()! - } - - @ReadWriteAttribute - public var value: String - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Document].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _implementation = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.implementation) - _URL = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.URL) - _documentURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.documentURI) - _compatMode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.compatMode) - _characterSet = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.characterSet) - _charset = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.charset) - _inputEncoding = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.inputEncoding) - _contentType = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.contentType) - _doctype = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.doctype) - _documentElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.documentElement) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var implementation: DOMImplementation - - @ReadonlyAttribute - public var URL: String - - @ReadonlyAttribute - public var documentURI: String - - @ReadonlyAttribute - public var compatMode: String - - @ReadonlyAttribute - public var characterSet: String - - @ReadonlyAttribute - public var charset: String - - @ReadonlyAttribute - public var inputEncoding: String - - @ReadonlyAttribute - public var contentType: String - - @ReadonlyAttribute - public var doctype: DocumentType? - - @ReadonlyAttribute - public var documentElement: Element? - - @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { - let this = jsObject - return this[DOMStrings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { - let this = jsObject - return this[DOMStrings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { - let this = jsObject - return this[DOMStrings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! - } - - @inlinable public func createElement(localName: String, options: ElementCreationOptions_or_String? = nil) -> Element { - let this = jsObject - return this[DOMStrings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: ElementCreationOptions_or_String? = nil) -> Element { - let this = jsObject - return this[DOMStrings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createDocumentFragment() -> DocumentFragment { - let this = jsObject - return this[DOMStrings.createDocumentFragment].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func createTextNode(data: String) -> Text { - let this = jsObject - return this[DOMStrings.createTextNode].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createCDATASection(data: String) -> CDATASection { - let this = jsObject - return this[DOMStrings.createCDATASection].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createComment(data: String) -> Comment { - let this = jsObject - return this[DOMStrings.createComment].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createProcessingInstruction(target: String, data: String) -> ProcessingInstruction { - let this = jsObject - return this[DOMStrings.createProcessingInstruction].function!(this: this, arguments: [target.jsValue, data.jsValue]).fromJSValue()! - } - - @inlinable public func importNode(node: Node, deep: Bool? = nil) -> Node { - let this = jsObject - return this[DOMStrings.importNode].function!(this: this, arguments: [node.jsValue, deep?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func adoptNode(node: Node) -> Node { - let this = jsObject - return this[DOMStrings.adoptNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public func createAttribute(localName: String) -> Attr { - let this = jsObject - return this[DOMStrings.createAttribute].function!(this: this, arguments: [localName.jsValue]).fromJSValue()! - } - - @inlinable public func createAttributeNS(namespace: String?, qualifiedName: String) -> Attr { - let this = jsObject - return this[DOMStrings.createAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func createEvent(interface: String) -> Event { - let this = jsObject - return this[DOMStrings.createEvent].function!(this: this, arguments: [interface.jsValue]).fromJSValue()! - } - - @inlinable public func createRange() -> Range { - let this = jsObject - return this[DOMStrings.createRange].function!(this: this, arguments: []).fromJSValue()! - } - - // XXX: member 'createNodeIterator' is ignored - - // XXX: member 'createTreeWalker' is ignored -} - -public class DocumentFragment: Node, NonElementParentNode, ParentNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.DocumentFragment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public protocol DocumentOrShadowRoot: JSBridgedClass {} -public extension DocumentOrShadowRoot {} - -public class DocumentType: Node, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.DocumentType].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.name) - _publicId = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.publicId) - _systemId = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.systemId) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var publicId: String - - @ReadonlyAttribute - public var systemId: String -} - -public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Element].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.namespaceURI) - _prefix = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.prefix) - _localName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.localName) - _tagName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.tagName) - _id = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.id) - _className = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.className) - _classList = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.classList) - _slot = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.slot) - _attributes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.attributes) - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.shadowRoot) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var namespaceURI: String? - - @ReadonlyAttribute - public var prefix: String? - - @ReadonlyAttribute - public var localName: String - - @ReadonlyAttribute - public var tagName: String - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var className: String - - @ReadonlyAttribute - public var classList: DOMTokenList - - @ReadWriteAttribute - public var slot: String - - @inlinable public func hasAttributes() -> Bool { - let this = jsObject - return this[DOMStrings.hasAttributes].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var attributes: NamedNodeMap - - @inlinable public func getAttributeNames() -> [String] { - let this = jsObject - return this[DOMStrings.getAttributeNames].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getAttribute(qualifiedName: String) -> String? { - let this = jsObject - return this[DOMStrings.getAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNS(namespace: String?, localName: String) -> String? { - let this = jsObject - return this[DOMStrings.getAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setAttribute(qualifiedName: String, value: String) { - let this = jsObject - _ = this[DOMStrings.setAttribute].function!(this: this, arguments: [qualifiedName.jsValue, value.jsValue]) - } - - @inlinable public func setAttributeNS(namespace: String?, qualifiedName: String, value: String) { - let this = jsObject - _ = this[DOMStrings.setAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, value.jsValue]) - } - - @inlinable public func removeAttribute(qualifiedName: String) { - let this = jsObject - _ = this[DOMStrings.removeAttribute].function!(this: this, arguments: [qualifiedName.jsValue]) - } - - @inlinable public func removeAttributeNS(namespace: String?, localName: String) { - let this = jsObject - _ = this[DOMStrings.removeAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]) - } - - @inlinable public func toggleAttribute(qualifiedName: String, force: Bool? = nil) -> Bool { - let this = jsObject - return this[DOMStrings.toggleAttribute].function!(this: this, arguments: [qualifiedName.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func hasAttribute(qualifiedName: String) -> Bool { - let this = jsObject - return this[DOMStrings.hasAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func hasAttributeNS(namespace: String?, localName: String) -> Bool { - let this = jsObject - return this[DOMStrings.hasAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNode(qualifiedName: String) -> Attr? { - let this = jsObject - return this[DOMStrings.getAttributeNode].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNodeNS(namespace: String?, localName: String) -> Attr? { - let this = jsObject - return this[DOMStrings.getAttributeNodeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setAttributeNode(attr: Attr) -> Attr? { - let this = jsObject - return this[DOMStrings.setAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func setAttributeNodeNS(attr: Attr) -> Attr? { - let this = jsObject - return this[DOMStrings.setAttributeNodeNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func removeAttributeNode(attr: Attr) -> Attr { - let this = jsObject - return this[DOMStrings.removeAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func attachShadow(init: ShadowRootInit) -> ShadowRoot { - let this = jsObject - return this[DOMStrings.attachShadow].function!(this: this, arguments: [`init`.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func closest(selectors: String) -> Element? { - let this = jsObject - return this[DOMStrings.closest].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func matches(selectors: String) -> Bool { - let this = jsObject - return this[DOMStrings.matches].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func webkitMatchesSelector(selectors: String) -> Bool { - let this = jsObject - return this[DOMStrings.webkitMatchesSelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { - let this = jsObject - return this[DOMStrings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { - let this = jsObject - return this[DOMStrings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { - let this = jsObject - return this[DOMStrings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! - } - - @inlinable public func insertAdjacentElement(where: String, element: Element) -> Element? { - let this = jsObject - return this[DOMStrings.insertAdjacentElement].function!(this: this, arguments: [`where`.jsValue, element.jsValue]).fromJSValue()! - } - - @inlinable public func insertAdjacentText(where: String, data: String) { - let this = jsObject - _ = this[DOMStrings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) - } -} - -public class ElementCreationOptions: BridgedDictionary { - public convenience init(is: String) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.is] = `is`.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _is = ReadWriteAttribute(jsObject: object, name: DOMStrings.is) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var `is`: String -} - -public class Event: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.Event].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.type) - _target = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.target) - _srcElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.srcElement) - _currentTarget = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.currentTarget) - _eventPhase = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.eventPhase) - _cancelBubble = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.cancelBubble) - _bubbles = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.bubbles) - _cancelable = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.cancelable) - _returnValue = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.returnValue) - _defaultPrevented = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.defaultPrevented) - _composed = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.composed) - _isTrusted = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.isTrusted) - _timeStamp = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.timeStamp) - self.jsObject = jsObject - } - - @inlinable public convenience init(type: String, eventInitDict: EventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var target: EventTarget? - - @ReadonlyAttribute - public var srcElement: EventTarget? - - @ReadonlyAttribute - public var currentTarget: EventTarget? - - @inlinable public func composedPath() -> [EventTarget] { - let this = jsObject - return this[DOMStrings.composedPath].function!(this: this, arguments: []).fromJSValue()! - } - - public static let NONE: UInt16 = 0 - - public static let CAPTURING_PHASE: UInt16 = 1 - - public static let AT_TARGET: UInt16 = 2 - - public static let BUBBLING_PHASE: UInt16 = 3 - - @ReadonlyAttribute - public var eventPhase: UInt16 - - @inlinable public func stopPropagation() { - let this = jsObject - _ = this[DOMStrings.stopPropagation].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var cancelBubble: Bool - - @inlinable public func stopImmediatePropagation() { - let this = jsObject - _ = this[DOMStrings.stopImmediatePropagation].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var bubbles: Bool - - @ReadonlyAttribute - public var cancelable: Bool - - @ReadWriteAttribute - public var returnValue: Bool - - @inlinable public func preventDefault() { - let this = jsObject - _ = this[DOMStrings.preventDefault].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var defaultPrevented: Bool - - @ReadonlyAttribute - public var composed: Bool - - @ReadonlyAttribute - public var isTrusted: Bool - - @ReadonlyAttribute - public var timeStamp: DOMHighResTimeStamp - - @inlinable public func initEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil) { - let this = jsObject - _ = this[DOMStrings.initEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined]) - } -} - -public class EventInit: BridgedDictionary { - public convenience init(bubbles: Bool, cancelable: Bool, composed: Bool) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.bubbles] = bubbles.jsValue - object[DOMStrings.cancelable] = cancelable.jsValue - object[DOMStrings.composed] = composed.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _bubbles = ReadWriteAttribute(jsObject: object, name: DOMStrings.bubbles) - _cancelable = ReadWriteAttribute(jsObject: object, name: DOMStrings.cancelable) - _composed = ReadWriteAttribute(jsObject: object, name: DOMStrings.composed) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var bubbles: Bool - - @ReadWriteAttribute - public var cancelable: Bool - - @ReadWriteAttribute - public var composed: Bool -} - -public class EventListenerOptions: BridgedDictionary { - public convenience init(capture: Bool) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.capture] = capture.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _capture = ReadWriteAttribute(jsObject: object, name: DOMStrings.capture) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var capture: Bool -} - -public class EventTarget: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.EventTarget].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - // XXX: member 'addEventListener' is ignored - - // XXX: member 'removeEventListener' is ignored - - @inlinable public func dispatchEvent(event: Event) -> Bool { - let this = jsObject - return this[DOMStrings.dispatchEvent].function!(this: this, arguments: [event.jsValue]).fromJSValue()! - } -} - -public class GetRootNodeOptions: BridgedDictionary { - public convenience init(composed: Bool) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.composed] = composed.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _composed = ReadWriteAttribute(jsObject: object, name: DOMStrings.composed) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var composed: Bool -} - -public class HTMLCollection: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.HTMLCollection].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Element? { - jsObject[key].fromJSValue() - } -} - -public class MutationObserver: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.MutationObserver].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - // XXX: constructor is ignored - - @inlinable public func observe(target: Node, options: MutationObserverInit? = nil) { - let this = jsObject - _ = this[DOMStrings.observe].function!(this: this, arguments: [target.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func disconnect() { - let this = jsObject - _ = this[DOMStrings.disconnect].function!(this: this, arguments: []) - } - - @inlinable public func takeRecords() -> [MutationRecord] { - let this = jsObject - return this[DOMStrings.takeRecords].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class MutationObserverInit: BridgedDictionary { - public convenience init(childList: Bool, attributes: Bool, characterData: Bool, subtree: Bool, attributeOldValue: Bool, characterDataOldValue: Bool, attributeFilter: [String]) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.childList] = childList.jsValue - object[DOMStrings.attributes] = attributes.jsValue - object[DOMStrings.characterData] = characterData.jsValue - object[DOMStrings.subtree] = subtree.jsValue - object[DOMStrings.attributeOldValue] = attributeOldValue.jsValue - object[DOMStrings.characterDataOldValue] = characterDataOldValue.jsValue - object[DOMStrings.attributeFilter] = attributeFilter.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _childList = ReadWriteAttribute(jsObject: object, name: DOMStrings.childList) - _attributes = ReadWriteAttribute(jsObject: object, name: DOMStrings.attributes) - _characterData = ReadWriteAttribute(jsObject: object, name: DOMStrings.characterData) - _subtree = ReadWriteAttribute(jsObject: object, name: DOMStrings.subtree) - _attributeOldValue = ReadWriteAttribute(jsObject: object, name: DOMStrings.attributeOldValue) - _characterDataOldValue = ReadWriteAttribute(jsObject: object, name: DOMStrings.characterDataOldValue) - _attributeFilter = ReadWriteAttribute(jsObject: object, name: DOMStrings.attributeFilter) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var childList: Bool - - @ReadWriteAttribute - public var attributes: Bool - - @ReadWriteAttribute - public var characterData: Bool - - @ReadWriteAttribute - public var subtree: Bool - - @ReadWriteAttribute - public var attributeOldValue: Bool - - @ReadWriteAttribute - public var characterDataOldValue: Bool - - @ReadWriteAttribute - public var attributeFilter: [String] -} - -public class MutationRecord: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.MutationRecord].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.type) - _target = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.target) - _addedNodes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.addedNodes) - _removedNodes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.removedNodes) - _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.previousSibling) - _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nextSibling) - _attributeName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.attributeName) - _attributeNamespace = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.attributeNamespace) - _oldValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.oldValue) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var target: Node - - @ReadonlyAttribute - public var addedNodes: NodeList - - @ReadonlyAttribute - public var removedNodes: NodeList - - @ReadonlyAttribute - public var previousSibling: Node? - - @ReadonlyAttribute - public var nextSibling: Node? - - @ReadonlyAttribute - public var attributeName: String? - - @ReadonlyAttribute - public var attributeNamespace: String? - - @ReadonlyAttribute - public var oldValue: String? -} - -public class NamedNodeMap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.NamedNodeMap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Attr? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Attr? { - jsObject[key].fromJSValue() - } - - @inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? { - let this = jsObject - return this[DOMStrings.getNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setNamedItem(attr: Attr) -> Attr? { - let this = jsObject - return this[DOMStrings.setNamedItem].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func setNamedItemNS(attr: Attr) -> Attr? { - let this = jsObject - return this[DOMStrings.setNamedItemNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func removeNamedItem(qualifiedName: String) -> Attr { - let this = jsObject - return this[DOMStrings.removeNamedItem].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func removeNamedItemNS(namespace: String?, localName: String) -> Attr { - let this = jsObject - return this[DOMStrings.removeNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } -} - -public class Node: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Node].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _nodeType = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nodeType) - _nodeName = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nodeName) - _baseURI = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.baseURI) - _isConnected = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.isConnected) - _ownerDocument = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.ownerDocument) - _parentNode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.parentNode) - _parentElement = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.parentElement) - _childNodes = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.childNodes) - _firstChild = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.firstChild) - _lastChild = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.lastChild) - _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.previousSibling) - _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.nextSibling) - _nodeValue = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.nodeValue) - _textContent = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.textContent) - super.init(unsafelyWrapping: jsObject) - } - - public static let ELEMENT_NODE: UInt16 = 1 - - public static let ATTRIBUTE_NODE: UInt16 = 2 - - public static let TEXT_NODE: UInt16 = 3 - - public static let CDATA_SECTION_NODE: UInt16 = 4 - - public static let ENTITY_REFERENCE_NODE: UInt16 = 5 - - public static let ENTITY_NODE: UInt16 = 6 - - public static let PROCESSING_INSTRUCTION_NODE: UInt16 = 7 - - public static let COMMENT_NODE: UInt16 = 8 - - public static let DOCUMENT_NODE: UInt16 = 9 - - public static let DOCUMENT_TYPE_NODE: UInt16 = 10 - - public static let DOCUMENT_FRAGMENT_NODE: UInt16 = 11 - - public static let NOTATION_NODE: UInt16 = 12 - - @ReadonlyAttribute - public var nodeType: UInt16 - - @ReadonlyAttribute - public var nodeName: String - - @ReadonlyAttribute - public var baseURI: String - - @ReadonlyAttribute - public var isConnected: Bool - - @ReadonlyAttribute - public var ownerDocument: Document? - - @inlinable public func getRootNode(options: GetRootNodeOptions? = nil) -> Self { - let this = jsObject - return this[DOMStrings.getRootNode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var parentNode: Node? - - @ReadonlyAttribute - public var parentElement: Element? - - @inlinable public func hasChildNodes() -> Bool { - let this = jsObject - return this[DOMStrings.hasChildNodes].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var childNodes: NodeList - - @ReadonlyAttribute - public var firstChild: Node? - - @ReadonlyAttribute - public var lastChild: Node? - - @ReadonlyAttribute - public var previousSibling: Node? - - @ReadonlyAttribute - public var nextSibling: Node? - - @ReadWriteAttribute - public var nodeValue: String? - - @ReadWriteAttribute - public var textContent: String? - - @inlinable public func normalize() { - let this = jsObject - _ = this[DOMStrings.normalize].function!(this: this, arguments: []) - } - - @inlinable public func cloneNode(deep: Bool? = nil) -> Self { - let this = jsObject - return this[DOMStrings.cloneNode].function!(this: this, arguments: [deep?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func isEqualNode(otherNode: Node?) -> Bool { - let this = jsObject - return this[DOMStrings.isEqualNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! - } - - @inlinable public func isSameNode(otherNode: Node?) -> Bool { - let this = jsObject - return this[DOMStrings.isSameNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! - } - - public static let DOCUMENT_POSITION_DISCONNECTED: UInt16 = 0x01 - - public static let DOCUMENT_POSITION_PRECEDING: UInt16 = 0x02 - - public static let DOCUMENT_POSITION_FOLLOWING: UInt16 = 0x04 - - public static let DOCUMENT_POSITION_CONTAINS: UInt16 = 0x08 - - public static let DOCUMENT_POSITION_CONTAINED_BY: UInt16 = 0x10 - - public static let DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: UInt16 = 0x20 - - @inlinable public func compareDocumentPosition(other: Node) -> UInt16 { - let this = jsObject - return this[DOMStrings.compareDocumentPosition].function!(this: this, arguments: [other.jsValue]).fromJSValue()! - } - - @inlinable public func contains(other: Node?) -> Bool { - let this = jsObject - return this[DOMStrings.contains].function!(this: this, arguments: [other.jsValue]).fromJSValue()! - } - - @inlinable public func lookupPrefix(namespace: String?) -> String? { - let this = jsObject - return this[DOMStrings.lookupPrefix].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! - } - - @inlinable public func lookupNamespaceURI(prefix: String?) -> String? { - let this = jsObject - return this[DOMStrings.lookupNamespaceURI].function!(this: this, arguments: [prefix.jsValue]).fromJSValue()! - } - - @inlinable public func isDefaultNamespace(namespace: String?) -> Bool { - let this = jsObject - return this[DOMStrings.isDefaultNamespace].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! - } - - @inlinable public func insertBefore(node: Node, child: Node?) -> Self { - let this = jsObject - return this[DOMStrings.insertBefore].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! - } - - @inlinable public func appendChild(node: Node) -> Self { - let this = jsObject - return this[DOMStrings.appendChild].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public func replaceChild(node: Node, child: Node) -> Self { - let this = jsObject - return this[DOMStrings.replaceChild].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! - } - - @inlinable public func removeChild(child: Node) -> Self { - let this = jsObject - return this[DOMStrings.removeChild].function!(this: this, arguments: [child.jsValue]).fromJSValue()! - } -} - -public class NodeIterator: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.NodeIterator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.root) - _referenceNode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.referenceNode) - _pointerBeforeReferenceNode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.pointerBeforeReferenceNode) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.whatToShow) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var root: Node - - @ReadonlyAttribute - public var referenceNode: Node - - @ReadonlyAttribute - public var pointerBeforeReferenceNode: Bool - - @ReadonlyAttribute - public var whatToShow: UInt32 - - // XXX: member 'filter' is ignored - - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[DOMStrings.nextNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[DOMStrings.previousNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func detach() { - let this = jsObject - _ = this[DOMStrings.detach].function!(this: this, arguments: []) - } -} - -public class NodeList: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.NodeList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.length) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> Node? { - jsObject[key].fromJSValue() - } - - @ReadonlyAttribute - public var length: UInt32 - - public typealias Element = Node - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public protocol NonDocumentTypeChildNode: JSBridgedClass {} -public extension NonDocumentTypeChildNode { - @inlinable var previousElementSibling: Element? { ReadonlyAttribute[DOMStrings.previousElementSibling, in: jsObject] } - - @inlinable var nextElementSibling: Element? { ReadonlyAttribute[DOMStrings.nextElementSibling, in: jsObject] } -} - -public protocol NonElementParentNode: JSBridgedClass {} -public extension NonElementParentNode { - @inlinable func getElementById(elementId: String) -> Element? { - let this = jsObject - return this[DOMStrings.getElementById].function!(this: this, arguments: [elementId.jsValue]).fromJSValue()! - } -} - -public protocol ParentNode: JSBridgedClass {} -public extension ParentNode { - @inlinable var children: HTMLCollection { ReadonlyAttribute[DOMStrings.children, in: jsObject] } - - @inlinable var firstElementChild: Element? { ReadonlyAttribute[DOMStrings.firstElementChild, in: jsObject] } - - @inlinable var lastElementChild: Element? { ReadonlyAttribute[DOMStrings.lastElementChild, in: jsObject] } - - @inlinable var childElementCount: UInt32 { ReadonlyAttribute[DOMStrings.childElementCount, in: jsObject] } - - @inlinable func prepend(nodes: Node_or_String...) { - let this = jsObject - _ = this[DOMStrings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func append(nodes: Node_or_String...) { - let this = jsObject - _ = this[DOMStrings.append].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func replaceChildren(nodes: Node_or_String...) { - let this = jsObject - _ = this[DOMStrings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func querySelector(selectors: String) -> Element? { - let this = jsObject - return this[DOMStrings.querySelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable func querySelectorAll(selectors: String) -> NodeList { - let this = jsObject - return this[DOMStrings.querySelectorAll].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } -} - -public class ProcessingInstruction: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.ProcessingInstruction].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.target) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var target: String -} - -public class Range: AbstractRange { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Range].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _commonAncestorContainer = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.commonAncestorContainer) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var commonAncestorContainer: Node - - @inlinable public func setStart(node: Node, offset: UInt32) { - let this = jsObject - _ = this[DOMStrings.setStart].function!(this: this, arguments: [node.jsValue, offset.jsValue]) - } - - @inlinable public func setEnd(node: Node, offset: UInt32) { - let this = jsObject - _ = this[DOMStrings.setEnd].function!(this: this, arguments: [node.jsValue, offset.jsValue]) - } - - @inlinable public func setStartBefore(node: Node) { - let this = jsObject - _ = this[DOMStrings.setStartBefore].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setStartAfter(node: Node) { - let this = jsObject - _ = this[DOMStrings.setStartAfter].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setEndBefore(node: Node) { - let this = jsObject - _ = this[DOMStrings.setEndBefore].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setEndAfter(node: Node) { - let this = jsObject - _ = this[DOMStrings.setEndAfter].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func collapse(toStart: Bool? = nil) { - let this = jsObject - _ = this[DOMStrings.collapse].function!(this: this, arguments: [toStart?.jsValue ?? .undefined]) - } - - @inlinable public func selectNode(node: Node) { - let this = jsObject - _ = this[DOMStrings.selectNode].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func selectNodeContents(node: Node) { - let this = jsObject - _ = this[DOMStrings.selectNodeContents].function!(this: this, arguments: [node.jsValue]) - } - - public static let START_TO_START: UInt16 = 0 - - public static let START_TO_END: UInt16 = 1 - - public static let END_TO_END: UInt16 = 2 - - public static let END_TO_START: UInt16 = 3 - - @inlinable public func compareBoundaryPoints(how: UInt16, sourceRange: Range) -> Int16 { - let this = jsObject - return this[DOMStrings.compareBoundaryPoints].function!(this: this, arguments: [how.jsValue, sourceRange.jsValue]).fromJSValue()! - } - - @inlinable public func deleteContents() { - let this = jsObject - _ = this[DOMStrings.deleteContents].function!(this: this, arguments: []) - } - - @inlinable public func extractContents() -> DocumentFragment { - let this = jsObject - return this[DOMStrings.extractContents].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func cloneContents() -> DocumentFragment { - let this = jsObject - return this[DOMStrings.cloneContents].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func insertNode(node: Node) { - let this = jsObject - _ = this[DOMStrings.insertNode].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func surroundContents(newParent: Node) { - let this = jsObject - _ = this[DOMStrings.surroundContents].function!(this: this, arguments: [newParent.jsValue]) - } - - @inlinable public func cloneRange() -> Self { - let this = jsObject - return this[DOMStrings.cloneRange].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func detach() { - let this = jsObject - _ = this[DOMStrings.detach].function!(this: this, arguments: []) - } - - @inlinable public func isPointInRange(node: Node, offset: UInt32) -> Bool { - let this = jsObject - return this[DOMStrings.isPointInRange].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! - } - - @inlinable public func comparePoint(node: Node, offset: UInt32) -> Int16 { - let this = jsObject - return this[DOMStrings.comparePoint].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! - } - - @inlinable public func intersectsNode(node: Node) -> Bool { - let this = jsObject - return this[DOMStrings.intersectsNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } -} - -public class ShadowRoot: DocumentFragment, DocumentOrShadowRoot { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.ShadowRoot].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _mode = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.mode) - _delegatesFocus = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.delegatesFocus) - _slotAssignment = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.slotAssignment) - _host = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.host) - _onslotchange = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.onslotchange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var mode: ShadowRootMode - - @ReadonlyAttribute - public var delegatesFocus: Bool - - @ReadonlyAttribute - public var slotAssignment: SlotAssignmentMode - - @ReadonlyAttribute - public var host: Element - - @ReadWriteAttribute - public var onslotchange: EventHandler -} - -public class ShadowRootInit: BridgedDictionary { - public convenience init(mode: ShadowRootMode, delegatesFocus: Bool, slotAssignment: SlotAssignmentMode) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.mode] = mode.jsValue - object[DOMStrings.delegatesFocus] = delegatesFocus.jsValue - object[DOMStrings.slotAssignment] = slotAssignment.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mode = ReadWriteAttribute(jsObject: object, name: DOMStrings.mode) - _delegatesFocus = ReadWriteAttribute(jsObject: object, name: DOMStrings.delegatesFocus) - _slotAssignment = ReadWriteAttribute(jsObject: object, name: DOMStrings.slotAssignment) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mode: ShadowRootMode - - @ReadWriteAttribute - public var delegatesFocus: Bool - - @ReadWriteAttribute - public var slotAssignment: SlotAssignmentMode -} - -public enum ShadowRootMode: JSString, JSValueCompatible { - case open = "open" - case closed = "closed" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum SlotAssignmentMode: JSString, JSValueCompatible { - case manual = "manual" - case named = "named" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol Slottable: JSBridgedClass {} -public extension Slottable { - @inlinable var assignedSlot: HTMLSlotElement? { ReadonlyAttribute[DOMStrings.assignedSlot, in: jsObject] } -} - -public class StaticRange: AbstractRange { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.StaticRange].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(init: StaticRangeInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } -} - -public class StaticRangeInit: BridgedDictionary { - public convenience init(startContainer: Node, startOffset: UInt32, endContainer: Node, endOffset: UInt32) { - let object = JSObject.global[DOMStrings.Object].function!.new() - object[DOMStrings.startContainer] = startContainer.jsValue - object[DOMStrings.startOffset] = startOffset.jsValue - object[DOMStrings.endContainer] = endContainer.jsValue - object[DOMStrings.endOffset] = endOffset.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _startContainer = ReadWriteAttribute(jsObject: object, name: DOMStrings.startContainer) - _startOffset = ReadWriteAttribute(jsObject: object, name: DOMStrings.startOffset) - _endContainer = ReadWriteAttribute(jsObject: object, name: DOMStrings.endContainer) - _endOffset = ReadWriteAttribute(jsObject: object, name: DOMStrings.endOffset) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var startContainer: Node - - @ReadWriteAttribute - public var startOffset: UInt32 - - @ReadWriteAttribute - public var endContainer: Node - - @ReadWriteAttribute - public var endOffset: UInt32 -} - -public class Text: CharacterData, Slottable { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.Text].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _wholeText = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.wholeText) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) - } - - @inlinable public func splitText(offset: UInt32) -> Self { - let this = jsObject - return this[DOMStrings.splitText].function!(this: this, arguments: [offset.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var wholeText: String -} - -public class TreeWalker: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.TreeWalker].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.root) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.whatToShow) - _currentNode = ReadWriteAttribute(jsObject: jsObject, name: DOMStrings.currentNode) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var root: Node - - @ReadonlyAttribute - public var whatToShow: UInt32 - - // XXX: member 'filter' is ignored - - @ReadWriteAttribute - public var currentNode: Node - - @inlinable public func parentNode() -> Node? { - let this = jsObject - return this[DOMStrings.parentNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func firstChild() -> Node? { - let this = jsObject - return this[DOMStrings.firstChild].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func lastChild() -> Node? { - let this = jsObject - return this[DOMStrings.lastChild].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousSibling() -> Node? { - let this = jsObject - return this[DOMStrings.previousSibling].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func nextSibling() -> Node? { - let this = jsObject - return this[DOMStrings.nextSibling].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[DOMStrings.previousNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[DOMStrings.nextNode].function!(this: this, arguments: []).fromJSValue()! - } -} - -public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void -public class XMLDocument: Document { - @inlinable override public class var constructor: JSFunction { JSObject.global[DOMStrings.XMLDocument].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class XPathEvaluator: JSBridgedClass, XPathEvaluatorBase { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XPathEvaluator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public protocol XPathEvaluatorBase: JSBridgedClass {} -public extension XPathEvaluatorBase { - // XXX: method 'createExpression' is ignored - - // XXX: method 'createNSResolver' is ignored - - // XXX: method 'evaluate' is ignored -} - -public class XPathExpression: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XPathExpression].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func evaluate(contextNode: Node, type: UInt16? = nil, result: XPathResult? = nil) -> XPathResult { - let this = jsObject - return this[DOMStrings.evaluate].function!(this: this, arguments: [contextNode.jsValue, type?.jsValue ?? .undefined, result?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class XPathResult: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XPathResult].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _resultType = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.resultType) - _numberValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.numberValue) - _stringValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.stringValue) - _booleanValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.booleanValue) - _singleNodeValue = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.singleNodeValue) - _invalidIteratorState = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.invalidIteratorState) - _snapshotLength = ReadonlyAttribute(jsObject: jsObject, name: DOMStrings.snapshotLength) - self.jsObject = jsObject - } - - public static let ANY_TYPE: UInt16 = 0 - - public static let NUMBER_TYPE: UInt16 = 1 - - public static let STRING_TYPE: UInt16 = 2 - - public static let BOOLEAN_TYPE: UInt16 = 3 - - public static let UNORDERED_NODE_ITERATOR_TYPE: UInt16 = 4 - - public static let ORDERED_NODE_ITERATOR_TYPE: UInt16 = 5 - - public static let UNORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 6 - - public static let ORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 7 - - public static let ANY_UNORDERED_NODE_TYPE: UInt16 = 8 - - public static let FIRST_ORDERED_NODE_TYPE: UInt16 = 9 - - @ReadonlyAttribute - public var resultType: UInt16 - - @ReadonlyAttribute - public var numberValue: Double - - @ReadonlyAttribute - public var stringValue: String - - @ReadonlyAttribute - public var booleanValue: Bool - - @ReadonlyAttribute - public var singleNodeValue: Node? - - @ReadonlyAttribute - public var invalidIteratorState: Bool - - @ReadonlyAttribute - public var snapshotLength: UInt32 - - @inlinable public func iterateNext() -> Node? { - let this = jsObject - return this[DOMStrings.iterateNext].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func snapshotItem(index: UInt32) -> Node? { - let this = jsObject - return this[DOMStrings.snapshotItem].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } -} - -public class XSLTProcessor: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[DOMStrings.XSLTProcessor].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func importStylesheet(style: Node) { - let this = jsObject - _ = this[DOMStrings.importStylesheet].function!(this: this, arguments: [style.jsValue]) - } - - @inlinable public func transformToFragment(source: Node, output: Document) -> DocumentFragment { - let this = jsObject - return this[DOMStrings.transformToFragment].function!(this: this, arguments: [source.jsValue, output.jsValue]).fromJSValue()! - } - - @inlinable public func transformToDocument(source: Node) -> Document { - let this = jsObject - return this[DOMStrings.transformToDocument].function!(this: this, arguments: [source.jsValue]).fromJSValue()! - } - - @inlinable public func setParameter(namespaceURI: String, localName: String, value: JSValue) { - let this = jsObject - _ = this[DOMStrings.setParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue, value.jsValue]) - } - - @inlinable public func getParameter(namespaceURI: String, localName: String) -> JSValue { - let this = jsObject - return this[DOMStrings.getParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func removeParameter(namespaceURI: String, localName: String) { - let this = jsObject - _ = this[DOMStrings.removeParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]) - } - - @inlinable public func clearParameters() { - let this = jsObject - _ = this[DOMStrings.clearParameters].function!(this: this, arguments: []) - } - - @inlinable public func reset() { - let this = jsObject - _ = this[DOMStrings.reset].function!(this: this, arguments: []) - } -} - -/* variadic generics please */ -@propertyWrapper public final class ClosureAttribute2OptionalVoid - where A0: JSValueCompatible, A1: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0, A1) -> Void)? { - get { ClosureAttribute2OptionalVoid[name, in: jsObject] } - set { ClosureAttribute2OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue) } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute2Void - where A0: JSValueCompatible, A1: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0, A1) -> Void { - get { ClosureAttribute2Void[name, in: jsObject] } - set { ClosureAttribute2Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> Void { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue) } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) - return .undefined - }.jsValue - } - } -} - -@usableFromInline enum DOMStrings { - static let _self: JSString = "self" - @usableFromInline static let AbortController: JSString = "AbortController" - @usableFromInline static let AbortSignal: JSString = "AbortSignal" - @usableFromInline static let AbstractRange: JSString = "AbstractRange" - @usableFromInline static let Attr: JSString = "Attr" - @usableFromInline static let CDATASection: JSString = "CDATASection" - @usableFromInline static let CharacterData: JSString = "CharacterData" - @usableFromInline static let Comment: JSString = "Comment" - @usableFromInline static let CustomEvent: JSString = "CustomEvent" - @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" - @usableFromInline static let DOMTokenList: JSString = "DOMTokenList" - @usableFromInline static let Document: JSString = "Document" - @usableFromInline static let DocumentFragment: JSString = "DocumentFragment" - @usableFromInline static let DocumentType: JSString = "DocumentType" - @usableFromInline static let Element: JSString = "Element" - @usableFromInline static let Event: JSString = "Event" - @usableFromInline static let EventTarget: JSString = "EventTarget" - @usableFromInline static let HTMLCollection: JSString = "HTMLCollection" - @usableFromInline static let MutationObserver: JSString = "MutationObserver" - @usableFromInline static let MutationRecord: JSString = "MutationRecord" - @usableFromInline static let NamedNodeMap: JSString = "NamedNodeMap" - @usableFromInline static let Node: JSString = "Node" - @usableFromInline static let NodeIterator: JSString = "NodeIterator" - @usableFromInline static let NodeList: JSString = "NodeList" - @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let ProcessingInstruction: JSString = "ProcessingInstruction" - @usableFromInline static let Range: JSString = "Range" - @usableFromInline static let ShadowRoot: JSString = "ShadowRoot" - @usableFromInline static let StaticRange: JSString = "StaticRange" - @usableFromInline static let Text: JSString = "Text" - @usableFromInline static let TreeWalker: JSString = "TreeWalker" - @usableFromInline static let URL: JSString = "URL" - @usableFromInline static let XMLDocument: JSString = "XMLDocument" - @usableFromInline static let XPathEvaluator: JSString = "XPathEvaluator" - @usableFromInline static let XPathExpression: JSString = "XPathExpression" - @usableFromInline static let XPathResult: JSString = "XPathResult" - @usableFromInline static let XSLTProcessor: JSString = "XSLTProcessor" - @usableFromInline static let abort: JSString = "abort" - @usableFromInline static let aborted: JSString = "aborted" - @usableFromInline static let add: JSString = "add" - @usableFromInline static let addedNodes: JSString = "addedNodes" - @usableFromInline static let adoptNode: JSString = "adoptNode" - @usableFromInline static let after: JSString = "after" - @usableFromInline static let append: JSString = "append" - @usableFromInline static let appendChild: JSString = "appendChild" - @usableFromInline static let appendData: JSString = "appendData" - @usableFromInline static let assignedSlot: JSString = "assignedSlot" - @usableFromInline static let attachShadow: JSString = "attachShadow" - @usableFromInline static let attributeFilter: JSString = "attributeFilter" - @usableFromInline static let attributeName: JSString = "attributeName" - @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" - @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" - @usableFromInline static let attributes: JSString = "attributes" - @usableFromInline static let baseURI: JSString = "baseURI" - @usableFromInline static let before: JSString = "before" - @usableFromInline static let booleanValue: JSString = "booleanValue" - @usableFromInline static let bubbles: JSString = "bubbles" - @usableFromInline static let cancelBubble: JSString = "cancelBubble" - @usableFromInline static let cancelable: JSString = "cancelable" - @usableFromInline static let capture: JSString = "capture" - @usableFromInline static let characterData: JSString = "characterData" - @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" - @usableFromInline static let characterSet: JSString = "characterSet" - @usableFromInline static let charset: JSString = "charset" - @usableFromInline static let childElementCount: JSString = "childElementCount" - @usableFromInline static let childList: JSString = "childList" - @usableFromInline static let childNodes: JSString = "childNodes" - @usableFromInline static let children: JSString = "children" - @usableFromInline static let classList: JSString = "classList" - @usableFromInline static let className: JSString = "className" - @usableFromInline static let clearParameters: JSString = "clearParameters" - @usableFromInline static let cloneContents: JSString = "cloneContents" - @usableFromInline static let cloneNode: JSString = "cloneNode" - @usableFromInline static let cloneRange: JSString = "cloneRange" - @usableFromInline static let closest: JSString = "closest" - @usableFromInline static let collapse: JSString = "collapse" - @usableFromInline static let collapsed: JSString = "collapsed" - @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" - @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" - @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" - @usableFromInline static let comparePoint: JSString = "comparePoint" - @usableFromInline static let compatMode: JSString = "compatMode" - @usableFromInline static let composed: JSString = "composed" - @usableFromInline static let composedPath: JSString = "composedPath" - @usableFromInline static let contains: JSString = "contains" - @usableFromInline static let contentType: JSString = "contentType" - @usableFromInline static let createAttribute: JSString = "createAttribute" - @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" - @usableFromInline static let createCDATASection: JSString = "createCDATASection" - @usableFromInline static let createComment: JSString = "createComment" - @usableFromInline static let createDocument: JSString = "createDocument" - @usableFromInline static let createDocumentFragment: JSString = "createDocumentFragment" - @usableFromInline static let createDocumentType: JSString = "createDocumentType" - @usableFromInline static let createElement: JSString = "createElement" - @usableFromInline static let createElementNS: JSString = "createElementNS" - @usableFromInline static let createEvent: JSString = "createEvent" - @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" - @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" - @usableFromInline static let createRange: JSString = "createRange" - @usableFromInline static let createTextNode: JSString = "createTextNode" - @usableFromInline static let currentNode: JSString = "currentNode" - @usableFromInline static let currentTarget: JSString = "currentTarget" - @usableFromInline static let data: JSString = "data" - @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" - @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" - @usableFromInline static let deleteContents: JSString = "deleteContents" - @usableFromInline static let deleteData: JSString = "deleteData" - @usableFromInline static let detach: JSString = "detach" - @usableFromInline static let detail: JSString = "detail" - @usableFromInline static let disconnect: JSString = "disconnect" - @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" - @usableFromInline static let doctype: JSString = "doctype" - @usableFromInline static let documentElement: JSString = "documentElement" - @usableFromInline static let documentURI: JSString = "documentURI" - @usableFromInline static let endContainer: JSString = "endContainer" - @usableFromInline static let endOffset: JSString = "endOffset" - @usableFromInline static let evaluate: JSString = "evaluate" - @usableFromInline static let eventPhase: JSString = "eventPhase" - @usableFromInline static let extractContents: JSString = "extractContents" - @usableFromInline static let firstChild: JSString = "firstChild" - @usableFromInline static let firstElementChild: JSString = "firstElementChild" - @usableFromInline static let getAttribute: JSString = "getAttribute" - @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" - @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" - @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" - @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" - @usableFromInline static let getElementById: JSString = "getElementById" - @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" - @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" - @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" - @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" - @usableFromInline static let getParameter: JSString = "getParameter" - @usableFromInline static let getRootNode: JSString = "getRootNode" - @usableFromInline static let hasAttribute: JSString = "hasAttribute" - @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" - @usableFromInline static let hasAttributes: JSString = "hasAttributes" - @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" - @usableFromInline static let hasFeature: JSString = "hasFeature" - @usableFromInline static let host: JSString = "host" - @usableFromInline static let id: JSString = "id" - @usableFromInline static let implementation: JSString = "implementation" - @usableFromInline static let importNode: JSString = "importNode" - @usableFromInline static let importStylesheet: JSString = "importStylesheet" - @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" - @usableFromInline static let initEvent: JSString = "initEvent" - @usableFromInline static let inputEncoding: JSString = "inputEncoding" - @usableFromInline static let insertAdjacentElement: JSString = "insertAdjacentElement" - @usableFromInline static let insertAdjacentText: JSString = "insertAdjacentText" - @usableFromInline static let insertBefore: JSString = "insertBefore" - @usableFromInline static let insertData: JSString = "insertData" - @usableFromInline static let insertNode: JSString = "insertNode" - @usableFromInline static let intersectsNode: JSString = "intersectsNode" - @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" - @usableFromInline static let `is`: JSString = "is" - @usableFromInline static let isConnected: JSString = "isConnected" - @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" - @usableFromInline static let isEqualNode: JSString = "isEqualNode" - @usableFromInline static let isPointInRange: JSString = "isPointInRange" - @usableFromInline static let isSameNode: JSString = "isSameNode" - @usableFromInline static let isTrusted: JSString = "isTrusted" - @usableFromInline static let iterateNext: JSString = "iterateNext" - @usableFromInline static let lastChild: JSString = "lastChild" - @usableFromInline static let lastElementChild: JSString = "lastElementChild" - @usableFromInline static let length: JSString = "length" - @usableFromInline static let localName: JSString = "localName" - @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" - @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" - @usableFromInline static let matches: JSString = "matches" - @usableFromInline static let mode: JSString = "mode" - @usableFromInline static let name: JSString = "name" - @usableFromInline static let namespaceURI: JSString = "namespaceURI" - @usableFromInline static let nextElementSibling: JSString = "nextElementSibling" - @usableFromInline static let nextNode: JSString = "nextNode" - @usableFromInline static let nextSibling: JSString = "nextSibling" - @usableFromInline static let nodeName: JSString = "nodeName" - @usableFromInline static let nodeType: JSString = "nodeType" - @usableFromInline static let nodeValue: JSString = "nodeValue" - @usableFromInline static let normalize: JSString = "normalize" - @usableFromInline static let numberValue: JSString = "numberValue" - @usableFromInline static let observe: JSString = "observe" - @usableFromInline static let oldValue: JSString = "oldValue" - @usableFromInline static let onabort: JSString = "onabort" - @usableFromInline static let once: JSString = "once" - @usableFromInline static let onslotchange: JSString = "onslotchange" - @usableFromInline static let ownerDocument: JSString = "ownerDocument" - @usableFromInline static let ownerElement: JSString = "ownerElement" - @usableFromInline static let parentElement: JSString = "parentElement" - @usableFromInline static let parentNode: JSString = "parentNode" - @usableFromInline static let passive: JSString = "passive" - @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" - @usableFromInline static let prefix: JSString = "prefix" - @usableFromInline static let prepend: JSString = "prepend" - @usableFromInline static let preventDefault: JSString = "preventDefault" - @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" - @usableFromInline static let previousNode: JSString = "previousNode" - @usableFromInline static let previousSibling: JSString = "previousSibling" - @usableFromInline static let publicId: JSString = "publicId" - @usableFromInline static let querySelector: JSString = "querySelector" - @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" - @usableFromInline static let reason: JSString = "reason" - @usableFromInline static let referenceNode: JSString = "referenceNode" - @usableFromInline static let remove: JSString = "remove" - @usableFromInline static let removeAttribute: JSString = "removeAttribute" - @usableFromInline static let removeAttributeNS: JSString = "removeAttributeNS" - @usableFromInline static let removeAttributeNode: JSString = "removeAttributeNode" - @usableFromInline static let removeChild: JSString = "removeChild" - @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" - @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" - @usableFromInline static let removeParameter: JSString = "removeParameter" - @usableFromInline static let removedNodes: JSString = "removedNodes" - @usableFromInline static let replace: JSString = "replace" - @usableFromInline static let replaceChild: JSString = "replaceChild" - @usableFromInline static let replaceChildren: JSString = "replaceChildren" - @usableFromInline static let replaceData: JSString = "replaceData" - @usableFromInline static let replaceWith: JSString = "replaceWith" - @usableFromInline static let reset: JSString = "reset" - @usableFromInline static let resultType: JSString = "resultType" - @usableFromInline static let returnValue: JSString = "returnValue" - @usableFromInline static let root: JSString = "root" - @usableFromInline static let selectNode: JSString = "selectNode" - @usableFromInline static let selectNodeContents: JSString = "selectNodeContents" - @usableFromInline static let setAttribute: JSString = "setAttribute" - @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" - @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" - @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" - @usableFromInline static let setEnd: JSString = "setEnd" - @usableFromInline static let setEndAfter: JSString = "setEndAfter" - @usableFromInline static let setEndBefore: JSString = "setEndBefore" - @usableFromInline static let setNamedItem: JSString = "setNamedItem" - @usableFromInline static let setNamedItemNS: JSString = "setNamedItemNS" - @usableFromInline static let setParameter: JSString = "setParameter" - @usableFromInline static let setStart: JSString = "setStart" - @usableFromInline static let setStartAfter: JSString = "setStartAfter" - @usableFromInline static let setStartBefore: JSString = "setStartBefore" - @usableFromInline static let shadowRoot: JSString = "shadowRoot" - @usableFromInline static let signal: JSString = "signal" - @usableFromInline static let singleNodeValue: JSString = "singleNodeValue" - @usableFromInline static let slot: JSString = "slot" - @usableFromInline static let slotAssignment: JSString = "slotAssignment" - @usableFromInline static let snapshotItem: JSString = "snapshotItem" - @usableFromInline static let snapshotLength: JSString = "snapshotLength" - @usableFromInline static let specified: JSString = "specified" - @usableFromInline static let splitText: JSString = "splitText" - @usableFromInline static let srcElement: JSString = "srcElement" - @usableFromInline static let startContainer: JSString = "startContainer" - @usableFromInline static let startOffset: JSString = "startOffset" - @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" - @usableFromInline static let stopPropagation: JSString = "stopPropagation" - @usableFromInline static let stringValue: JSString = "stringValue" - @usableFromInline static let substringData: JSString = "substringData" - @usableFromInline static let subtree: JSString = "subtree" - @usableFromInline static let supports: JSString = "supports" - @usableFromInline static let surroundContents: JSString = "surroundContents" - @usableFromInline static let systemId: JSString = "systemId" - @usableFromInline static let tagName: JSString = "tagName" - @usableFromInline static let takeRecords: JSString = "takeRecords" - @usableFromInline static let target: JSString = "target" - @usableFromInline static let textContent: JSString = "textContent" - @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" - @usableFromInline static let timeStamp: JSString = "timeStamp" - @usableFromInline static let timeout: JSString = "timeout" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let toggle: JSString = "toggle" - @usableFromInline static let toggleAttribute: JSString = "toggleAttribute" - @usableFromInline static let transformToDocument: JSString = "transformToDocument" - @usableFromInline static let transformToFragment: JSString = "transformToFragment" - @usableFromInline static let type: JSString = "type" - @usableFromInline static let value: JSString = "value" - @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" - @usableFromInline static let whatToShow: JSString = "whatToShow" - @usableFromInline static let wholeText: JSString = "wholeText" -} - -public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} -extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} -extension String: Any_ElementCreationOptions_or_String {} - -public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { - case elementCreationOptions(ElementCreationOptions) - case string(String) - - var elementCreationOptions: ElementCreationOptions? { - switch self { - case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { - return .elementCreationOptions(elementCreationOptions) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .elementCreationOptions(elementCreationOptions): - return elementCreationOptions.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_Node_or_String: ConvertibleToJSValue {} -extension Node: Any_Node_or_String {} -extension String: Any_Node_or_String {} - -public enum Node_or_String: JSValueCompatible, Any_Node_or_String { - case node(Node) - case string(String) - - var node: Node? { - switch self { - case let .node(node): return node - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let node: Node = value.fromJSValue() { - return .node(node) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .node(node): - return node.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKitHTML/DOMKitHTML.swift b/Sources/DOMKitHTML/DOMKitHTML.swift deleted file mode 100644 index 44b4b2ef..00000000 --- a/Sources/DOMKitHTML/DOMKitHTML.swift +++ /dev/null @@ -1,9382 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol AbstractWorker: JSBridgedClass {} -public extension AbstractWorker { - @inlinable var onerror: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onerror, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onerror, in: jsObject] = newValue } - } -} - -public protocol AnimationFrameProvider: JSBridgedClass {} -public extension AnimationFrameProvider { - // XXX: method 'requestAnimationFrame' is ignored - - @inlinable func cancelAnimationFrame(handle: UInt32) { - let this = jsObject - _ = this[HTMLStrings.cancelAnimationFrame].function!(this: this, arguments: [handle.jsValue]) - } -} - -public class AssignedNodesOptions: BridgedDictionary { - public convenience init(flatten: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.flatten] = flatten.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _flatten = ReadWriteAttribute(jsObject: object, name: HTMLStrings.flatten) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var flatten: Bool -} - -public class AudioTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.AudioTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.language) - _enabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.enabled) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var enabled: Bool -} - -public class AudioTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.AudioTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> AudioTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> AudioTrack? { - let this = jsObject - return this[HTMLStrings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public class BarProp: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.BarProp].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _visible = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.visible) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var visible: Bool -} - -public class BeforeUnloadEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.BeforeUnloadEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - // XXX: member 'returnValue' is ignored -} - -public class BroadcastChannel: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.BroadcastChannel].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.name) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(name: String) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) - } - - @ReadonlyAttribute - public var name: String - - @inlinable public func postMessage(message: JSValue) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue]) - } - - @inlinable public func close() { - let this = jsObject - _ = this[HTMLStrings.close].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public enum CanPlayTypeResult: JSString, JSValueCompatible { - case _empty = "" - case maybe = "maybe" - case probably = "probably" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasCompositing: JSBridgedClass {} -public extension CanvasCompositing { - @inlinable var globalAlpha: Double { - get { ReadWriteAttribute[HTMLStrings.globalAlpha, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.globalAlpha, in: jsObject] = newValue } - } - - @inlinable var globalCompositeOperation: String { - get { ReadWriteAttribute[HTMLStrings.globalCompositeOperation, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.globalCompositeOperation, in: jsObject] = newValue } - } -} - -public enum CanvasDirection: JSString, JSValueCompatible { - case ltr = "ltr" - case rtl = "rtl" - case inherit = "inherit" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasDrawImage: JSBridgedClass {} -public extension CanvasDrawImage { - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { - let this = jsObject - _ = this[HTMLStrings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) - } - - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { - let this = jsObject - _ = this[HTMLStrings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) - } - - @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = dx.jsValue - let _arg6 = dy.jsValue - let _arg7 = dw.jsValue - let _arg8 = dh.jsValue - let this = jsObject - _ = this[HTMLStrings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } -} - -public protocol CanvasDrawPath: JSBridgedClass {} -public extension CanvasDrawPath { - @inlinable func beginPath() { - let this = jsObject - _ = this[HTMLStrings.beginPath].function!(this: this, arguments: []) - } - - @inlinable func fill(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[HTMLStrings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } - - @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[HTMLStrings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } - - @inlinable func stroke() { - let this = jsObject - _ = this[HTMLStrings.stroke].function!(this: this, arguments: []) - } - - @inlinable func stroke(path: Path2D) { - let this = jsObject - _ = this[HTMLStrings.stroke].function!(this: this, arguments: [path.jsValue]) - } - - @inlinable func clip(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[HTMLStrings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } - - @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[HTMLStrings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } - - @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { - let this = jsObject - return this[HTMLStrings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { - let this = jsObject - return this[HTMLStrings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { - let this = jsObject - return this[HTMLStrings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { - let this = jsObject - return this[HTMLStrings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! - } -} - -public enum CanvasFillRule: JSString, JSValueCompatible { - case nonzero = "nonzero" - case evenodd = "evenodd" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasFillStrokeStyles: JSBridgedClass {} -public extension CanvasFillStrokeStyles { - @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { - get { ReadWriteAttribute[HTMLStrings.strokeStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.strokeStyle, in: jsObject] = newValue } - } - - @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { - get { ReadWriteAttribute[HTMLStrings.fillStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.fillStyle, in: jsObject] = newValue } - } - - @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { - let this = jsObject - return this[HTMLStrings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! - } - - @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { - let _arg0 = x0.jsValue - let _arg1 = y0.jsValue - let _arg2 = r0.jsValue - let _arg3 = x1.jsValue - let _arg4 = y1.jsValue - let _arg5 = r1.jsValue - let this = jsObject - return this[HTMLStrings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { - let this = jsObject - return this[HTMLStrings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { - let this = jsObject - return this[HTMLStrings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! - } -} - -public class CanvasFilter: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasFilter].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) - } -} - -public protocol CanvasFilters: JSBridgedClass {} -public extension CanvasFilters { - @inlinable var filter: CanvasFilter_or_String { - get { ReadWriteAttribute[HTMLStrings.filter, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.filter, in: jsObject] = newValue } - } -} - -public enum CanvasFontKerning: JSString, JSValueCompatible { - case auto = "auto" - case normal = "normal" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasFontStretch: JSString, JSValueCompatible { - case ultraCondensed = "ultra-condensed" - case extraCondensed = "extra-condensed" - case condensed = "condensed" - case semiCondensed = "semi-condensed" - case normal = "normal" - case semiExpanded = "semi-expanded" - case expanded = "expanded" - case extraExpanded = "extra-expanded" - case ultraExpanded = "ultra-expanded" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasFontVariantCaps: JSString, JSValueCompatible { - case normal = "normal" - case smallCaps = "small-caps" - case allSmallCaps = "all-small-caps" - case petiteCaps = "petite-caps" - case allPetiteCaps = "all-petite-caps" - case unicase = "unicase" - case titlingCaps = "titling-caps" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class CanvasGradient: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasGradient].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func addColorStop(offset: Double, color: String) { - let this = jsObject - _ = this[HTMLStrings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) - } -} - -public protocol CanvasImageData: JSBridgedClass {} -public extension CanvasImageData { - @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { - let this = jsObject - return this[HTMLStrings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func createImageData(imagedata: ImageData) -> ImageData { - let this = jsObject - return this[HTMLStrings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! - } - - @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { - let this = jsObject - return this[HTMLStrings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { - let this = jsObject - _ = this[HTMLStrings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) - } - - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { - let _arg0 = imagedata.jsValue - let _arg1 = dx.jsValue - let _arg2 = dy.jsValue - let _arg3 = dirtyX.jsValue - let _arg4 = dirtyY.jsValue - let _arg5 = dirtyWidth.jsValue - let _arg6 = dirtyHeight.jsValue - let this = jsObject - _ = this[HTMLStrings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } -} - -public protocol CanvasImageSmoothing: JSBridgedClass {} -public extension CanvasImageSmoothing { - @inlinable var imageSmoothingEnabled: Bool { - get { ReadWriteAttribute[HTMLStrings.imageSmoothingEnabled, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.imageSmoothingEnabled, in: jsObject] = newValue } - } - - @inlinable var imageSmoothingQuality: ImageSmoothingQuality { - get { ReadWriteAttribute[HTMLStrings.imageSmoothingQuality, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.imageSmoothingQuality, in: jsObject] = newValue } - } -} - -public enum CanvasLineCap: JSString, JSValueCompatible { - case butt = "butt" - case round = "round" - case square = "square" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasLineJoin: JSString, JSValueCompatible { - case round = "round" - case bevel = "bevel" - case miter = "miter" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasPath: JSBridgedClass {} -public extension CanvasPath { - @inlinable func closePath() { - let this = jsObject - _ = this[HTMLStrings.closePath].function!(this: this, arguments: []) - } - - @inlinable func moveTo(x: Double, y: Double) { - let this = jsObject - _ = this[HTMLStrings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func lineTo(x: Double, y: Double) { - let this = jsObject - _ = this[HTMLStrings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { - let this = jsObject - _ = this[HTMLStrings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { - let _arg0 = cp1x.jsValue - let _arg1 = cp1y.jsValue - let _arg2 = cp2x.jsValue - let _arg3 = cp2y.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue - let this = jsObject - _ = this[HTMLStrings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { - let this = jsObject - _ = this[HTMLStrings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) - } - - @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[HTMLStrings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { - let this = jsObject - _ = this[HTMLStrings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) - } - - @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radius.jsValue - let _arg3 = startAngle.jsValue - let _arg4 = endAngle.jsValue - let _arg5 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[HTMLStrings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radiusX.jsValue - let _arg3 = radiusY.jsValue - let _arg4 = rotation.jsValue - let _arg5 = startAngle.jsValue - let _arg6 = endAngle.jsValue - let _arg7 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[HTMLStrings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public protocol CanvasPathDrawingStyles: JSBridgedClass {} -public extension CanvasPathDrawingStyles { - @inlinable var lineWidth: Double { - get { ReadWriteAttribute[HTMLStrings.lineWidth, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.lineWidth, in: jsObject] = newValue } - } - - @inlinable var lineCap: CanvasLineCap { - get { ReadWriteAttribute[HTMLStrings.lineCap, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.lineCap, in: jsObject] = newValue } - } - - @inlinable var lineJoin: CanvasLineJoin { - get { ReadWriteAttribute[HTMLStrings.lineJoin, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.lineJoin, in: jsObject] = newValue } - } - - @inlinable var miterLimit: Double { - get { ReadWriteAttribute[HTMLStrings.miterLimit, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.miterLimit, in: jsObject] = newValue } - } - - @inlinable func setLineDash(segments: [Double]) { - let this = jsObject - _ = this[HTMLStrings.setLineDash].function!(this: this, arguments: [segments.jsValue]) - } - - @inlinable func getLineDash() -> [Double] { - let this = jsObject - return this[HTMLStrings.getLineDash].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var lineDashOffset: Double { - get { ReadWriteAttribute[HTMLStrings.lineDashOffset, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.lineDashOffset, in: jsObject] = newValue } - } -} - -public class CanvasPattern: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasPattern].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[HTMLStrings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } -} - -public protocol CanvasRect: JSBridgedClass {} -public extension CanvasRect { - @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[HTMLStrings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[HTMLStrings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[HTMLStrings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } -} - -public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CanvasRenderingContext2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.canvas) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var canvas: HTMLCanvasElement - - @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { - let this = jsObject - return this[HTMLStrings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class CanvasRenderingContext2DSettings: BridgedDictionary { - public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.alpha] = alpha.jsValue - object[HTMLStrings.desynchronized] = desynchronized.jsValue - object[HTMLStrings.colorSpace] = colorSpace.jsValue - object[HTMLStrings.willReadFrequently] = willReadFrequently.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: HTMLStrings.alpha) - _desynchronized = ReadWriteAttribute(jsObject: object, name: HTMLStrings.desynchronized) - _colorSpace = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colorSpace) - _willReadFrequently = ReadWriteAttribute(jsObject: object, name: HTMLStrings.willReadFrequently) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool - - @ReadWriteAttribute - public var desynchronized: Bool - - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace - - @ReadWriteAttribute - public var willReadFrequently: Bool -} - -public protocol CanvasShadowStyles: JSBridgedClass {} -public extension CanvasShadowStyles { - @inlinable var shadowOffsetX: Double { - get { ReadWriteAttribute[HTMLStrings.shadowOffsetX, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.shadowOffsetX, in: jsObject] = newValue } - } - - @inlinable var shadowOffsetY: Double { - get { ReadWriteAttribute[HTMLStrings.shadowOffsetY, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.shadowOffsetY, in: jsObject] = newValue } - } - - @inlinable var shadowBlur: Double { - get { ReadWriteAttribute[HTMLStrings.shadowBlur, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.shadowBlur, in: jsObject] = newValue } - } - - @inlinable var shadowColor: String { - get { ReadWriteAttribute[HTMLStrings.shadowColor, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.shadowColor, in: jsObject] = newValue } - } -} - -public protocol CanvasState: JSBridgedClass {} -public extension CanvasState { - @inlinable func save() { - let this = jsObject - _ = this[HTMLStrings.save].function!(this: this, arguments: []) - } - - @inlinable func restore() { - let this = jsObject - _ = this[HTMLStrings.restore].function!(this: this, arguments: []) - } - - @inlinable func reset() { - let this = jsObject - _ = this[HTMLStrings.reset].function!(this: this, arguments: []) - } - - @inlinable func isContextLost() -> Bool { - let this = jsObject - return this[HTMLStrings.isContextLost].function!(this: this, arguments: []).fromJSValue()! - } -} - -public protocol CanvasText: JSBridgedClass {} -public extension CanvasText { - @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { - let this = jsObject - _ = this[HTMLStrings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) - } - - @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { - let this = jsObject - _ = this[HTMLStrings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) - } - - @inlinable func measureText(text: String) -> TextMetrics { - let this = jsObject - return this[HTMLStrings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! - } -} - -public enum CanvasTextAlign: JSString, JSValueCompatible { - case start = "start" - case end = "end" - case left = "left" - case right = "right" - case center = "center" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasTextBaseline: JSString, JSValueCompatible { - case top = "top" - case hanging = "hanging" - case middle = "middle" - case alphabetic = "alphabetic" - case ideographic = "ideographic" - case bottom = "bottom" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasTextDrawingStyles: JSBridgedClass {} -public extension CanvasTextDrawingStyles { - @inlinable var font: String { - get { ReadWriteAttribute[HTMLStrings.font, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.font, in: jsObject] = newValue } - } - - @inlinable var textAlign: CanvasTextAlign { - get { ReadWriteAttribute[HTMLStrings.textAlign, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.textAlign, in: jsObject] = newValue } - } - - @inlinable var textBaseline: CanvasTextBaseline { - get { ReadWriteAttribute[HTMLStrings.textBaseline, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.textBaseline, in: jsObject] = newValue } - } - - @inlinable var direction: CanvasDirection { - get { ReadWriteAttribute[HTMLStrings.direction, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.direction, in: jsObject] = newValue } - } - - @inlinable var letterSpacing: String { - get { ReadWriteAttribute[HTMLStrings.letterSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.letterSpacing, in: jsObject] = newValue } - } - - @inlinable var fontKerning: CanvasFontKerning { - get { ReadWriteAttribute[HTMLStrings.fontKerning, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.fontKerning, in: jsObject] = newValue } - } - - @inlinable var fontStretch: CanvasFontStretch { - get { ReadWriteAttribute[HTMLStrings.fontStretch, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.fontStretch, in: jsObject] = newValue } - } - - @inlinable var fontVariantCaps: CanvasFontVariantCaps { - get { ReadWriteAttribute[HTMLStrings.fontVariantCaps, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.fontVariantCaps, in: jsObject] = newValue } - } - - @inlinable var textRendering: CanvasTextRendering { - get { ReadWriteAttribute[HTMLStrings.textRendering, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.textRendering, in: jsObject] = newValue } - } - - @inlinable var wordSpacing: String { - get { ReadWriteAttribute[HTMLStrings.wordSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.wordSpacing, in: jsObject] = newValue } - } -} - -public enum CanvasTextRendering: JSString, JSValueCompatible { - case auto = "auto" - case optimizeSpeed = "optimizeSpeed" - case optimizeLegibility = "optimizeLegibility" - case geometricPrecision = "geometricPrecision" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasTransform: JSBridgedClass {} -public extension CanvasTransform { - @inlinable func scale(x: Double, y: Double) { - let this = jsObject - _ = this[HTMLStrings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func rotate(angle: Double) { - let this = jsObject - _ = this[HTMLStrings.rotate].function!(this: this, arguments: [angle.jsValue]) - } - - @inlinable func translate(x: Double, y: Double) { - let this = jsObject - _ = this[HTMLStrings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[HTMLStrings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func getTransform() -> DOMMatrix { - let this = jsObject - return this[HTMLStrings.getTransform].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[HTMLStrings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[HTMLStrings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } - - @inlinable func resetTransform() { - let this = jsObject - _ = this[HTMLStrings.resetTransform].function!(this: this, arguments: []) - } -} - -public protocol CanvasUserInterface: JSBridgedClass {} -public extension CanvasUserInterface { - @inlinable func drawFocusIfNeeded(element: Element) { - let this = jsObject - _ = this[HTMLStrings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) - } - - @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { - let this = jsObject - _ = this[HTMLStrings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) - } - - @inlinable func scrollPathIntoView() { - let this = jsObject - _ = this[HTMLStrings.scrollPathIntoView].function!(this: this, arguments: []) - } - - @inlinable func scrollPathIntoView(path: Path2D) { - let this = jsObject - _ = this[HTMLStrings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) - } -} - -public enum ColorSpaceConversion: JSString, JSValueCompatible { - case none = "none" - case `default` = "default" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class CustomElementRegistry: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.CustomElementRegistry].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { - let this = jsObject - _ = this[HTMLStrings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func get(name: String) -> CustomElementConstructor? { - let this = jsObject - return this[HTMLStrings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func whenDefined(name: String) -> JSPromise { - let this = jsObject - return this[HTMLStrings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func upgrade(root: Node) { - let this = jsObject - _ = this[HTMLStrings.upgrade].function!(this: this, arguments: [root.jsValue]) - } -} - -public class DOMParser: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DOMParser].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func parseFromString(string: String, type: DOMParserSupportedType) -> Document { - let this = jsObject - return this[HTMLStrings.parseFromString].function!(this: this, arguments: [string.jsValue, type.jsValue]).fromJSValue()! - } -} - -public enum DOMParserSupportedType: JSString, JSValueCompatible { - case textHtml = "text/html" - case textXml = "text/xml" - case applicationXml = "application/xml" - case applicationXhtmlXml = "application/xhtml+xml" - case imageSvgXml = "image/svg+xml" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class DOMStringList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DOMStringList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> String? { - jsObject[key].fromJSValue() - } - - @inlinable public func contains(string: String) -> Bool { - let this = jsObject - return this[HTMLStrings.contains].function!(this: this, arguments: [string.jsValue]).fromJSValue()! - } -} - -public class DOMStringMap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DOMStringMap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public subscript(key: String) -> String { - jsObject[key].fromJSValue()! - } - - // XXX: unsupported setter for keys of type String - - // XXX: unsupported deleter for keys of type String -} - -public class DataTransfer: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DataTransfer].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _dropEffect = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dropEffect) - _effectAllowed = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.effectAllowed) - _items = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.items) - _types = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.types) - _files = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.files) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var dropEffect: String - - @ReadWriteAttribute - public var effectAllowed: String - - @ReadonlyAttribute - public var items: DataTransferItemList - - @inlinable public func setDragImage(image: Element, x: Int32, y: Int32) { - let this = jsObject - _ = this[HTMLStrings.setDragImage].function!(this: this, arguments: [image.jsValue, x.jsValue, y.jsValue]) - } - - @ReadonlyAttribute - public var types: [String] - - @inlinable public func getData(format: String) -> String { - let this = jsObject - return this[HTMLStrings.getData].function!(this: this, arguments: [format.jsValue]).fromJSValue()! - } - - @inlinable public func setData(format: String, data: String) { - let this = jsObject - _ = this[HTMLStrings.setData].function!(this: this, arguments: [format.jsValue, data.jsValue]) - } - - @inlinable public func clearData(format: String? = nil) { - let this = jsObject - _ = this[HTMLStrings.clearData].function!(this: this, arguments: [format?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var files: FileList -} - -public class DataTransferItem: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DataTransferItem].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) - _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var type: String - - // XXX: member 'getAsString' is ignored - - @inlinable public func getAsFile() -> File? { - let this = jsObject - return this[HTMLStrings.getAsFile].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DataTransferItemList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.DataTransferItemList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> DataTransferItem { - jsObject[key].fromJSValue()! - } - - @inlinable public func add(data: String, type: String) -> DataTransferItem? { - let this = jsObject - return this[HTMLStrings.add].function!(this: this, arguments: [data.jsValue, type.jsValue]).fromJSValue()! - } - - @inlinable public func add(data: File) -> DataTransferItem? { - let this = jsObject - return this[HTMLStrings.add].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func remove(index: UInt32) { - let this = jsObject - _ = this[HTMLStrings.remove].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable public func clear() { - let this = jsObject - _ = this[HTMLStrings.clear].function!(this: this, arguments: []) - } -} - -public protocol DocumentAndElementEventHandlers: JSBridgedClass {} -public extension DocumentAndElementEventHandlers { - @inlinable var oncopy: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncopy, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncopy, in: jsObject] = newValue } - } - - @inlinable var oncut: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncut, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncut, in: jsObject] = newValue } - } - - @inlinable var onpaste: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onpaste, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpaste, in: jsObject] = newValue } - } -} - -public extension DocumentOrShadowRoot { - @inlinable var activeElement: Element? { ReadonlyAttribute[HTMLStrings.activeElement, in: jsObject] } -} - -public enum DocumentReadyState: JSString, JSValueCompatible { - case loading = "loading" - case interactive = "interactive" - case complete = "complete" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum DocumentVisibilityState: JSString, JSValueCompatible { - case visible = "visible" - case hidden = "hidden" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class DragEvent: MouseEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.DragEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _dataTransfer = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.dataTransfer) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: DragEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var dataTransfer: DataTransfer? -} - -public class DragEventInit: BridgedDictionary { - public convenience init(dataTransfer: DataTransfer?) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.dataTransfer] = dataTransfer.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _dataTransfer = ReadWriteAttribute(jsObject: object, name: HTMLStrings.dataTransfer) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var dataTransfer: DataTransfer? -} - -public protocol ElementContentEditable: JSBridgedClass {} -public extension ElementContentEditable { - @inlinable var contentEditable: String { - get { ReadWriteAttribute[HTMLStrings.contentEditable, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.contentEditable, in: jsObject] = newValue } - } - - @inlinable var enterKeyHint: String { - get { ReadWriteAttribute[HTMLStrings.enterKeyHint, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.enterKeyHint, in: jsObject] = newValue } - } - - @inlinable var isContentEditable: Bool { ReadonlyAttribute[HTMLStrings.isContentEditable, in: jsObject] } - - @inlinable var inputMode: String { - get { ReadWriteAttribute[HTMLStrings.inputMode, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.inputMode, in: jsObject] = newValue } - } -} - -public class ElementDefinitionOptions: BridgedDictionary { - public convenience init(extends: String) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.extends] = extends.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _extends = ReadWriteAttribute(jsObject: object, name: HTMLStrings.extends) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var extends: String -} - -public class ElementInternals: JSBridgedClass, ARIAMixin { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ElementInternals].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.shadowRoot) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { - let this = jsObject - _ = this[HTMLStrings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { - let this = jsObject - _ = this[HTMLStrings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class ErrorEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.ErrorEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _message = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.message) - _filename = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.filename) - _lineno = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.lineno) - _colno = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.colno) - _error = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.error) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: ErrorEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var message: String - - @ReadonlyAttribute - public var filename: String - - @ReadonlyAttribute - public var lineno: UInt32 - - @ReadonlyAttribute - public var colno: UInt32 - - @ReadonlyAttribute - public var error: JSValue -} - -public class ErrorEventInit: BridgedDictionary { - public convenience init(message: String, filename: String, lineno: UInt32, colno: UInt32, error: JSValue) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.message] = message.jsValue - object[HTMLStrings.filename] = filename.jsValue - object[HTMLStrings.lineno] = lineno.jsValue - object[HTMLStrings.colno] = colno.jsValue - object[HTMLStrings.error] = error.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _message = ReadWriteAttribute(jsObject: object, name: HTMLStrings.message) - _filename = ReadWriteAttribute(jsObject: object, name: HTMLStrings.filename) - _lineno = ReadWriteAttribute(jsObject: object, name: HTMLStrings.lineno) - _colno = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colno) - _error = ReadWriteAttribute(jsObject: object, name: HTMLStrings.error) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var message: String - - @ReadWriteAttribute - public var filename: String - - @ReadWriteAttribute - public var lineno: UInt32 - - @ReadWriteAttribute - public var colno: UInt32 - - @ReadWriteAttribute - public var error: JSValue -} - -public class EventSource: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.EventSource].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _url = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.url) - _withCredentials = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.withCredentials) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.readyState) - _onopen = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onopen) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, eventSourceInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var withCredentials: Bool - - public static let CONNECTING: UInt16 = 0 - - public static let OPEN: UInt16 = 1 - - public static let CLOSED: UInt16 = 2 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ClosureAttribute1Optional - public var onopen: EventHandler - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @inlinable public func close() { - let this = jsObject - _ = this[HTMLStrings.close].function!(this: this, arguments: []) - } -} - -public class EventSourceInit: BridgedDictionary { - public convenience init(withCredentials: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.withCredentials] = withCredentials.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _withCredentials = ReadWriteAttribute(jsObject: object, name: HTMLStrings.withCredentials) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var withCredentials: Bool -} - -public class External: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.External].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func AddSearchProvider() { - let this = jsObject - _ = this[HTMLStrings.AddSearchProvider].function!(this: this, arguments: []) - } - - @inlinable public func IsSearchProviderInstalled() { - let this = jsObject - _ = this[HTMLStrings.IsSearchProviderInstalled].function!(this: this, arguments: []) - } -} - -public class FocusOptions: BridgedDictionary { - public convenience init(preventScroll: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.preventScroll] = preventScroll.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventScroll = ReadWriteAttribute(jsObject: object, name: HTMLStrings.preventScroll) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventScroll: Bool -} - -public class FormDataEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.FormDataEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _formData = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.formData) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: FormDataEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var formData: FormData -} - -public class FormDataEventInit: BridgedDictionary { - public convenience init(formData: FormData) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.formData] = formData.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _formData = ReadWriteAttribute(jsObject: object, name: HTMLStrings.formData) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var formData: FormData -} - -public protocol GlobalEventHandlers: JSBridgedClass {} -public extension GlobalEventHandlers { - @inlinable var onabort: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onabort, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onabort, in: jsObject] = newValue } - } - - @inlinable var onauxclick: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onauxclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onauxclick, in: jsObject] = newValue } - } - - @inlinable var onblur: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onblur, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onblur, in: jsObject] = newValue } - } - - @inlinable var oncancel: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncancel, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncancel, in: jsObject] = newValue } - } - - @inlinable var oncanplay: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncanplay, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncanplay, in: jsObject] = newValue } - } - - @inlinable var oncanplaythrough: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncanplaythrough, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncanplaythrough, in: jsObject] = newValue } - } - - @inlinable var onchange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onchange, in: jsObject] = newValue } - } - - @inlinable var onclick: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onclick, in: jsObject] = newValue } - } - - @inlinable var onclose: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onclose, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onclose, in: jsObject] = newValue } - } - - @inlinable var oncontextlost: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncontextlost, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncontextlost, in: jsObject] = newValue } - } - - @inlinable var oncontextmenu: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncontextmenu, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncontextmenu, in: jsObject] = newValue } - } - - @inlinable var oncontextrestored: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncontextrestored, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncontextrestored, in: jsObject] = newValue } - } - - @inlinable var oncuechange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oncuechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oncuechange, in: jsObject] = newValue } - } - - @inlinable var ondblclick: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondblclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondblclick, in: jsObject] = newValue } - } - - @inlinable var ondrag: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondrag, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondrag, in: jsObject] = newValue } - } - - @inlinable var ondragend: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondragend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragend, in: jsObject] = newValue } - } - - @inlinable var ondragenter: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondragenter, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragenter, in: jsObject] = newValue } - } - - @inlinable var ondragleave: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondragleave, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragleave, in: jsObject] = newValue } - } - - @inlinable var ondragover: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondragover, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragover, in: jsObject] = newValue } - } - - @inlinable var ondragstart: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondragstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondragstart, in: jsObject] = newValue } - } - - @inlinable var ondrop: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondrop, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondrop, in: jsObject] = newValue } - } - - @inlinable var ondurationchange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ondurationchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ondurationchange, in: jsObject] = newValue } - } - - @inlinable var onemptied: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onemptied, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onemptied, in: jsObject] = newValue } - } - - @inlinable var onended: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onended, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onended, in: jsObject] = newValue } - } - - @inlinable var onerror: OnErrorEventHandler { - get { ClosureAttribute5Optional[HTMLStrings.onerror, in: jsObject] } - nonmutating set { ClosureAttribute5Optional[HTMLStrings.onerror, in: jsObject] = newValue } - } - - @inlinable var onfocus: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onfocus, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onfocus, in: jsObject] = newValue } - } - - @inlinable var onformdata: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onformdata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onformdata, in: jsObject] = newValue } - } - - @inlinable var oninput: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oninput, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oninput, in: jsObject] = newValue } - } - - @inlinable var oninvalid: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.oninvalid, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.oninvalid, in: jsObject] = newValue } - } - - @inlinable var onkeydown: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onkeydown, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onkeydown, in: jsObject] = newValue } - } - - @inlinable var onkeypress: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onkeypress, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onkeypress, in: jsObject] = newValue } - } - - @inlinable var onkeyup: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onkeyup, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onkeyup, in: jsObject] = newValue } - } - - @inlinable var onload: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onload, in: jsObject] = newValue } - } - - @inlinable var onloadeddata: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onloadeddata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onloadeddata, in: jsObject] = newValue } - } - - @inlinable var onloadedmetadata: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onloadedmetadata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onloadedmetadata, in: jsObject] = newValue } - } - - @inlinable var onloadstart: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onloadstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onloadstart, in: jsObject] = newValue } - } - - @inlinable var onmousedown: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmousedown, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmousedown, in: jsObject] = newValue } - } - - @inlinable var onmouseenter: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmouseenter, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseenter, in: jsObject] = newValue } - } - - @inlinable var onmouseleave: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmouseleave, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseleave, in: jsObject] = newValue } - } - - @inlinable var onmousemove: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmousemove, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmousemove, in: jsObject] = newValue } - } - - @inlinable var onmouseout: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmouseout, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseout, in: jsObject] = newValue } - } - - @inlinable var onmouseover: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmouseover, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseover, in: jsObject] = newValue } - } - - @inlinable var onmouseup: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmouseup, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmouseup, in: jsObject] = newValue } - } - - @inlinable var onpause: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onpause, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpause, in: jsObject] = newValue } - } - - @inlinable var onplay: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onplay, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onplay, in: jsObject] = newValue } - } - - @inlinable var onplaying: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onplaying, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onplaying, in: jsObject] = newValue } - } - - @inlinable var onprogress: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onprogress, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onprogress, in: jsObject] = newValue } - } - - @inlinable var onratechange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onratechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onratechange, in: jsObject] = newValue } - } - - @inlinable var onreset: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onreset, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onreset, in: jsObject] = newValue } - } - - @inlinable var onresize: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onresize, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onresize, in: jsObject] = newValue } - } - - @inlinable var onscroll: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onscroll, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onscroll, in: jsObject] = newValue } - } - - @inlinable var onsecuritypolicyviolation: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onsecuritypolicyviolation, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onsecuritypolicyviolation, in: jsObject] = newValue } - } - - @inlinable var onseeked: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onseeked, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onseeked, in: jsObject] = newValue } - } - - @inlinable var onseeking: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onseeking, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onseeking, in: jsObject] = newValue } - } - - @inlinable var onselect: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onselect, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onselect, in: jsObject] = newValue } - } - - @inlinable var onslotchange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onslotchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onslotchange, in: jsObject] = newValue } - } - - @inlinable var onstalled: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onstalled, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onstalled, in: jsObject] = newValue } - } - - @inlinable var onsubmit: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onsubmit, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onsubmit, in: jsObject] = newValue } - } - - @inlinable var onsuspend: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onsuspend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onsuspend, in: jsObject] = newValue } - } - - @inlinable var ontimeupdate: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ontimeupdate, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ontimeupdate, in: jsObject] = newValue } - } - - @inlinable var ontoggle: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ontoggle, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ontoggle, in: jsObject] = newValue } - } - - @inlinable var onvolumechange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onvolumechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onvolumechange, in: jsObject] = newValue } - } - - @inlinable var onwaiting: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onwaiting, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwaiting, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationend: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationend, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationiteration: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationiteration, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationiteration, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationstart: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkitanimationstart, in: jsObject] = newValue } - } - - @inlinable var onwebkittransitionend: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onwebkittransitionend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwebkittransitionend, in: jsObject] = newValue } - } - - @inlinable var onwheel: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onwheel, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onwheel, in: jsObject] = newValue } - } -} - -public class HTMLAllCollection: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAllCollection].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element { - jsObject[key].fromJSValue()! - } - - @inlinable public subscript(key: String) -> Element_or_HTMLCollection? { - jsObject[key].fromJSValue() - } - - @inlinable public func item(nameOrIndex: String? = nil) -> Element_or_HTMLCollection? { - let this = jsObject - return this[HTMLStrings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class HTMLAnchorElement: HTMLElement, HTMLHyperlinkElementUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAnchorElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) - _download = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.download) - _ping = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ping) - _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) - _hreflang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hreflang) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) - _coords = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.coords) - _charset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.charset) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _rev = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rev) - _shape = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.shape) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var download: String - - @ReadWriteAttribute - public var ping: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var hreflang: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var coords: String - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var rev: String - - @ReadWriteAttribute - public var shape: String -} - -public class HTMLAreaElement: HTMLElement, HTMLHyperlinkElementUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAreaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _alt = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.alt) - _coords = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.coords) - _shape = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.shape) - _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) - _download = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.download) - _ping = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ping) - _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) - _noHref = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noHref) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var coords: String - - @ReadWriteAttribute - public var shape: String - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var download: String - - @ReadWriteAttribute - public var ping: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var noHref: Bool -} - -public class HTMLAudioElement: HTMLMediaElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLAudioElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLBRElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLBRElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _clear = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.clear) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var clear: String -} - -public class HTMLBaseElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLBaseElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.href) - _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var href: String - - @ReadWriteAttribute - public var target: String -} - -public class HTMLBodyElement: HTMLElement, WindowEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLBodyElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) - _link = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.link) - _vLink = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vLink) - _aLink = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.aLink) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) - _background = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.background) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var link: String - - @ReadWriteAttribute - public var vLink: String - - @ReadWriteAttribute - public var aLink: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var background: String -} - -public class HTMLButtonElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLButtonElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _formAction = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formAction) - _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formEnctype) - _formMethod = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formMethod) - _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formNoValidate) - _formTarget = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formTarget) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var formAction: String - - @ReadWriteAttribute - public var formEnctype: String - - @ReadWriteAttribute - public var formMethod: String - - @ReadWriteAttribute - public var formNoValidate: Bool - - @ReadWriteAttribute - public var formTarget: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLCanvasElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLCanvasElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @inlinable public func getContext(contextId: String, options: JSValue? = nil) -> RenderingContext? { - let this = jsObject - return this[HTMLStrings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toDataURL(type: String? = nil, quality: JSValue? = nil) -> String { - let this = jsObject - return this[HTMLStrings.toDataURL].function!(this: this, arguments: [type?.jsValue ?? .undefined, quality?.jsValue ?? .undefined]).fromJSValue()! - } - - // XXX: member 'toBlob' is ignored - - @inlinable public func transferControlToOffscreen() -> OffscreenCanvas { - let this = jsObject - return this[HTMLStrings.transferControlToOffscreen].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class HTMLDListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLDataElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDataElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: String -} - -public class HTMLDataListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDataListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _options = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.options) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var options: HTMLCollection -} - -public class HTMLDetailsElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDetailsElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _open = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.open) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var open: Bool -} - -public class HTMLDialogElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDialogElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _open = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.open) - _returnValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.returnValue) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var open: Bool - - @ReadWriteAttribute - public var returnValue: String - - @inlinable public func show() { - let this = jsObject - _ = this[HTMLStrings.show].function!(this: this, arguments: []) - } - - @inlinable public func showModal() { - let this = jsObject - _ = this[HTMLStrings.showModal].function!(this: this, arguments: []) - } - - @inlinable public func close(returnValue: String? = nil) { - let this = jsObject - _ = this[HTMLStrings.close].function!(this: this, arguments: [returnValue?.jsValue ?? .undefined]) - } -} - -public class HTMLDirectoryElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDirectoryElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLDivElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLDivElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _title = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.title) - _lang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.lang) - _translate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.translate) - _dir = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dir) - _hidden = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hidden) - _inert = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.inert) - _accessKey = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.accessKey) - _accessKeyLabel = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.accessKeyLabel) - _draggable = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.draggable) - _spellcheck = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.spellcheck) - _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocapitalize) - _innerText = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.innerText) - _outerText = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.outerText) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var title: String - - @ReadWriteAttribute - public var lang: String - - @ReadWriteAttribute - public var translate: Bool - - @ReadWriteAttribute - public var dir: String - - @ReadWriteAttribute - public var hidden: Bool - - @ReadWriteAttribute - public var inert: Bool - - @inlinable public func click() { - let this = jsObject - _ = this[HTMLStrings.click].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var accessKey: String - - @ReadonlyAttribute - public var accessKeyLabel: String - - @ReadWriteAttribute - public var draggable: Bool - - @ReadWriteAttribute - public var spellcheck: Bool - - @ReadWriteAttribute - public var autocapitalize: String - - @ReadWriteAttribute - public var innerText: String - - @ReadWriteAttribute - public var outerText: String - - @inlinable public func attachInternals() -> ElementInternals { - let this = jsObject - return this[HTMLStrings.attachInternals].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class HTMLEmbedElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLEmbedElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[HTMLStrings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var name: String -} - -public class HTMLFieldSetElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFieldSetElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) - _elements = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.elements) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var elements: HTMLCollection - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } -} - -public class HTMLFontElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFontElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _color = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.color) - _face = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.face) - _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var color: String - - @ReadWriteAttribute - public var face: String - - @ReadWriteAttribute - public var size: String -} - -public class HTMLFormControlsCollection: HTMLCollection { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFormControlsCollection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public subscript(key: String) -> Element_or_RadioNodeList? { - jsObject[key].fromJSValue() - } -} - -public class HTMLFormElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFormElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _acceptCharset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.acceptCharset) - _action = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.action) - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) - _enctype = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.enctype) - _encoding = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.encoding) - _method = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.method) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _noValidate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noValidate) - _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) - _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) - _elements = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.elements) - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var acceptCharset: String - - @ReadWriteAttribute - public var action: String - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var enctype: String - - @ReadWriteAttribute - public var encoding: String - - @ReadWriteAttribute - public var method: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var noValidate: Bool - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadonlyAttribute - public var elements: HTMLFormControlsCollection - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element { - jsObject[key].fromJSValue()! - } - - @inlinable public subscript(key: String) -> Element_or_RadioNodeList { - jsObject[key].fromJSValue()! - } - - @inlinable public func submit() { - let this = jsObject - _ = this[HTMLStrings.submit].function!(this: this, arguments: []) - } - - @inlinable public func requestSubmit(submitter: HTMLElement? = nil) { - let this = jsObject - _ = this[HTMLStrings.requestSubmit].function!(this: this, arguments: [submitter?.jsValue ?? .undefined]) - } - - @inlinable public func reset() { - let this = jsObject - _ = this[HTMLStrings.reset].function!(this: this, arguments: []) - } - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class HTMLFrameElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFrameElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _scrolling = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrolling) - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.frameBorder) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.longDesc) - _noResize = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noResize) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentWindow) - _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginHeight) - _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginWidth) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var scrolling: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var frameBorder: String - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var noResize: Bool - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @ReadWriteAttribute - public var marginHeight: String - - @ReadWriteAttribute - public var marginWidth: String -} - -public class HTMLFrameSetElement: HTMLElement, WindowEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLFrameSetElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cols = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cols) - _rows = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rows) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cols: String - - @ReadWriteAttribute - public var rows: String -} - -public class HTMLHRElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHRElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _color = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.color) - _noShade = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noShade) - _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var color: String - - @ReadWriteAttribute - public var noShade: Bool - - @ReadWriteAttribute - public var size: String - - @ReadWriteAttribute - public var width: String -} - -public class HTMLHeadElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHeadElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLHeadingElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHeadingElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLHtmlElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLHtmlElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _version = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.version) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var version: String -} - -public protocol HTMLHyperlinkElementUtils: JSBridgedClass {} -public extension HTMLHyperlinkElementUtils { - @inlinable var href: String { - get { ReadWriteAttribute[HTMLStrings.href, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.href, in: jsObject] = newValue } - } - - @inlinable var origin: String { ReadonlyAttribute[HTMLStrings.origin, in: jsObject] } - - @inlinable var `protocol`: String { - get { ReadWriteAttribute[HTMLStrings.protocol, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.protocol, in: jsObject] = newValue } - } - - @inlinable var username: String { - get { ReadWriteAttribute[HTMLStrings.username, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.username, in: jsObject] = newValue } - } - - @inlinable var password: String { - get { ReadWriteAttribute[HTMLStrings.password, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.password, in: jsObject] = newValue } - } - - @inlinable var host: String { - get { ReadWriteAttribute[HTMLStrings.host, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.host, in: jsObject] = newValue } - } - - @inlinable var hostname: String { - get { ReadWriteAttribute[HTMLStrings.hostname, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.hostname, in: jsObject] = newValue } - } - - @inlinable var port: String { - get { ReadWriteAttribute[HTMLStrings.port, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.port, in: jsObject] = newValue } - } - - @inlinable var pathname: String { - get { ReadWriteAttribute[HTMLStrings.pathname, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.pathname, in: jsObject] = newValue } - } - - @inlinable var search: String { - get { ReadWriteAttribute[HTMLStrings.search, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.search, in: jsObject] = newValue } - } - - @inlinable var hash: String { - get { ReadWriteAttribute[HTMLStrings.hash, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.hash, in: jsObject] = newValue } - } -} - -public class HTMLIFrameElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLIFrameElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _srcdoc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srcdoc) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _sandbox = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.sandbox) - _allow = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.allow) - _allowFullscreen = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.allowFullscreen) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) - _loading = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loading) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentWindow) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _scrolling = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrolling) - _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.frameBorder) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.longDesc) - _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginHeight) - _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.marginWidth) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srcdoc: String - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var sandbox: DOMTokenList - - @ReadWriteAttribute - public var allow: String - - @ReadWriteAttribute - public var allowFullscreen: Bool - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var loading: String - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[HTMLStrings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var scrolling: String - - @ReadWriteAttribute - public var frameBorder: String - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var marginHeight: String - - @ReadWriteAttribute - public var marginWidth: String -} - -public class HTMLImageElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLImageElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _alt = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.alt) - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _srcset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srcset) - _sizes = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.sizes) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.useMap) - _isMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.isMap) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _naturalWidth = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.naturalWidth) - _naturalHeight = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.naturalHeight) - _complete = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.complete) - _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.currentSrc) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) - _decoding = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.decoding) - _loading = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loading) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _lowsrc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.lowsrc) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hspace) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vspace) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.longDesc) - _border = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.border) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srcset: String - - @ReadWriteAttribute - public var sizes: String - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var useMap: String - - @ReadWriteAttribute - public var isMap: Bool - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var naturalWidth: UInt32 - - @ReadonlyAttribute - public var naturalHeight: UInt32 - - @ReadonlyAttribute - public var complete: Bool - - @ReadonlyAttribute - public var currentSrc: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var decoding: String - - @ReadWriteAttribute - public var loading: String - - @inlinable public func decode() -> JSPromise { - let this = jsObject - return this[HTMLStrings.decode].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func decode() async throws { - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.decode].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var lowsrc: String - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var border: String -} - -public class HTMLInputElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLInputElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _accept = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.accept) - _alt = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.alt) - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) - _defaultChecked = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultChecked) - _checked = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.checked) - _dirName = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dirName) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _files = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.files) - _formAction = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formAction) - _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formEnctype) - _formMethod = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formMethod) - _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formNoValidate) - _formTarget = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.formTarget) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _indeterminate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.indeterminate) - _list = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.list) - _max = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.max) - _maxLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.maxLength) - _min = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.min) - _minLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.minLength) - _multiple = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.multiple) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _pattern = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.pattern) - _placeholder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.placeholder) - _readOnly = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.readOnly) - _required = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.required) - _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _step = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.step) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _valueAsDate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.valueAsDate) - _valueAsNumber = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.valueAsNumber) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionStart) - _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionEnd) - _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionDirection) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.useMap) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var accept: String - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var defaultChecked: Bool - - @ReadWriteAttribute - public var checked: Bool - - @ReadWriteAttribute - public var dirName: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var files: FileList? - - @ReadWriteAttribute - public var formAction: String - - @ReadWriteAttribute - public var formEnctype: String - - @ReadWriteAttribute - public var formMethod: String - - @ReadWriteAttribute - public var formNoValidate: Bool - - @ReadWriteAttribute - public var formTarget: String - - @ReadWriteAttribute - public var height: UInt32 - - @ReadWriteAttribute - public var indeterminate: Bool - - @ReadonlyAttribute - public var list: HTMLElement? - - @ReadWriteAttribute - public var max: String - - @ReadWriteAttribute - public var maxLength: Int32 - - @ReadWriteAttribute - public var min: String - - @ReadWriteAttribute - public var minLength: Int32 - - @ReadWriteAttribute - public var multiple: Bool - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var pattern: String - - @ReadWriteAttribute - public var placeholder: String - - @ReadWriteAttribute - public var readOnly: Bool - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var size: UInt32 - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var step: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var valueAsDate: JSObject? - - @ReadWriteAttribute - public var valueAsNumber: Double - - @ReadWriteAttribute - public var width: UInt32 - - @inlinable public func stepUp(n: Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.stepUp].function!(this: this, arguments: [n?.jsValue ?? .undefined]) - } - - @inlinable public func stepDown(n: Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.stepDown].function!(this: this, arguments: [n?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList? - - @inlinable public func select() { - let this = jsObject - _ = this[HTMLStrings.select].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var selectionStart: UInt32? - - @ReadWriteAttribute - public var selectionEnd: UInt32? - - @ReadWriteAttribute - public var selectionDirection: String? - - @inlinable public func setRangeText(replacement: String) { - let this = jsObject - _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) - } - - @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { - let this = jsObject - _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) - } - - @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { - let this = jsObject - _ = this[HTMLStrings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) - } - - @inlinable public func showPicker() { - let this = jsObject - _ = this[HTMLStrings.showPicker].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var useMap: String -} - -public class HTMLLIElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLIElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Int32 - - @ReadWriteAttribute - public var type: String -} - -public class HTMLLabelElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLabelElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.htmlFor) - _control = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.control) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var htmlFor: String - - @ReadonlyAttribute - public var control: HTMLElement? -} - -public class HTMLLegendElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLegendElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var align: String -} - -public class HTMLLinkElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLLinkElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.href) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) - _rel = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rel) - _as = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.as) - _relList = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.relList) - _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) - _integrity = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.integrity) - _hreflang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hreflang) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _sizes = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.sizes) - _imageSrcset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.imageSrcset) - _imageSizes = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.imageSizes) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.blocking) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _charset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.charset) - _rev = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rev) - _target = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.target) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var href: String - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var rel: String - - @ReadWriteAttribute - public var `as`: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var hreflang: String - - @ReadWriteAttribute - public var type: String - - @ReadonlyAttribute - public var sizes: DOMTokenList - - @ReadWriteAttribute - public var imageSrcset: String - - @ReadWriteAttribute - public var imageSizes: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @ReadWriteAttribute - public var disabled: Bool - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var rev: String - - @ReadWriteAttribute - public var target: String -} - -public class HTMLMapElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMapElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _areas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.areas) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var areas: HTMLCollection -} - -public class HTMLMarqueeElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMarqueeElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _behavior = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.behavior) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) - _direction = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.direction) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hspace) - _loop = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loop) - _scrollAmount = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrollAmount) - _scrollDelay = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrollDelay) - _trueSpeed = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.trueSpeed) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vspace) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var behavior: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var direction: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var loop: Int32 - - @ReadWriteAttribute - public var scrollAmount: UInt32 - - @ReadWriteAttribute - public var scrollDelay: UInt32 - - @ReadWriteAttribute - public var trueSpeed: Bool - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var width: String - - @inlinable public func start() { - let this = jsObject - _ = this[HTMLStrings.start].function!(this: this, arguments: []) - } - - @inlinable public func stop() { - let this = jsObject - _ = this[HTMLStrings.stop].function!(this: this, arguments: []) - } -} - -public class HTMLMediaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMediaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _error = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.error) - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.currentSrc) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) - _networkState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.networkState) - _preload = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.preload) - _buffered = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.buffered) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.readyState) - _seeking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.seeking) - _currentTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.currentTime) - _duration = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.duration) - _paused = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.paused) - _defaultPlaybackRate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultPlaybackRate) - _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.playbackRate) - _preservesPitch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.preservesPitch) - _played = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.played) - _seekable = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.seekable) - _ended = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ended) - _autoplay = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autoplay) - _loop = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.loop) - _controls = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.controls) - _volume = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.volume) - _muted = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.muted) - _defaultMuted = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultMuted) - _audioTracks = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.audioTracks) - _videoTracks = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.videoTracks) - _textTracks = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.textTracks) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var error: MediaError? - - @ReadWriteAttribute - public var src: String - - // XXX: member 'srcObject' is ignored - - @ReadonlyAttribute - public var currentSrc: String - - @ReadWriteAttribute - public var crossOrigin: String? - - public static let NETWORK_EMPTY: UInt16 = 0 - - public static let NETWORK_IDLE: UInt16 = 1 - - public static let NETWORK_LOADING: UInt16 = 2 - - public static let NETWORK_NO_SOURCE: UInt16 = 3 - - @ReadonlyAttribute - public var networkState: UInt16 - - @ReadWriteAttribute - public var preload: String - - @ReadonlyAttribute - public var buffered: TimeRanges - - @inlinable public func load() { - let this = jsObject - _ = this[HTMLStrings.load].function!(this: this, arguments: []) - } - - @inlinable public func canPlayType(type: String) -> CanPlayTypeResult { - let this = jsObject - return this[HTMLStrings.canPlayType].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - public static let HAVE_NOTHING: UInt16 = 0 - - public static let HAVE_METADATA: UInt16 = 1 - - public static let HAVE_CURRENT_DATA: UInt16 = 2 - - public static let HAVE_FUTURE_DATA: UInt16 = 3 - - public static let HAVE_ENOUGH_DATA: UInt16 = 4 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var seeking: Bool - - @ReadWriteAttribute - public var currentTime: Double - - @inlinable public func fastSeek(time: Double) { - let this = jsObject - _ = this[HTMLStrings.fastSeek].function!(this: this, arguments: [time.jsValue]) - } - - @ReadonlyAttribute - public var duration: Double - - @inlinable public func getStartDate() -> JSObject { - let this = jsObject - return this[HTMLStrings.getStartDate].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var paused: Bool - - @ReadWriteAttribute - public var defaultPlaybackRate: Double - - @ReadWriteAttribute - public var playbackRate: Double - - @ReadWriteAttribute - public var preservesPitch: Bool - - @ReadonlyAttribute - public var played: TimeRanges - - @ReadonlyAttribute - public var seekable: TimeRanges - - @ReadonlyAttribute - public var ended: Bool - - @ReadWriteAttribute - public var autoplay: Bool - - @ReadWriteAttribute - public var loop: Bool - - @inlinable public func play() -> JSPromise { - let this = jsObject - return this[HTMLStrings.play].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func play() async throws { - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.play].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func pause() { - let this = jsObject - _ = this[HTMLStrings.pause].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var controls: Bool - - @ReadWriteAttribute - public var volume: Double - - @ReadWriteAttribute - public var muted: Bool - - @ReadWriteAttribute - public var defaultMuted: Bool - - @ReadonlyAttribute - public var audioTracks: AudioTrackList - - @ReadonlyAttribute - public var videoTracks: VideoTrackList - - @ReadonlyAttribute - public var textTracks: TextTrackList - - @inlinable public func addTextTrack(kind: TextTrackKind, label: String? = nil, language: String? = nil) -> TextTrack { - let this = jsObject - return this[HTMLStrings.addTextTrack].function!(this: this, arguments: [kind.jsValue, label?.jsValue ?? .undefined, language?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class HTMLMenuElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMenuElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLMetaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMetaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _httpEquiv = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.httpEquiv) - _content = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.content) - _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) - _scheme = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scheme) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var httpEquiv: String - - @ReadWriteAttribute - public var content: String - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var scheme: String -} - -public class HTMLMeterElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLMeterElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _min = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.min) - _max = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.max) - _low = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.low) - _high = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.high) - _optimum = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.optimum) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Double - - @ReadWriteAttribute - public var min: Double - - @ReadWriteAttribute - public var max: Double - - @ReadWriteAttribute - public var low: Double - - @ReadWriteAttribute - public var high: Double - - @ReadWriteAttribute - public var optimum: Double - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLModElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLModElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cite = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cite) - _dateTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dateTime) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cite: String - - @ReadWriteAttribute - public var dateTime: String -} - -public class HTMLOListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _reversed = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.reversed) - _start = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.start) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var reversed: Bool - - @ReadWriteAttribute - public var start: Int32 - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLObjectElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLObjectElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.data) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.contentWindow) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _archive = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.archive) - _code = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.code) - _declare = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.declare) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hspace) - _standby = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.standby) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vspace) - _codeBase = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.codeBase) - _codeType = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.codeType) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.useMap) - _border = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.border) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var data: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[HTMLStrings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var archive: String - - @ReadWriteAttribute - public var code: String - - @ReadWriteAttribute - public var declare: Bool - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var standby: String - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var codeBase: String - - @ReadWriteAttribute - public var codeType: String - - @ReadWriteAttribute - public var useMap: String - - @ReadWriteAttribute - public var border: String -} - -public class HTMLOptGroupElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOptGroupElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _label = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.label) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadWriteAttribute - public var label: String -} - -public class HTMLOptionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOptionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _label = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.label) - _defaultSelected = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultSelected) - _selected = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selected) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) - _index = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.index) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var label: String - - @ReadWriteAttribute - public var defaultSelected: Bool - - @ReadWriteAttribute - public var selected: Bool - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var text: String - - @ReadonlyAttribute - public var index: Int32 -} - -public class HTMLOptionsCollection: HTMLCollection { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOptionsCollection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.length) - _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectedIndex) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var length: UInt32 - - // XXX: unsupported setter for keys of type UInt32 - - @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) - } - - @inlinable public func remove(index: Int32) { - let this = jsObject - _ = this[HTMLStrings.remove].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var selectedIndex: Int32 -} - -public protocol HTMLOrSVGElement: JSBridgedClass {} -public extension HTMLOrSVGElement { - @inlinable var dataset: DOMStringMap { ReadonlyAttribute[HTMLStrings.dataset, in: jsObject] } - - @inlinable var nonce: String { - get { ReadWriteAttribute[HTMLStrings.nonce, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.nonce, in: jsObject] = newValue } - } - - @inlinable var autofocus: Bool { - get { ReadWriteAttribute[HTMLStrings.autofocus, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.autofocus, in: jsObject] = newValue } - } - - @inlinable var tabIndex: Int32 { - get { ReadWriteAttribute[HTMLStrings.tabIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[HTMLStrings.tabIndex, in: jsObject] = newValue } - } - - @inlinable func focus(options: FocusOptions? = nil) { - let this = jsObject - _ = this[HTMLStrings.focus].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable func blur() { - let this = jsObject - _ = this[HTMLStrings.blur].function!(this: this, arguments: []) - } -} - -public class HTMLOutputElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLOutputElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _htmlFor = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.htmlFor) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var htmlFor: DOMTokenList - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLParagraphElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLParagraphElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLParamElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLParamElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _valueType = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.valueType) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var valueType: String -} - -public class HTMLPictureElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLPictureElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLPreElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLPreElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: Int32 -} - -public class HTMLProgressElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLProgressElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _max = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.max) - _position = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.position) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Double - - @ReadWriteAttribute - public var max: Double - - @ReadonlyAttribute - public var position: Double - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLQuoteElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLQuoteElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cite = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cite) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cite: String -} - -public class HTMLScriptElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLScriptElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _noModule = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noModule) - _async = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.async) - _defer = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defer) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.crossOrigin) - _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) - _integrity = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.integrity) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.referrerPolicy) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.blocking) - _charset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.charset) - _event = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.event) - _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.htmlFor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var noModule: Bool - - @ReadWriteAttribute - public var async: Bool - - @ReadWriteAttribute - public var `defer`: Bool - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @inlinable public static func supports(type: String) -> Bool { - let this = constructor - return this[HTMLStrings.supports].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var event: String - - @ReadWriteAttribute - public var htmlFor: String -} - -public class HTMLSelectElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSelectElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _multiple = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.multiple) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _required = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.required) - _size = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) - _options = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.options) - _length = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.length) - _selectedOptions = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.selectedOptions) - _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectedIndex) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var multiple: Bool - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var size: UInt32 - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var options: HTMLOptionsCollection - - @ReadWriteAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> HTMLOptionElement? { - jsObject[key].fromJSValue() - } - - @inlinable public func namedItem(name: String) -> HTMLOptionElement? { - let this = jsObject - return this[HTMLStrings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) - } - - @inlinable public func remove() { - let this = jsObject - _ = this[HTMLStrings.remove].function!(this: this, arguments: []) - } - - @inlinable public func remove(index: Int32) { - let this = jsObject - _ = this[HTMLStrings.remove].function!(this: this, arguments: [index.jsValue]) - } - - // XXX: unsupported setter for keys of type UInt32 - - @ReadonlyAttribute - public var selectedOptions: HTMLCollection - - @ReadWriteAttribute - public var selectedIndex: Int32 - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLSlotElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSlotElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @inlinable public func assignedNodes(options: AssignedNodesOptions? = nil) -> [Node] { - let this = jsObject - return this[HTMLStrings.assignedNodes].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func assignedElements(options: AssignedNodesOptions? = nil) -> [Element] { - let this = jsObject - return this[HTMLStrings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func assign(nodes: Element_or_Text...) { - let this = jsObject - _ = this[HTMLStrings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) - } -} - -public class HTMLSourceElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSourceElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - _srcset = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srcset) - _sizes = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.sizes) - _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var srcset: String - - @ReadWriteAttribute - public var sizes: String - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 -} - -public class HTMLSpanElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLSpanElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLStyleElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLStyleElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.media) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.blocking) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var media: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @ReadWriteAttribute - public var type: String -} - -public class HTMLTableCaptionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableCaptionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLTableCellElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableCellElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _colSpan = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.colSpan) - _rowSpan = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rowSpan) - _headers = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.headers) - _cellIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.cellIndex) - _scope = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scope) - _abbr = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.abbr) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _axis = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.axis) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) - _noWrap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.noWrap) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var colSpan: UInt32 - - @ReadWriteAttribute - public var rowSpan: UInt32 - - @ReadWriteAttribute - public var headers: String - - @ReadonlyAttribute - public var cellIndex: Int32 - - @ReadWriteAttribute - public var scope: String - - @ReadWriteAttribute - public var abbr: String - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var axis: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var noWrap: Bool - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var bgColor: String -} - -public class HTMLTableColElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableColElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _span = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.span) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var span: UInt32 - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var width: String -} - -public class HTMLTableElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _caption = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.caption) - _tHead = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.tHead) - _tFoot = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.tFoot) - _tBodies = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.tBodies) - _rows = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rows) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _border = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.border) - _frame = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.frame) - _rules = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rules) - _summary = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.summary) - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) - _cellPadding = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cellPadding) - _cellSpacing = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cellSpacing) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var caption: HTMLTableCaptionElement? - - @inlinable public func createCaption() -> HTMLTableCaptionElement { - let this = jsObject - return this[HTMLStrings.createCaption].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteCaption() { - let this = jsObject - _ = this[HTMLStrings.deleteCaption].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var tHead: HTMLTableSectionElement? - - @inlinable public func createTHead() -> HTMLTableSectionElement { - let this = jsObject - return this[HTMLStrings.createTHead].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteTHead() { - let this = jsObject - _ = this[HTMLStrings.deleteTHead].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var tFoot: HTMLTableSectionElement? - - @inlinable public func createTFoot() -> HTMLTableSectionElement { - let this = jsObject - return this[HTMLStrings.createTFoot].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteTFoot() { - let this = jsObject - _ = this[HTMLStrings.deleteTFoot].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var tBodies: HTMLCollection - - @inlinable public func createTBody() -> HTMLTableSectionElement { - let this = jsObject - return this[HTMLStrings.createTBody].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var rows: HTMLCollection - - @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { - let this = jsObject - return this[HTMLStrings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteRow(index: Int32) { - let this = jsObject - _ = this[HTMLStrings.deleteRow].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var border: String - - @ReadWriteAttribute - public var frame: String - - @ReadWriteAttribute - public var rules: String - - @ReadWriteAttribute - public var summary: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var cellPadding: String - - @ReadWriteAttribute - public var cellSpacing: String -} - -public class HTMLTableRowElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableRowElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _rowIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rowIndex) - _sectionRowIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.sectionRowIndex) - _cells = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.cells) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.bgColor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var rowIndex: Int32 - - @ReadonlyAttribute - public var sectionRowIndex: Int32 - - @ReadonlyAttribute - public var cells: HTMLCollection - - @inlinable public func insertCell(index: Int32? = nil) -> HTMLTableCellElement { - let this = jsObject - return this[HTMLStrings.insertCell].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteCell(index: Int32) { - let this = jsObject - _ = this[HTMLStrings.deleteCell].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var bgColor: String -} - -public class HTMLTableSectionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTableSectionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _rows = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rows) - _align = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.vAlign) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var rows: HTMLCollection - - @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { - let this = jsObject - return this[HTMLStrings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteRow(index: Int32) { - let this = jsObject - _ = this[HTMLStrings.deleteRow].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String -} - -public class HTMLTemplateElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTemplateElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _content = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.content) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var content: DocumentFragment -} - -public class HTMLTextAreaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTextAreaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.autocomplete) - _cols = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.cols) - _dirName = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dirName) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.form) - _maxLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.maxLength) - _minLength = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.minLength) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _placeholder = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.placeholder) - _readOnly = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.readOnly) - _required = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.required) - _rows = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.rows) - _wrap = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.wrap) - _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - _textLength = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.textLength) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.labels) - _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionStart) - _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionEnd) - _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selectionDirection) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var cols: UInt32 - - @ReadWriteAttribute - public var dirName: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var maxLength: Int32 - - @ReadWriteAttribute - public var minLength: Int32 - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var placeholder: String - - @ReadWriteAttribute - public var readOnly: Bool - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var rows: UInt32 - - @ReadWriteAttribute - public var wrap: String - - @ReadonlyAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var textLength: UInt32 - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[HTMLStrings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[HTMLStrings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList - - @inlinable public func select() { - let this = jsObject - _ = this[HTMLStrings.select].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var selectionStart: UInt32 - - @ReadWriteAttribute - public var selectionEnd: UInt32 - - @ReadWriteAttribute - public var selectionDirection: String - - @inlinable public func setRangeText(replacement: String) { - let this = jsObject - _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) - } - - @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { - let this = jsObject - _ = this[HTMLStrings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) - } - - @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { - let this = jsObject - _ = this[HTMLStrings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) - } -} - -public class HTMLTimeElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTimeElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _dateTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.dateTime) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var dateTime: String -} - -public class HTMLTitleElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTitleElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _text = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.text) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var text: String -} - -public class HTMLTrackElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLTrackElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.kind) - _src = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.src) - _srclang = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.srclang) - _label = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.label) - _default = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.default) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.readyState) - _track = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var kind: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srclang: String - - @ReadWriteAttribute - public var label: String - - @ReadWriteAttribute - public var `default`: Bool - - public static let NONE: UInt16 = 0 - - public static let LOADING: UInt16 = 1 - - public static let LOADED: UInt16 = 2 - - public static let ERROR: UInt16 = 3 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var track: TextTrack -} - -public class HTMLUListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLUListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.compact) - _type = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool - - @ReadWriteAttribute - public var type: String -} - -public class HTMLUnknownElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLUnknownElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class HTMLVideoElement: HTMLMediaElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HTMLVideoElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _videoWidth = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.videoWidth) - _videoHeight = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.videoHeight) - _poster = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.poster) - _playsInline = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.playsInline) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var videoWidth: UInt32 - - @ReadonlyAttribute - public var videoHeight: UInt32 - - @ReadWriteAttribute - public var poster: String - - @ReadWriteAttribute - public var playsInline: Bool -} - -public class HashChangeEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.HashChangeEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _oldURL = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.oldURL) - _newURL = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.newURL) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: HashChangeEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var oldURL: String - - @ReadonlyAttribute - public var newURL: String -} - -public class HashChangeEventInit: BridgedDictionary { - public convenience init(oldURL: String, newURL: String) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.oldURL] = oldURL.jsValue - object[HTMLStrings.newURL] = newURL.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _oldURL = ReadWriteAttribute(jsObject: object, name: HTMLStrings.oldURL) - _newURL = ReadWriteAttribute(jsObject: object, name: HTMLStrings.newURL) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var oldURL: String - - @ReadWriteAttribute - public var newURL: String -} - -public class History: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.History].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - _scrollRestoration = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.scrollRestoration) - _state = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.state) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @ReadWriteAttribute - public var scrollRestoration: ScrollRestoration - - @ReadonlyAttribute - public var state: JSValue - - @inlinable public func go(delta: Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.go].function!(this: this, arguments: [delta?.jsValue ?? .undefined]) - } - - @inlinable public func back() { - let this = jsObject - _ = this[HTMLStrings.back].function!(this: this, arguments: []) - } - - @inlinable public func forward() { - let this = jsObject - _ = this[HTMLStrings.forward].function!(this: this, arguments: []) - } - - @inlinable public func pushState(data: JSValue, unused: String, url: String? = nil) { - let this = jsObject - _ = this[HTMLStrings.pushState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) - } - - @inlinable public func replaceState(data: JSValue, unused: String, url: String? = nil) { - let this = jsObject - _ = this[HTMLStrings.replaceState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) - } -} - -public class ImageBitmap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ImageBitmap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.height) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var width: UInt32 - - @ReadonlyAttribute - public var height: UInt32 - - @inlinable public func close() { - let this = jsObject - _ = this[HTMLStrings.close].function!(this: this, arguments: []) - } -} - -public class ImageBitmapOptions: BridgedDictionary { - public convenience init(imageOrientation: ImageOrientation, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, resizeWidth: UInt32, resizeHeight: UInt32, resizeQuality: ResizeQuality) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.imageOrientation] = imageOrientation.jsValue - object[HTMLStrings.premultiplyAlpha] = premultiplyAlpha.jsValue - object[HTMLStrings.colorSpaceConversion] = colorSpaceConversion.jsValue - object[HTMLStrings.resizeWidth] = resizeWidth.jsValue - object[HTMLStrings.resizeHeight] = resizeHeight.jsValue - object[HTMLStrings.resizeQuality] = resizeQuality.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _imageOrientation = ReadWriteAttribute(jsObject: object, name: HTMLStrings.imageOrientation) - _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: HTMLStrings.premultiplyAlpha) - _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colorSpaceConversion) - _resizeWidth = ReadWriteAttribute(jsObject: object, name: HTMLStrings.resizeWidth) - _resizeHeight = ReadWriteAttribute(jsObject: object, name: HTMLStrings.resizeHeight) - _resizeQuality = ReadWriteAttribute(jsObject: object, name: HTMLStrings.resizeQuality) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var imageOrientation: ImageOrientation - - @ReadWriteAttribute - public var premultiplyAlpha: PremultiplyAlpha - - @ReadWriteAttribute - public var colorSpaceConversion: ColorSpaceConversion - - @ReadWriteAttribute - public var resizeWidth: UInt32 - - @ReadWriteAttribute - public var resizeHeight: UInt32 - - @ReadWriteAttribute - public var resizeQuality: ResizeQuality -} - -public class ImageBitmapRenderingContext: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ImageBitmapRenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.canvas) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var canvas: HTMLCanvasElement_or_OffscreenCanvas - - @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { - let this = jsObject - _ = this[HTMLStrings.transferFromImageBitmap].function!(this: this, arguments: [bitmap.jsValue]) - } -} - -public class ImageBitmapRenderingContextSettings: BridgedDictionary { - public convenience init(alpha: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.alpha] = alpha.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: HTMLStrings.alpha) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool -} - -public class ImageData: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ImageData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.height) - _data = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.data) - _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.colorSpace) - self.jsObject = jsObject - } - - @inlinable public convenience init(sw: UInt32, sh: UInt32, settings: ImageDataSettings? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(data: Uint8ClampedArray, sw: UInt32, sh: UInt32? = nil, settings: ImageDataSettings? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, sw.jsValue, sh?.jsValue ?? .undefined, settings?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var width: UInt32 - - @ReadonlyAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var data: Uint8ClampedArray - - @ReadonlyAttribute - public var colorSpace: PredefinedColorSpace -} - -public class ImageDataSettings: BridgedDictionary { - public convenience init(colorSpace: PredefinedColorSpace) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.colorSpace] = colorSpace.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _colorSpace = ReadWriteAttribute(jsObject: object, name: HTMLStrings.colorSpace) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace -} - -public class ImageEncodeOptions: BridgedDictionary { - public convenience init(type: String, quality: Double) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.type] = type.jsValue - object[HTMLStrings.quality] = quality.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: HTMLStrings.type) - _quality = ReadWriteAttribute(jsObject: object, name: HTMLStrings.quality) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var quality: Double -} - -public enum ImageOrientation: JSString, JSValueCompatible { - case none = "none" - case flipY = "flipY" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ImageSmoothingQuality: JSString, JSValueCompatible { - case low = "low" - case medium = "medium" - case high = "high" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Location: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Location].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.protocol) - _host = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.search) - _hash = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.hash) - _ancestorOrigins = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ancestorOrigins) - self.jsObject = jsObject - } - - @ReadWriteAttribute - public var href: String - - @ReadonlyAttribute - public var origin: String - - @ReadWriteAttribute - public var `protocol`: String - - @ReadWriteAttribute - public var host: String - - @ReadWriteAttribute - public var hostname: String - - @ReadWriteAttribute - public var port: String - - @ReadWriteAttribute - public var pathname: String - - @ReadWriteAttribute - public var search: String - - @ReadWriteAttribute - public var hash: String - - @inlinable public func assign(url: String) { - let this = jsObject - _ = this[HTMLStrings.assign].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public func replace(url: String) { - let this = jsObject - _ = this[HTMLStrings.replace].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public func reload() { - let this = jsObject - _ = this[HTMLStrings.reload].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var ancestorOrigins: DOMStringList -} - -public class MediaError: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MediaError].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _code = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.code) - _message = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.message) - self.jsObject = jsObject - } - - public static let MEDIA_ERR_ABORTED: UInt16 = 1 - - public static let MEDIA_ERR_NETWORK: UInt16 = 2 - - public static let MEDIA_ERR_DECODE: UInt16 = 3 - - public static let MEDIA_ERR_SRC_NOT_SUPPORTED: UInt16 = 4 - - @ReadonlyAttribute - public var code: UInt16 - - @ReadonlyAttribute - public var message: String -} - -public class MessageChannel: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MessageChannel].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _port1 = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.port1) - _port2 = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.port2) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var port1: MessagePort - - @ReadonlyAttribute - public var port2: MessagePort -} - -public class MessageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.MessageEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.data) - _origin = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.origin) - _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.lastEventId) - _source = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.source) - _ports = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ports) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: JSValue - - @ReadonlyAttribute - public var origin: String - - @ReadonlyAttribute - public var lastEventId: String - - @ReadonlyAttribute - public var source: MessageEventSource? - - @ReadonlyAttribute - public var ports: [MessagePort] - - @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = data?.jsValue ?? .undefined - let _arg4 = origin?.jsValue ?? .undefined - let _arg5 = lastEventId?.jsValue ?? .undefined - let _arg6 = source?.jsValue ?? .undefined - let _arg7 = ports?.jsValue ?? .undefined - let this = jsObject - _ = this[HTMLStrings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public class MessageEventInit: BridgedDictionary { - public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.data] = data.jsValue - object[HTMLStrings.origin] = origin.jsValue - object[HTMLStrings.lastEventId] = lastEventId.jsValue - object[HTMLStrings.source] = source.jsValue - object[HTMLStrings.ports] = ports.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: HTMLStrings.data) - _origin = ReadWriteAttribute(jsObject: object, name: HTMLStrings.origin) - _lastEventId = ReadWriteAttribute(jsObject: object, name: HTMLStrings.lastEventId) - _source = ReadWriteAttribute(jsObject: object, name: HTMLStrings.source) - _ports = ReadWriteAttribute(jsObject: object, name: HTMLStrings.ports) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: JSValue - - @ReadWriteAttribute - public var origin: String - - @ReadWriteAttribute - public var lastEventId: String - - @ReadWriteAttribute - public var source: MessageEventSource? - - @ReadWriteAttribute - public var ports: [MessagePort] -} - -public class MessagePort: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.MessagePort].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func start() { - let this = jsObject - _ = this[HTMLStrings.start].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[HTMLStrings.close].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public class MimeType: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MimeType].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.type) - _description = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.description) - _suffixes = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.suffixes) - _enabledPlugin = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.enabledPlugin) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var description: String - - @ReadonlyAttribute - public var suffixes: String - - @ReadonlyAttribute - public var enabledPlugin: Plugin -} - -public class MimeTypeArray: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.MimeTypeArray].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> MimeType? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> MimeType? { - jsObject[key].fromJSValue() - } -} - -public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Navigator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} - -public protocol NavigatorConcurrentHardware: JSBridgedClass {} -public extension NavigatorConcurrentHardware { - @inlinable var hardwareConcurrency: UInt64 { ReadonlyAttribute[HTMLStrings.hardwareConcurrency, in: jsObject] } -} - -public protocol NavigatorContentUtils: JSBridgedClass {} -public extension NavigatorContentUtils { - @inlinable func registerProtocolHandler(scheme: String, url: String) { - let this = jsObject - _ = this[HTMLStrings.registerProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) - } - - @inlinable func unregisterProtocolHandler(scheme: String, url: String) { - let this = jsObject - _ = this[HTMLStrings.unregisterProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) - } -} - -public protocol NavigatorCookies: JSBridgedClass {} -public extension NavigatorCookies { - @inlinable var cookieEnabled: Bool { ReadonlyAttribute[HTMLStrings.cookieEnabled, in: jsObject] } -} - -public protocol NavigatorID: JSBridgedClass {} -public extension NavigatorID { - @inlinable var appCodeName: String { ReadonlyAttribute[HTMLStrings.appCodeName, in: jsObject] } - - @inlinable var appName: String { ReadonlyAttribute[HTMLStrings.appName, in: jsObject] } - - @inlinable var appVersion: String { ReadonlyAttribute[HTMLStrings.appVersion, in: jsObject] } - - @inlinable var platform: String { ReadonlyAttribute[HTMLStrings.platform, in: jsObject] } - - @inlinable var product: String { ReadonlyAttribute[HTMLStrings.product, in: jsObject] } - - @inlinable var productSub: String { ReadonlyAttribute[HTMLStrings.productSub, in: jsObject] } - - @inlinable var userAgent: String { ReadonlyAttribute[HTMLStrings.userAgent, in: jsObject] } - - @inlinable var vendor: String { ReadonlyAttribute[HTMLStrings.vendor, in: jsObject] } - - @inlinable var vendorSub: String { ReadonlyAttribute[HTMLStrings.vendorSub, in: jsObject] } - - @inlinable func taintEnabled() -> Bool { - let this = jsObject - return this[HTMLStrings.taintEnabled].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var oscpu: String { ReadonlyAttribute[HTMLStrings.oscpu, in: jsObject] } -} - -public protocol NavigatorLanguage: JSBridgedClass {} -public extension NavigatorLanguage { - @inlinable var language: String { ReadonlyAttribute[HTMLStrings.language, in: jsObject] } - - @inlinable var languages: [String] { ReadonlyAttribute[HTMLStrings.languages, in: jsObject] } -} - -public protocol NavigatorOnLine: JSBridgedClass {} -public extension NavigatorOnLine { - @inlinable var onLine: Bool { ReadonlyAttribute[HTMLStrings.onLine, in: jsObject] } -} - -public protocol NavigatorPlugins: JSBridgedClass {} -public extension NavigatorPlugins { - @inlinable var plugins: PluginArray { ReadonlyAttribute[HTMLStrings.plugins, in: jsObject] } - - @inlinable var mimeTypes: MimeTypeArray { ReadonlyAttribute[HTMLStrings.mimeTypes, in: jsObject] } - - @inlinable func javaEnabled() -> Bool { - let this = jsObject - return this[HTMLStrings.javaEnabled].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var pdfViewerEnabled: Bool { ReadonlyAttribute[HTMLStrings.pdfViewerEnabled, in: jsObject] } -} - -public class OffscreenCanvas: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.OffscreenCanvas].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.height) - _oncontextlost = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.oncontextlost) - _oncontextrestored = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.oncontextrestored) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(width: UInt64, height: UInt64) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [width.jsValue, height.jsValue])) - } - - @ReadWriteAttribute - public var width: UInt64 - - @ReadWriteAttribute - public var height: UInt64 - - @inlinable public func getContext(contextId: OffscreenRenderingContextId, options: JSValue? = nil) -> OffscreenRenderingContext? { - let this = jsObject - return this[HTMLStrings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func transferToImageBitmap() -> ImageBitmap { - let this = jsObject - return this[HTMLStrings.transferToImageBitmap].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise { - let this = jsObject - return this[HTMLStrings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob { - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @ClosureAttribute1Optional - public var oncontextlost: EventHandler - - @ClosureAttribute1Optional - public var oncontextrestored: EventHandler -} - -public class OffscreenCanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.OffscreenCanvasRenderingContext2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.canvas) - self.jsObject = jsObject - } - - @inlinable public func commit() { - let this = jsObject - _ = this[HTMLStrings.commit].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var canvas: OffscreenCanvas -} - -public enum OffscreenRenderingContextId: JSString, JSValueCompatible { - case _2d = "2d" - case bitmaprenderer = "bitmaprenderer" - case webgl = "webgl" - case webgl2 = "webgl2" - case webgpu = "webgpu" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class PageTransitionEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.PageTransitionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _persisted = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.persisted) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PageTransitionEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var persisted: Bool -} - -public class PageTransitionEventInit: BridgedDictionary { - public convenience init(persisted: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.persisted] = persisted.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _persisted = ReadWriteAttribute(jsObject: object, name: HTMLStrings.persisted) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var persisted: Bool -} - -public class Path2D: JSBridgedClass, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Path2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(path: Path2D_or_String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) - } - - @inlinable public func addPath(path: Path2D, transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[HTMLStrings.addPath].function!(this: this, arguments: [path.jsValue, transform?.jsValue ?? .undefined]) - } -} - -public class Plugin: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Plugin].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.name) - _description = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.description) - _filename = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.filename) - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var description: String - - @ReadonlyAttribute - public var filename: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> MimeType? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> MimeType? { - jsObject[key].fromJSValue() - } -} - -public class PluginArray: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.PluginArray].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @inlinable public func refresh() { - let this = jsObject - _ = this[HTMLStrings.refresh].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Plugin? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Plugin? { - jsObject[key].fromJSValue() - } -} - -public class PopStateEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.PopStateEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.state) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PopStateEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var state: JSValue -} - -public class PopStateEventInit: BridgedDictionary { - public convenience init(state: JSValue) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.state] = state.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _state = ReadWriteAttribute(jsObject: object, name: HTMLStrings.state) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var state: JSValue -} - -public enum PredefinedColorSpace: JSString, JSValueCompatible { - case srgb = "srgb" - case displayP3 = "display-p3" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum PremultiplyAlpha: JSString, JSValueCompatible { - case none = "none" - case premultiply = "premultiply" - case `default` = "default" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class PromiseRejectionEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.PromiseRejectionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _promise = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.promise) - _reason = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.reason) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PromiseRejectionEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var promise: JSPromise - - @ReadonlyAttribute - public var reason: JSValue -} - -public class PromiseRejectionEventInit: BridgedDictionary { - public convenience init(promise: JSPromise, reason: JSValue) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.promise] = promise.jsValue - object[HTMLStrings.reason] = reason.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _promise = ReadWriteAttribute(jsObject: object, name: HTMLStrings.promise) - _reason = ReadWriteAttribute(jsObject: object, name: HTMLStrings.reason) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var promise: JSPromise - - @ReadWriteAttribute - public var reason: JSValue -} - -public class RadioNodeList: NodeList { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.RadioNodeList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.value) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var value: String -} - -public enum ResizeQuality: JSString, JSValueCompatible { - case pixelated = "pixelated" - case low = "low" - case medium = "medium" - case high = "high" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ScrollRestoration: JSString, JSValueCompatible { - case auto = "auto" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum SelectionMode: JSString, JSValueCompatible { - case select = "select" - case start = "start" - case end = "end" - case preserve = "preserve" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class SharedWorker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.SharedWorker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _port = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.port) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(scriptURL: String, options: String_or_WorkerOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var port: MessagePort -} - -public class Storage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Storage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func key(index: UInt32) -> String? { - let this = jsObject - return this[HTMLStrings.key].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } - - @inlinable public subscript(key: String) -> String? { - jsObject[key].fromJSValue() - } - - // XXX: unsupported setter for keys of type String - - // XXX: unsupported deleter for keys of type String - - @inlinable public func clear() { - let this = jsObject - _ = this[HTMLStrings.clear].function!(this: this, arguments: []) - } -} - -public class StorageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.StorageEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _key = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.key) - _oldValue = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.oldValue) - _newValue = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.newValue) - _url = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.url) - _storageArea = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.storageArea) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: StorageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var key: String? - - @ReadonlyAttribute - public var oldValue: String? - - @ReadonlyAttribute - public var newValue: String? - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var storageArea: Storage? - - @inlinable public func initStorageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, key: String? = nil, oldValue: String? = nil, newValue: String? = nil, url: String? = nil, storageArea: Storage? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = key?.jsValue ?? .undefined - let _arg4 = oldValue?.jsValue ?? .undefined - let _arg5 = newValue?.jsValue ?? .undefined - let _arg6 = url?.jsValue ?? .undefined - let _arg7 = storageArea?.jsValue ?? .undefined - let this = jsObject - _ = this[HTMLStrings.initStorageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public class StorageEventInit: BridgedDictionary { - public convenience init(key: String?, oldValue: String?, newValue: String?, url: String, storageArea: Storage?) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.key] = key.jsValue - object[HTMLStrings.oldValue] = oldValue.jsValue - object[HTMLStrings.newValue] = newValue.jsValue - object[HTMLStrings.url] = url.jsValue - object[HTMLStrings.storageArea] = storageArea.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _key = ReadWriteAttribute(jsObject: object, name: HTMLStrings.key) - _oldValue = ReadWriteAttribute(jsObject: object, name: HTMLStrings.oldValue) - _newValue = ReadWriteAttribute(jsObject: object, name: HTMLStrings.newValue) - _url = ReadWriteAttribute(jsObject: object, name: HTMLStrings.url) - _storageArea = ReadWriteAttribute(jsObject: object, name: HTMLStrings.storageArea) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var key: String? - - @ReadWriteAttribute - public var oldValue: String? - - @ReadWriteAttribute - public var newValue: String? - - @ReadWriteAttribute - public var url: String - - @ReadWriteAttribute - public var storageArea: Storage? -} - -public class StructuredSerializeOptions: BridgedDictionary { - public convenience init(transfer: [JSObject]) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.transfer] = transfer.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _transfer = ReadWriteAttribute(jsObject: object, name: HTMLStrings.transfer) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var transfer: [JSObject] -} - -public class SubmitEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.SubmitEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _submitter = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.submitter) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: SubmitEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var submitter: HTMLElement? -} - -public class SubmitEventInit: BridgedDictionary { - public convenience init(submitter: HTMLElement?) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.submitter] = submitter.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _submitter = ReadWriteAttribute(jsObject: object, name: HTMLStrings.submitter) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var submitter: HTMLElement? -} - -public class TextMetrics: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextMetrics].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.width) - _actualBoundingBoxLeft = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxLeft) - _actualBoundingBoxRight = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxRight) - _fontBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.fontBoundingBoxAscent) - _fontBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.fontBoundingBoxDescent) - _actualBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxAscent) - _actualBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.actualBoundingBoxDescent) - _emHeightAscent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.emHeightAscent) - _emHeightDescent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.emHeightDescent) - _hangingBaseline = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.hangingBaseline) - _alphabeticBaseline = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.alphabeticBaseline) - _ideographicBaseline = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.ideographicBaseline) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var width: Double - - @ReadonlyAttribute - public var actualBoundingBoxLeft: Double - - @ReadonlyAttribute - public var actualBoundingBoxRight: Double - - @ReadonlyAttribute - public var fontBoundingBoxAscent: Double - - @ReadonlyAttribute - public var fontBoundingBoxDescent: Double - - @ReadonlyAttribute - public var actualBoundingBoxAscent: Double - - @ReadonlyAttribute - public var actualBoundingBoxDescent: Double - - @ReadonlyAttribute - public var emHeightAscent: Double - - @ReadonlyAttribute - public var emHeightDescent: Double - - @ReadonlyAttribute - public var hangingBaseline: Double - - @ReadonlyAttribute - public var alphabeticBaseline: Double - - @ReadonlyAttribute - public var ideographicBaseline: Double -} - -public class TextTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.language) - _id = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.id) - _inBandMetadataTrackDispatchType = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.inBandMetadataTrackDispatchType) - _mode = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.mode) - _cues = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.cues) - _activeCues = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.activeCues) - _oncuechange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.oncuechange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var kind: TextTrackKind - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var inBandMetadataTrackDispatchType: String - - @ReadWriteAttribute - public var mode: TextTrackMode - - @ReadonlyAttribute - public var cues: TextTrackCueList? - - @ReadonlyAttribute - public var activeCues: TextTrackCueList? - - @inlinable public func addCue(cue: TextTrackCue) { - let this = jsObject - _ = this[HTMLStrings.addCue].function!(this: this, arguments: [cue.jsValue]) - } - - @inlinable public func removeCue(cue: TextTrackCue) { - let this = jsObject - _ = this[HTMLStrings.removeCue].function!(this: this, arguments: [cue.jsValue]) - } - - @ClosureAttribute1Optional - public var oncuechange: EventHandler -} - -public class TextTrackCue: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrackCue].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.track) - _id = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.id) - _startTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.startTime) - _endTime = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.endTime) - _pauseOnExit = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.pauseOnExit) - _onenter = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onenter) - _onexit = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onexit) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var track: TextTrack? - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var startTime: Double - - @ReadWriteAttribute - public var endTime: Double - - @ReadWriteAttribute - public var pauseOnExit: Bool - - @ClosureAttribute1Optional - public var onenter: EventHandler - - @ClosureAttribute1Optional - public var onexit: EventHandler -} - -public class TextTrackCueList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrackCueList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> TextTrackCue { - jsObject[key].fromJSValue()! - } - - @inlinable public func getCueById(id: String) -> TextTrackCue? { - let this = jsObject - return this[HTMLStrings.getCueById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } -} - -public enum TextTrackKind: JSString, JSValueCompatible { - case subtitles = "subtitles" - case captions = "captions" - case descriptions = "descriptions" - case chapters = "chapters" - case metadata = "metadata" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class TextTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TextTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> TextTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> TextTrack? { - let this = jsObject - return this[HTMLStrings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public enum TextTrackMode: JSString, JSValueCompatible { - case disabled = "disabled" - case hidden = "hidden" - case showing = "showing" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class TimeRanges: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.TimeRanges].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func start(index: UInt32) -> Double { - let this = jsObject - return this[HTMLStrings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } - - @inlinable public func end(index: UInt32) -> Double { - let this = jsObject - return this[HTMLStrings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } -} - -public class TrackEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.TrackEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? -} - -public class TrackEventInit: BridgedDictionary { - public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.track] = track.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _track = ReadWriteAttribute(jsObject: object, name: HTMLStrings.track) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? -} - -public typealias CanvasFilterInput = [String: JSValue] - -public typealias EventHandler = EventHandlerNonNull? -public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? -public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? - -public typealias BlobCallback = (Blob?) -> Void -public typealias FunctionStringCallback = (String) -> Void -public typealias EventHandlerNonNull = (Event) -> JSValue -public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue -public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? -public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void -public class ValidityState: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.ValidityState].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.valueMissing) - _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.typeMismatch) - _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.patternMismatch) - _tooLong = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.tooLong) - _tooShort = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.tooShort) - _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rangeUnderflow) - _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.rangeOverflow) - _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.stepMismatch) - _badInput = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.badInput) - _customError = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.customError) - _valid = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.valid) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var valueMissing: Bool - - @ReadonlyAttribute - public var typeMismatch: Bool - - @ReadonlyAttribute - public var patternMismatch: Bool - - @ReadonlyAttribute - public var tooLong: Bool - - @ReadonlyAttribute - public var tooShort: Bool - - @ReadonlyAttribute - public var rangeUnderflow: Bool - - @ReadonlyAttribute - public var rangeOverflow: Bool - - @ReadonlyAttribute - public var stepMismatch: Bool - - @ReadonlyAttribute - public var badInput: Bool - - @ReadonlyAttribute - public var customError: Bool - - @ReadonlyAttribute - public var valid: Bool -} - -public class ValidityStateFlags: BridgedDictionary { - public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.valueMissing] = valueMissing.jsValue - object[HTMLStrings.typeMismatch] = typeMismatch.jsValue - object[HTMLStrings.patternMismatch] = patternMismatch.jsValue - object[HTMLStrings.tooLong] = tooLong.jsValue - object[HTMLStrings.tooShort] = tooShort.jsValue - object[HTMLStrings.rangeUnderflow] = rangeUnderflow.jsValue - object[HTMLStrings.rangeOverflow] = rangeOverflow.jsValue - object[HTMLStrings.stepMismatch] = stepMismatch.jsValue - object[HTMLStrings.badInput] = badInput.jsValue - object[HTMLStrings.customError] = customError.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _valueMissing = ReadWriteAttribute(jsObject: object, name: HTMLStrings.valueMissing) - _typeMismatch = ReadWriteAttribute(jsObject: object, name: HTMLStrings.typeMismatch) - _patternMismatch = ReadWriteAttribute(jsObject: object, name: HTMLStrings.patternMismatch) - _tooLong = ReadWriteAttribute(jsObject: object, name: HTMLStrings.tooLong) - _tooShort = ReadWriteAttribute(jsObject: object, name: HTMLStrings.tooShort) - _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: HTMLStrings.rangeUnderflow) - _rangeOverflow = ReadWriteAttribute(jsObject: object, name: HTMLStrings.rangeOverflow) - _stepMismatch = ReadWriteAttribute(jsObject: object, name: HTMLStrings.stepMismatch) - _badInput = ReadWriteAttribute(jsObject: object, name: HTMLStrings.badInput) - _customError = ReadWriteAttribute(jsObject: object, name: HTMLStrings.customError) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var valueMissing: Bool - - @ReadWriteAttribute - public var typeMismatch: Bool - - @ReadWriteAttribute - public var patternMismatch: Bool - - @ReadWriteAttribute - public var tooLong: Bool - - @ReadWriteAttribute - public var tooShort: Bool - - @ReadWriteAttribute - public var rangeUnderflow: Bool - - @ReadWriteAttribute - public var rangeOverflow: Bool - - @ReadWriteAttribute - public var stepMismatch: Bool - - @ReadWriteAttribute - public var badInput: Bool - - @ReadWriteAttribute - public var customError: Bool -} - -public class VideoTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.VideoTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.language) - _selected = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.selected) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var selected: Bool -} - -public class VideoTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.VideoTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.selectedIndex) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> VideoTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> VideoTrack? { - let this = jsObject - return this[HTMLStrings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.Window].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _window = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.window) - _self = ReadonlyAttribute(jsObject: jsObject, name: Strings._self) - _document = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.document) - _name = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.name) - _location = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.location) - _history = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.history) - _customElements = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.customElements) - _locationbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.locationbar) - _menubar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.menubar) - _personalbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.personalbar) - _scrollbars = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.scrollbars) - _statusbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.statusbar) - _toolbar = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.toolbar) - _status = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.status) - _closed = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.closed) - _frames = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.frames) - _length = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.length) - _top = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.top) - _opener = ReadWriteAttribute(jsObject: jsObject, name: HTMLStrings.opener) - _parent = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.parent) - _frameElement = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.frameElement) - _navigator = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.navigator) - _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.clientInformation) - _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.originAgentCluster) - _external = ReadonlyAttribute(jsObject: jsObject, name: HTMLStrings.external) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var window: WindowProxy - - @ReadonlyAttribute - public var `self`: WindowProxy - - @ReadonlyAttribute - public var document: Document - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var location: Location - - @ReadonlyAttribute - public var history: History - - @ReadonlyAttribute - public var customElements: CustomElementRegistry - - @ReadonlyAttribute - public var locationbar: BarProp - - @ReadonlyAttribute - public var menubar: BarProp - - @ReadonlyAttribute - public var personalbar: BarProp - - @ReadonlyAttribute - public var scrollbars: BarProp - - @ReadonlyAttribute - public var statusbar: BarProp - - @ReadonlyAttribute - public var toolbar: BarProp - - @ReadWriteAttribute - public var status: String - - @inlinable public func close() { - let this = jsObject - _ = this[HTMLStrings.close].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var closed: Bool - - @inlinable public func stop() { - let this = jsObject - _ = this[HTMLStrings.stop].function!(this: this, arguments: []) - } - - @inlinable public func focus() { - let this = jsObject - _ = this[HTMLStrings.focus].function!(this: this, arguments: []) - } - - @inlinable public func blur() { - let this = jsObject - _ = this[HTMLStrings.blur].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var frames: WindowProxy - - @ReadonlyAttribute - public var length: UInt32 - - @ReadonlyAttribute - public var top: WindowProxy? - - @ReadWriteAttribute - public var opener: JSValue - - @ReadonlyAttribute - public var parent: WindowProxy? - - @ReadonlyAttribute - public var frameElement: Element? - - @inlinable public func open(url: String? = nil, target: String? = nil, features: String? = nil) -> WindowProxy? { - let this = jsObject - return this[HTMLStrings.open].function!(this: this, arguments: [url?.jsValue ?? .undefined, target?.jsValue ?? .undefined, features?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public subscript(key: String) -> JSObject { - jsObject[key].fromJSValue()! - } - - @ReadonlyAttribute - public var navigator: Navigator - - @ReadonlyAttribute - public var clientInformation: Navigator - - @ReadonlyAttribute - public var originAgentCluster: Bool - - @inlinable public func alert() { - let this = jsObject - _ = this[HTMLStrings.alert].function!(this: this, arguments: []) - } - - @inlinable public func alert(message: String) { - let this = jsObject - _ = this[HTMLStrings.alert].function!(this: this, arguments: [message.jsValue]) - } - - @inlinable public func confirm(message: String? = nil) -> Bool { - let this = jsObject - return this[HTMLStrings.confirm].function!(this: this, arguments: [message?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func prompt(message: String? = nil, default: String? = nil) -> String? { - let this = jsObject - return this[HTMLStrings.prompt].function!(this: this, arguments: [message?.jsValue ?? .undefined, `default`?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func print() { - let this = jsObject - _ = this[HTMLStrings.print].function!(this: this, arguments: []) - } - - @inlinable public func postMessage(message: JSValue, targetOrigin: String, transfer: [JSObject]? = nil) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, targetOrigin.jsValue, transfer?.jsValue ?? .undefined]) - } - - @inlinable public func postMessage(message: JSValue, options: WindowPostMessageOptions? = nil) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func captureEvents() { - let this = jsObject - _ = this[HTMLStrings.captureEvents].function!(this: this, arguments: []) - } - - @inlinable public func releaseEvents() { - let this = jsObject - _ = this[HTMLStrings.releaseEvents].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var external: External -} - -public protocol WindowEventHandlers: JSBridgedClass {} -public extension WindowEventHandlers { - @inlinable var onafterprint: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onafterprint, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onafterprint, in: jsObject] = newValue } - } - - @inlinable var onbeforeprint: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onbeforeprint, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onbeforeprint, in: jsObject] = newValue } - } - - @inlinable var onbeforeunload: OnBeforeUnloadEventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onbeforeunload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onbeforeunload, in: jsObject] = newValue } - } - - @inlinable var onhashchange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onhashchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onhashchange, in: jsObject] = newValue } - } - - @inlinable var onlanguagechange: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onlanguagechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onlanguagechange, in: jsObject] = newValue } - } - - @inlinable var onmessage: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmessage, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmessage, in: jsObject] = newValue } - } - - @inlinable var onmessageerror: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onmessageerror, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onmessageerror, in: jsObject] = newValue } - } - - @inlinable var onoffline: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onoffline, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onoffline, in: jsObject] = newValue } - } - - @inlinable var ononline: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.ononline, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.ononline, in: jsObject] = newValue } - } - - @inlinable var onpagehide: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onpagehide, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpagehide, in: jsObject] = newValue } - } - - @inlinable var onpageshow: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onpageshow, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpageshow, in: jsObject] = newValue } - } - - @inlinable var onpopstate: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onpopstate, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onpopstate, in: jsObject] = newValue } - } - - @inlinable var onrejectionhandled: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onrejectionhandled, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onrejectionhandled, in: jsObject] = newValue } - } - - @inlinable var onstorage: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onstorage, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onstorage, in: jsObject] = newValue } - } - - @inlinable var onunhandledrejection: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onunhandledrejection, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onunhandledrejection, in: jsObject] = newValue } - } - - @inlinable var onunload: EventHandler { - get { ClosureAttribute1Optional[HTMLStrings.onunload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[HTMLStrings.onunload, in: jsObject] = newValue } - } -} - -public protocol WindowLocalStorage: JSBridgedClass {} -public extension WindowLocalStorage { - @inlinable var localStorage: Storage { ReadonlyAttribute[HTMLStrings.localStorage, in: jsObject] } -} - -public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} -public extension WindowOrWorkerGlobalScope { - @inlinable var origin: String { ReadonlyAttribute[HTMLStrings.origin, in: jsObject] } - - @inlinable var isSecureContext: Bool { ReadonlyAttribute[HTMLStrings.isSecureContext, in: jsObject] } - - @inlinable var crossOriginIsolated: Bool { ReadonlyAttribute[HTMLStrings.crossOriginIsolated, in: jsObject] } - - @inlinable func reportError(e: JSValue) { - let this = jsObject - _ = this[HTMLStrings.reportError].function!(this: this, arguments: [e.jsValue]) - } - - @inlinable func btoa(data: String) -> String { - let this = jsObject - return this[HTMLStrings.btoa].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable func atob(data: String) -> String { - let this = jsObject - return this[HTMLStrings.atob].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable func setTimeout(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { - let this = jsObject - return this[HTMLStrings.setTimeout].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! - } - - @inlinable func clearTimeout(id: Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.clearTimeout].function!(this: this, arguments: [id?.jsValue ?? .undefined]) - } - - @inlinable func setInterval(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { - let this = jsObject - return this[HTMLStrings.setInterval].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! - } - - @inlinable func clearInterval(id: Int32? = nil) { - let this = jsObject - _ = this[HTMLStrings.clearInterval].function!(this: this, arguments: [id?.jsValue ?? .undefined]) - } - - // XXX: method 'queueMicrotask' is ignored - - @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) -> JSPromise { - let this = jsObject - return this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) -> JSPromise { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = options?.jsValue ?? .undefined - let this = jsObject - return this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = options?.jsValue ?? .undefined - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func structuredClone(value: JSValue, options: StructuredSerializeOptions? = nil) -> JSValue { - let this = jsObject - return this[HTMLStrings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class WindowPostMessageOptions: BridgedDictionary { - public convenience init(targetOrigin: String) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.targetOrigin] = targetOrigin.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _targetOrigin = ReadWriteAttribute(jsObject: object, name: HTMLStrings.targetOrigin) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var targetOrigin: String -} - -public protocol WindowSessionStorage: JSBridgedClass {} -public extension WindowSessionStorage { - @inlinable var sessionStorage: Storage { ReadonlyAttribute[HTMLStrings.sessionStorage, in: jsObject] } -} - -public class Worker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[HTMLStrings.Worker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: HTMLStrings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(scriptURL: String, options: WorkerOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) - } - - @inlinable public func terminate() { - let this = jsObject - _ = this[HTMLStrings.terminate].function!(this: this, arguments: []) - } - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[HTMLStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public class WorkerOptions: BridgedDictionary { - public convenience init(type: WorkerType, credentials: RequestCredentials, name: String) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.type] = type.jsValue - object[HTMLStrings.credentials] = credentials.jsValue - object[HTMLStrings.name] = name.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: HTMLStrings.type) - _credentials = ReadWriteAttribute(jsObject: object, name: HTMLStrings.credentials) - _name = ReadWriteAttribute(jsObject: object, name: HTMLStrings.name) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: WorkerType - - @ReadWriteAttribute - public var credentials: RequestCredentials - - @ReadWriteAttribute - public var name: String -} - -public enum WorkerType: JSString, JSValueCompatible { - case classic = "classic" - case module = "module" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Worklet: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[HTMLStrings.Worklet].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) -> JSPromise { - let this = jsObject - return this[HTMLStrings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[HTMLStrings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} - -public class WorkletOptions: BridgedDictionary { - public convenience init(credentials: RequestCredentials) { - let object = JSObject.global[HTMLStrings.Object].function!.new() - object[HTMLStrings.credentials] = credentials.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _credentials = ReadWriteAttribute(jsObject: object, name: HTMLStrings.credentials) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var credentials: RequestCredentials -} - -/* variadic generics please */ -@propertyWrapper public final class ClosureAttribute1 - where A0: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0) -> ReturnType { - get { ClosureAttribute1[name, in: jsObject] } - set { ClosureAttribute1[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!).jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute1Optional - where A0: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0) -> ReturnType)? { - get { ClosureAttribute1Optional[name, in: jsObject] } - set { ClosureAttribute1Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute1OptionalVoid - where A0: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0) -> Void)? { - get { ClosureAttribute1OptionalVoid[name, in: jsObject] } - set { ClosureAttribute1OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue) } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!) - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute1Void - where A0: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0) -> Void { - get { ClosureAttribute1Void[name, in: jsObject] } - set { ClosureAttribute1Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> Void { - get { - let function = jsObject[name].function! - return { function($0.jsValue) } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!) - return .undefined - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute5 - where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0, A1, A2, A3, A4) -> ReturnType { - get { ClosureAttribute5[name, in: jsObject] } - set { ClosureAttribute5[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1, A2, A3, A4) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute5Optional - where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0, A1, A2, A3, A4) -> ReturnType)? { - get { ClosureAttribute5Optional[name, in: jsObject] } - set { ClosureAttribute5Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1, A2, A3, A4) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@usableFromInline enum HTMLStrings { - static let _self: JSString = "self" - @usableFromInline static let AddSearchProvider: JSString = "AddSearchProvider" - @usableFromInline static let AudioTrack: JSString = "AudioTrack" - @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" - @usableFromInline static let BarProp: JSString = "BarProp" - @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" - @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" - @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" - @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" - @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" - @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" - @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" - @usableFromInline static let DOMParser: JSString = "DOMParser" - @usableFromInline static let DOMStringList: JSString = "DOMStringList" - @usableFromInline static let DOMStringMap: JSString = "DOMStringMap" - @usableFromInline static let DataTransfer: JSString = "DataTransfer" - @usableFromInline static let DataTransferItem: JSString = "DataTransferItem" - @usableFromInline static let DataTransferItemList: JSString = "DataTransferItemList" - @usableFromInline static let DragEvent: JSString = "DragEvent" - @usableFromInline static let ElementInternals: JSString = "ElementInternals" - @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" - @usableFromInline static let EventSource: JSString = "EventSource" - @usableFromInline static let External: JSString = "External" - @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" - @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" - @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" - @usableFromInline static let HTMLAreaElement: JSString = "HTMLAreaElement" - @usableFromInline static let HTMLAudioElement: JSString = "HTMLAudioElement" - @usableFromInline static let HTMLBRElement: JSString = "HTMLBRElement" - @usableFromInline static let HTMLBaseElement: JSString = "HTMLBaseElement" - @usableFromInline static let HTMLBodyElement: JSString = "HTMLBodyElement" - @usableFromInline static let HTMLButtonElement: JSString = "HTMLButtonElement" - @usableFromInline static let HTMLCanvasElement: JSString = "HTMLCanvasElement" - @usableFromInline static let HTMLDListElement: JSString = "HTMLDListElement" - @usableFromInline static let HTMLDataElement: JSString = "HTMLDataElement" - @usableFromInline static let HTMLDataListElement: JSString = "HTMLDataListElement" - @usableFromInline static let HTMLDetailsElement: JSString = "HTMLDetailsElement" - @usableFromInline static let HTMLDialogElement: JSString = "HTMLDialogElement" - @usableFromInline static let HTMLDirectoryElement: JSString = "HTMLDirectoryElement" - @usableFromInline static let HTMLDivElement: JSString = "HTMLDivElement" - @usableFromInline static let HTMLElement: JSString = "HTMLElement" - @usableFromInline static let HTMLEmbedElement: JSString = "HTMLEmbedElement" - @usableFromInline static let HTMLFieldSetElement: JSString = "HTMLFieldSetElement" - @usableFromInline static let HTMLFontElement: JSString = "HTMLFontElement" - @usableFromInline static let HTMLFormControlsCollection: JSString = "HTMLFormControlsCollection" - @usableFromInline static let HTMLFormElement: JSString = "HTMLFormElement" - @usableFromInline static let HTMLFrameElement: JSString = "HTMLFrameElement" - @usableFromInline static let HTMLFrameSetElement: JSString = "HTMLFrameSetElement" - @usableFromInline static let HTMLHRElement: JSString = "HTMLHRElement" - @usableFromInline static let HTMLHeadElement: JSString = "HTMLHeadElement" - @usableFromInline static let HTMLHeadingElement: JSString = "HTMLHeadingElement" - @usableFromInline static let HTMLHtmlElement: JSString = "HTMLHtmlElement" - @usableFromInline static let HTMLIFrameElement: JSString = "HTMLIFrameElement" - @usableFromInline static let HTMLImageElement: JSString = "HTMLImageElement" - @usableFromInline static let HTMLInputElement: JSString = "HTMLInputElement" - @usableFromInline static let HTMLLIElement: JSString = "HTMLLIElement" - @usableFromInline static let HTMLLabelElement: JSString = "HTMLLabelElement" - @usableFromInline static let HTMLLegendElement: JSString = "HTMLLegendElement" - @usableFromInline static let HTMLLinkElement: JSString = "HTMLLinkElement" - @usableFromInline static let HTMLMapElement: JSString = "HTMLMapElement" - @usableFromInline static let HTMLMarqueeElement: JSString = "HTMLMarqueeElement" - @usableFromInline static let HTMLMediaElement: JSString = "HTMLMediaElement" - @usableFromInline static let HTMLMenuElement: JSString = "HTMLMenuElement" - @usableFromInline static let HTMLMetaElement: JSString = "HTMLMetaElement" - @usableFromInline static let HTMLMeterElement: JSString = "HTMLMeterElement" - @usableFromInline static let HTMLModElement: JSString = "HTMLModElement" - @usableFromInline static let HTMLOListElement: JSString = "HTMLOListElement" - @usableFromInline static let HTMLObjectElement: JSString = "HTMLObjectElement" - @usableFromInline static let HTMLOptGroupElement: JSString = "HTMLOptGroupElement" - @usableFromInline static let HTMLOptionElement: JSString = "HTMLOptionElement" - @usableFromInline static let HTMLOptionsCollection: JSString = "HTMLOptionsCollection" - @usableFromInline static let HTMLOutputElement: JSString = "HTMLOutputElement" - @usableFromInline static let HTMLParagraphElement: JSString = "HTMLParagraphElement" - @usableFromInline static let HTMLParamElement: JSString = "HTMLParamElement" - @usableFromInline static let HTMLPictureElement: JSString = "HTMLPictureElement" - @usableFromInline static let HTMLPreElement: JSString = "HTMLPreElement" - @usableFromInline static let HTMLProgressElement: JSString = "HTMLProgressElement" - @usableFromInline static let HTMLQuoteElement: JSString = "HTMLQuoteElement" - @usableFromInline static let HTMLScriptElement: JSString = "HTMLScriptElement" - @usableFromInline static let HTMLSelectElement: JSString = "HTMLSelectElement" - @usableFromInline static let HTMLSlotElement: JSString = "HTMLSlotElement" - @usableFromInline static let HTMLSourceElement: JSString = "HTMLSourceElement" - @usableFromInline static let HTMLSpanElement: JSString = "HTMLSpanElement" - @usableFromInline static let HTMLStyleElement: JSString = "HTMLStyleElement" - @usableFromInline static let HTMLTableCaptionElement: JSString = "HTMLTableCaptionElement" - @usableFromInline static let HTMLTableCellElement: JSString = "HTMLTableCellElement" - @usableFromInline static let HTMLTableColElement: JSString = "HTMLTableColElement" - @usableFromInline static let HTMLTableElement: JSString = "HTMLTableElement" - @usableFromInline static let HTMLTableRowElement: JSString = "HTMLTableRowElement" - @usableFromInline static let HTMLTableSectionElement: JSString = "HTMLTableSectionElement" - @usableFromInline static let HTMLTemplateElement: JSString = "HTMLTemplateElement" - @usableFromInline static let HTMLTextAreaElement: JSString = "HTMLTextAreaElement" - @usableFromInline static let HTMLTimeElement: JSString = "HTMLTimeElement" - @usableFromInline static let HTMLTitleElement: JSString = "HTMLTitleElement" - @usableFromInline static let HTMLTrackElement: JSString = "HTMLTrackElement" - @usableFromInline static let HTMLUListElement: JSString = "HTMLUListElement" - @usableFromInline static let HTMLUnknownElement: JSString = "HTMLUnknownElement" - @usableFromInline static let HTMLVideoElement: JSString = "HTMLVideoElement" - @usableFromInline static let HashChangeEvent: JSString = "HashChangeEvent" - @usableFromInline static let History: JSString = "History" - @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" - @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" - @usableFromInline static let ImageData: JSString = "ImageData" - @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" - @usableFromInline static let Location: JSString = "Location" - @usableFromInline static let MediaError: JSString = "MediaError" - @usableFromInline static let MessageChannel: JSString = "MessageChannel" - @usableFromInline static let MessageEvent: JSString = "MessageEvent" - @usableFromInline static let MessagePort: JSString = "MessagePort" - @usableFromInline static let MimeType: JSString = "MimeType" - @usableFromInline static let MimeTypeArray: JSString = "MimeTypeArray" - @usableFromInline static let Navigator: JSString = "Navigator" - @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" - @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" - @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" - @usableFromInline static let Path2D: JSString = "Path2D" - @usableFromInline static let Plugin: JSString = "Plugin" - @usableFromInline static let PluginArray: JSString = "PluginArray" - @usableFromInline static let PopStateEvent: JSString = "PopStateEvent" - @usableFromInline static let PromiseRejectionEvent: JSString = "PromiseRejectionEvent" - @usableFromInline static let RadioNodeList: JSString = "RadioNodeList" - @usableFromInline static let SharedWorker: JSString = "SharedWorker" - @usableFromInline static let Storage: JSString = "Storage" - @usableFromInline static let StorageEvent: JSString = "StorageEvent" - @usableFromInline static let SubmitEvent: JSString = "SubmitEvent" - @usableFromInline static let TextMetrics: JSString = "TextMetrics" - @usableFromInline static let TextTrack: JSString = "TextTrack" - @usableFromInline static let TextTrackCue: JSString = "TextTrackCue" - @usableFromInline static let TextTrackCueList: JSString = "TextTrackCueList" - @usableFromInline static let TextTrackList: JSString = "TextTrackList" - @usableFromInline static let TimeRanges: JSString = "TimeRanges" - @usableFromInline static let TrackEvent: JSString = "TrackEvent" - @usableFromInline static let ValidityState: JSString = "ValidityState" - @usableFromInline static let VideoTrack: JSString = "VideoTrack" - @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" - @usableFromInline static let Window: JSString = "Window" - @usableFromInline static let Worker: JSString = "Worker" - @usableFromInline static let Worklet: JSString = "Worklet" - @usableFromInline static let aLink: JSString = "aLink" - @usableFromInline static let abbr: JSString = "abbr" - @usableFromInline static let accept: JSString = "accept" - @usableFromInline static let acceptCharset: JSString = "acceptCharset" - @usableFromInline static let accessKey: JSString = "accessKey" - @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" - @usableFromInline static let action: JSString = "action" - @usableFromInline static let activeCues: JSString = "activeCues" - @usableFromInline static let activeElement: JSString = "activeElement" - @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" - @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" - @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" - @usableFromInline static let actualBoundingBoxRight: JSString = "actualBoundingBoxRight" - @usableFromInline static let add: JSString = "add" - @usableFromInline static let addColorStop: JSString = "addColorStop" - @usableFromInline static let addCue: JSString = "addCue" - @usableFromInline static let addModule: JSString = "addModule" - @usableFromInline static let addPath: JSString = "addPath" - @usableFromInline static let addTextTrack: JSString = "addTextTrack" - @usableFromInline static let alert: JSString = "alert" - @usableFromInline static let align: JSString = "align" - @usableFromInline static let allow: JSString = "allow" - @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" - @usableFromInline static let alpha: JSString = "alpha" - @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" - @usableFromInline static let alt: JSString = "alt" - @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" - @usableFromInline static let appCodeName: JSString = "appCodeName" - @usableFromInline static let appName: JSString = "appName" - @usableFromInline static let appVersion: JSString = "appVersion" - @usableFromInline static let arc: JSString = "arc" - @usableFromInline static let arcTo: JSString = "arcTo" - @usableFromInline static let archive: JSString = "archive" - @usableFromInline static let areas: JSString = "areas" - @usableFromInline static let `as`: JSString = "as" - @usableFromInline static let assign: JSString = "assign" - @usableFromInline static let assignedElements: JSString = "assignedElements" - @usableFromInline static let assignedNodes: JSString = "assignedNodes" - @usableFromInline static let async: JSString = "async" - @usableFromInline static let atob: JSString = "atob" - @usableFromInline static let attachInternals: JSString = "attachInternals" - @usableFromInline static let audioTracks: JSString = "audioTracks" - @usableFromInline static let autocapitalize: JSString = "autocapitalize" - @usableFromInline static let autocomplete: JSString = "autocomplete" - @usableFromInline static let autofocus: JSString = "autofocus" - @usableFromInline static let autoplay: JSString = "autoplay" - @usableFromInline static let axis: JSString = "axis" - @usableFromInline static let back: JSString = "back" - @usableFromInline static let background: JSString = "background" - @usableFromInline static let badInput: JSString = "badInput" - @usableFromInline static let beginPath: JSString = "beginPath" - @usableFromInline static let behavior: JSString = "behavior" - @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" - @usableFromInline static let bgColor: JSString = "bgColor" - @usableFromInline static let blocking: JSString = "blocking" - @usableFromInline static let blur: JSString = "blur" - @usableFromInline static let border: JSString = "border" - @usableFromInline static let btoa: JSString = "btoa" - @usableFromInline static let buffered: JSString = "buffered" - @usableFromInline static let canPlayType: JSString = "canPlayType" - @usableFromInline static let cancelAnimationFrame: JSString = "cancelAnimationFrame" - @usableFromInline static let canvas: JSString = "canvas" - @usableFromInline static let caption: JSString = "caption" - @usableFromInline static let captureEvents: JSString = "captureEvents" - @usableFromInline static let cellIndex: JSString = "cellIndex" - @usableFromInline static let cellPadding: JSString = "cellPadding" - @usableFromInline static let cellSpacing: JSString = "cellSpacing" - @usableFromInline static let cells: JSString = "cells" - @usableFromInline static let ch: JSString = "ch" - @usableFromInline static let chOff: JSString = "chOff" - @usableFromInline static let charset: JSString = "charset" - @usableFromInline static let checkValidity: JSString = "checkValidity" - @usableFromInline static let checked: JSString = "checked" - @usableFromInline static let cite: JSString = "cite" - @usableFromInline static let clear: JSString = "clear" - @usableFromInline static let clearData: JSString = "clearData" - @usableFromInline static let clearInterval: JSString = "clearInterval" - @usableFromInline static let clearRect: JSString = "clearRect" - @usableFromInline static let clearTimeout: JSString = "clearTimeout" - @usableFromInline static let click: JSString = "click" - @usableFromInline static let clientInformation: JSString = "clientInformation" - @usableFromInline static let clip: JSString = "clip" - @usableFromInline static let close: JSString = "close" - @usableFromInline static let closePath: JSString = "closePath" - @usableFromInline static let closed: JSString = "closed" - @usableFromInline static let code: JSString = "code" - @usableFromInline static let codeBase: JSString = "codeBase" - @usableFromInline static let codeType: JSString = "codeType" - @usableFromInline static let colSpan: JSString = "colSpan" - @usableFromInline static let colno: JSString = "colno" - @usableFromInline static let color: JSString = "color" - @usableFromInline static let colorSpace: JSString = "colorSpace" - @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" - @usableFromInline static let cols: JSString = "cols" - @usableFromInline static let commit: JSString = "commit" - @usableFromInline static let compact: JSString = "compact" - @usableFromInline static let complete: JSString = "complete" - @usableFromInline static let confirm: JSString = "confirm" - @usableFromInline static let contains: JSString = "contains" - @usableFromInline static let content: JSString = "content" - @usableFromInline static let contentDocument: JSString = "contentDocument" - @usableFromInline static let contentEditable: JSString = "contentEditable" - @usableFromInline static let contentWindow: JSString = "contentWindow" - @usableFromInline static let control: JSString = "control" - @usableFromInline static let controls: JSString = "controls" - @usableFromInline static let convertToBlob: JSString = "convertToBlob" - @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" - @usableFromInline static let coords: JSString = "coords" - @usableFromInline static let createCaption: JSString = "createCaption" - @usableFromInline static let createConicGradient: JSString = "createConicGradient" - @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" - @usableFromInline static let createImageData: JSString = "createImageData" - @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" - @usableFromInline static let createPattern: JSString = "createPattern" - @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" - @usableFromInline static let createTBody: JSString = "createTBody" - @usableFromInline static let createTFoot: JSString = "createTFoot" - @usableFromInline static let createTHead: JSString = "createTHead" - @usableFromInline static let credentials: JSString = "credentials" - @usableFromInline static let crossOrigin: JSString = "crossOrigin" - @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" - @usableFromInline static let cues: JSString = "cues" - @usableFromInline static let currentSrc: JSString = "currentSrc" - @usableFromInline static let currentTime: JSString = "currentTime" - @usableFromInline static let customElements: JSString = "customElements" - @usableFromInline static let customError: JSString = "customError" - @usableFromInline static let data: JSString = "data" - @usableFromInline static let dataTransfer: JSString = "dataTransfer" - @usableFromInline static let dataset: JSString = "dataset" - @usableFromInline static let dateTime: JSString = "dateTime" - @usableFromInline static let declare: JSString = "declare" - @usableFromInline static let decode: JSString = "decode" - @usableFromInline static let decoding: JSString = "decoding" - @usableFromInline static let `default`: JSString = "default" - @usableFromInline static let defaultChecked: JSString = "defaultChecked" - @usableFromInline static let defaultMuted: JSString = "defaultMuted" - @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" - @usableFromInline static let defaultSelected: JSString = "defaultSelected" - @usableFromInline static let defaultValue: JSString = "defaultValue" - @usableFromInline static let `defer`: JSString = "defer" - @usableFromInline static let define: JSString = "define" - @usableFromInline static let deleteCaption: JSString = "deleteCaption" - @usableFromInline static let deleteCell: JSString = "deleteCell" - @usableFromInline static let deleteRow: JSString = "deleteRow" - @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" - @usableFromInline static let deleteTHead: JSString = "deleteTHead" - @usableFromInline static let description: JSString = "description" - @usableFromInline static let desynchronized: JSString = "desynchronized" - @usableFromInline static let dir: JSString = "dir" - @usableFromInline static let dirName: JSString = "dirName" - @usableFromInline static let direction: JSString = "direction" - @usableFromInline static let disabled: JSString = "disabled" - @usableFromInline static let document: JSString = "document" - @usableFromInline static let download: JSString = "download" - @usableFromInline static let draggable: JSString = "draggable" - @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" - @usableFromInline static let drawImage: JSString = "drawImage" - @usableFromInline static let dropEffect: JSString = "dropEffect" - @usableFromInline static let duration: JSString = "duration" - @usableFromInline static let effectAllowed: JSString = "effectAllowed" - @usableFromInline static let elements: JSString = "elements" - @usableFromInline static let ellipse: JSString = "ellipse" - @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" - @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" - @usableFromInline static let enabled: JSString = "enabled" - @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" - @usableFromInline static let encoding: JSString = "encoding" - @usableFromInline static let enctype: JSString = "enctype" - @usableFromInline static let end: JSString = "end" - @usableFromInline static let endTime: JSString = "endTime" - @usableFromInline static let ended: JSString = "ended" - @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" - @usableFromInline static let error: JSString = "error" - @usableFromInline static let event: JSString = "event" - @usableFromInline static let extends: JSString = "extends" - @usableFromInline static let external: JSString = "external" - @usableFromInline static let face: JSString = "face" - @usableFromInline static let fastSeek: JSString = "fastSeek" - @usableFromInline static let filename: JSString = "filename" - @usableFromInline static let files: JSString = "files" - @usableFromInline static let fill: JSString = "fill" - @usableFromInline static let fillRect: JSString = "fillRect" - @usableFromInline static let fillStyle: JSString = "fillStyle" - @usableFromInline static let fillText: JSString = "fillText" - @usableFromInline static let filter: JSString = "filter" - @usableFromInline static let flatten: JSString = "flatten" - @usableFromInline static let focus: JSString = "focus" - @usableFromInline static let font: JSString = "font" - @usableFromInline static let fontBoundingBoxAscent: JSString = "fontBoundingBoxAscent" - @usableFromInline static let fontBoundingBoxDescent: JSString = "fontBoundingBoxDescent" - @usableFromInline static let fontKerning: JSString = "fontKerning" - @usableFromInline static let fontStretch: JSString = "fontStretch" - @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" - @usableFromInline static let form: JSString = "form" - @usableFromInline static let formAction: JSString = "formAction" - @usableFromInline static let formData: JSString = "formData" - @usableFromInline static let formEnctype: JSString = "formEnctype" - @usableFromInline static let formMethod: JSString = "formMethod" - @usableFromInline static let formNoValidate: JSString = "formNoValidate" - @usableFromInline static let formTarget: JSString = "formTarget" - @usableFromInline static let forward: JSString = "forward" - @usableFromInline static let frame: JSString = "frame" - @usableFromInline static let frameBorder: JSString = "frameBorder" - @usableFromInline static let frameElement: JSString = "frameElement" - @usableFromInline static let frames: JSString = "frames" - @usableFromInline static let get: JSString = "get" - @usableFromInline static let getAsFile: JSString = "getAsFile" - @usableFromInline static let getContext: JSString = "getContext" - @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" - @usableFromInline static let getCueById: JSString = "getCueById" - @usableFromInline static let getData: JSString = "getData" - @usableFromInline static let getImageData: JSString = "getImageData" - @usableFromInline static let getLineDash: JSString = "getLineDash" - @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" - @usableFromInline static let getStartDate: JSString = "getStartDate" - @usableFromInline static let getTrackById: JSString = "getTrackById" - @usableFromInline static let getTransform: JSString = "getTransform" - @usableFromInline static let globalAlpha: JSString = "globalAlpha" - @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" - @usableFromInline static let go: JSString = "go" - @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" - @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" - @usableFromInline static let hash: JSString = "hash" - @usableFromInline static let headers: JSString = "headers" - @usableFromInline static let height: JSString = "height" - @usableFromInline static let hidden: JSString = "hidden" - @usableFromInline static let high: JSString = "high" - @usableFromInline static let history: JSString = "history" - @usableFromInline static let host: JSString = "host" - @usableFromInline static let hostname: JSString = "hostname" - @usableFromInline static let href: JSString = "href" - @usableFromInline static let hreflang: JSString = "hreflang" - @usableFromInline static let hspace: JSString = "hspace" - @usableFromInline static let htmlFor: JSString = "htmlFor" - @usableFromInline static let httpEquiv: JSString = "httpEquiv" - @usableFromInline static let id: JSString = "id" - @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" - @usableFromInline static let imageOrientation: JSString = "imageOrientation" - @usableFromInline static let imageSizes: JSString = "imageSizes" - @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" - @usableFromInline static let imageSmoothingQuality: JSString = "imageSmoothingQuality" - @usableFromInline static let imageSrcset: JSString = "imageSrcset" - @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" - @usableFromInline static let indeterminate: JSString = "indeterminate" - @usableFromInline static let index: JSString = "index" - @usableFromInline static let inert: JSString = "inert" - @usableFromInline static let initMessageEvent: JSString = "initMessageEvent" - @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" - @usableFromInline static let innerText: JSString = "innerText" - @usableFromInline static let inputMode: JSString = "inputMode" - @usableFromInline static let insertCell: JSString = "insertCell" - @usableFromInline static let insertRow: JSString = "insertRow" - @usableFromInline static let integrity: JSString = "integrity" - @usableFromInline static let isContentEditable: JSString = "isContentEditable" - @usableFromInline static let isContextLost: JSString = "isContextLost" - @usableFromInline static let isMap: JSString = "isMap" - @usableFromInline static let isPointInPath: JSString = "isPointInPath" - @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" - @usableFromInline static let isSecureContext: JSString = "isSecureContext" - @usableFromInline static let item: JSString = "item" - @usableFromInline static let items: JSString = "items" - @usableFromInline static let javaEnabled: JSString = "javaEnabled" - @usableFromInline static let key: JSString = "key" - @usableFromInline static let kind: JSString = "kind" - @usableFromInline static let label: JSString = "label" - @usableFromInline static let labels: JSString = "labels" - @usableFromInline static let lang: JSString = "lang" - @usableFromInline static let language: JSString = "language" - @usableFromInline static let languages: JSString = "languages" - @usableFromInline static let lastEventId: JSString = "lastEventId" - @usableFromInline static let length: JSString = "length" - @usableFromInline static let letterSpacing: JSString = "letterSpacing" - @usableFromInline static let lineCap: JSString = "lineCap" - @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" - @usableFromInline static let lineJoin: JSString = "lineJoin" - @usableFromInline static let lineTo: JSString = "lineTo" - @usableFromInline static let lineWidth: JSString = "lineWidth" - @usableFromInline static let lineno: JSString = "lineno" - @usableFromInline static let link: JSString = "link" - @usableFromInline static let list: JSString = "list" - @usableFromInline static let load: JSString = "load" - @usableFromInline static let loading: JSString = "loading" - @usableFromInline static let localStorage: JSString = "localStorage" - @usableFromInline static let location: JSString = "location" - @usableFromInline static let locationbar: JSString = "locationbar" - @usableFromInline static let longDesc: JSString = "longDesc" - @usableFromInline static let loop: JSString = "loop" - @usableFromInline static let low: JSString = "low" - @usableFromInline static let lowsrc: JSString = "lowsrc" - @usableFromInline static let marginHeight: JSString = "marginHeight" - @usableFromInline static let marginWidth: JSString = "marginWidth" - @usableFromInline static let max: JSString = "max" - @usableFromInline static let maxLength: JSString = "maxLength" - @usableFromInline static let measureText: JSString = "measureText" - @usableFromInline static let media: JSString = "media" - @usableFromInline static let menubar: JSString = "menubar" - @usableFromInline static let message: JSString = "message" - @usableFromInline static let method: JSString = "method" - @usableFromInline static let mimeTypes: JSString = "mimeTypes" - @usableFromInline static let min: JSString = "min" - @usableFromInline static let minLength: JSString = "minLength" - @usableFromInline static let miterLimit: JSString = "miterLimit" - @usableFromInline static let mode: JSString = "mode" - @usableFromInline static let moveTo: JSString = "moveTo" - @usableFromInline static let multiple: JSString = "multiple" - @usableFromInline static let muted: JSString = "muted" - @usableFromInline static let name: JSString = "name" - @usableFromInline static let namedItem: JSString = "namedItem" - @usableFromInline static let naturalHeight: JSString = "naturalHeight" - @usableFromInline static let naturalWidth: JSString = "naturalWidth" - @usableFromInline static let navigator: JSString = "navigator" - @usableFromInline static let networkState: JSString = "networkState" - @usableFromInline static let newURL: JSString = "newURL" - @usableFromInline static let newValue: JSString = "newValue" - @usableFromInline static let noHref: JSString = "noHref" - @usableFromInline static let noModule: JSString = "noModule" - @usableFromInline static let noResize: JSString = "noResize" - @usableFromInline static let noShade: JSString = "noShade" - @usableFromInline static let noValidate: JSString = "noValidate" - @usableFromInline static let noWrap: JSString = "noWrap" - @usableFromInline static let nonce: JSString = "nonce" - @usableFromInline static let oldURL: JSString = "oldURL" - @usableFromInline static let oldValue: JSString = "oldValue" - @usableFromInline static let onLine: JSString = "onLine" - @usableFromInline static let onabort: JSString = "onabort" - @usableFromInline static let onaddtrack: JSString = "onaddtrack" - @usableFromInline static let onafterprint: JSString = "onafterprint" - @usableFromInline static let onauxclick: JSString = "onauxclick" - @usableFromInline static let onbeforeprint: JSString = "onbeforeprint" - @usableFromInline static let onbeforeunload: JSString = "onbeforeunload" - @usableFromInline static let onblur: JSString = "onblur" - @usableFromInline static let oncancel: JSString = "oncancel" - @usableFromInline static let oncanplay: JSString = "oncanplay" - @usableFromInline static let oncanplaythrough: JSString = "oncanplaythrough" - @usableFromInline static let onchange: JSString = "onchange" - @usableFromInline static let onclick: JSString = "onclick" - @usableFromInline static let onclose: JSString = "onclose" - @usableFromInline static let oncontextlost: JSString = "oncontextlost" - @usableFromInline static let oncontextmenu: JSString = "oncontextmenu" - @usableFromInline static let oncontextrestored: JSString = "oncontextrestored" - @usableFromInline static let oncopy: JSString = "oncopy" - @usableFromInline static let oncuechange: JSString = "oncuechange" - @usableFromInline static let oncut: JSString = "oncut" - @usableFromInline static let ondblclick: JSString = "ondblclick" - @usableFromInline static let ondrag: JSString = "ondrag" - @usableFromInline static let ondragend: JSString = "ondragend" - @usableFromInline static let ondragenter: JSString = "ondragenter" - @usableFromInline static let ondragleave: JSString = "ondragleave" - @usableFromInline static let ondragover: JSString = "ondragover" - @usableFromInline static let ondragstart: JSString = "ondragstart" - @usableFromInline static let ondrop: JSString = "ondrop" - @usableFromInline static let ondurationchange: JSString = "ondurationchange" - @usableFromInline static let onemptied: JSString = "onemptied" - @usableFromInline static let onended: JSString = "onended" - @usableFromInline static let onenter: JSString = "onenter" - @usableFromInline static let onerror: JSString = "onerror" - @usableFromInline static let onexit: JSString = "onexit" - @usableFromInline static let onfocus: JSString = "onfocus" - @usableFromInline static let onformdata: JSString = "onformdata" - @usableFromInline static let onhashchange: JSString = "onhashchange" - @usableFromInline static let oninput: JSString = "oninput" - @usableFromInline static let oninvalid: JSString = "oninvalid" - @usableFromInline static let onkeydown: JSString = "onkeydown" - @usableFromInline static let onkeypress: JSString = "onkeypress" - @usableFromInline static let onkeyup: JSString = "onkeyup" - @usableFromInline static let onlanguagechange: JSString = "onlanguagechange" - @usableFromInline static let onload: JSString = "onload" - @usableFromInline static let onloadeddata: JSString = "onloadeddata" - @usableFromInline static let onloadedmetadata: JSString = "onloadedmetadata" - @usableFromInline static let onloadstart: JSString = "onloadstart" - @usableFromInline static let onmessage: JSString = "onmessage" - @usableFromInline static let onmessageerror: JSString = "onmessageerror" - @usableFromInline static let onmousedown: JSString = "onmousedown" - @usableFromInline static let onmouseenter: JSString = "onmouseenter" - @usableFromInline static let onmouseleave: JSString = "onmouseleave" - @usableFromInline static let onmousemove: JSString = "onmousemove" - @usableFromInline static let onmouseout: JSString = "onmouseout" - @usableFromInline static let onmouseover: JSString = "onmouseover" - @usableFromInline static let onmouseup: JSString = "onmouseup" - @usableFromInline static let onoffline: JSString = "onoffline" - @usableFromInline static let ononline: JSString = "ononline" - @usableFromInline static let onopen: JSString = "onopen" - @usableFromInline static let onpagehide: JSString = "onpagehide" - @usableFromInline static let onpageshow: JSString = "onpageshow" - @usableFromInline static let onpaste: JSString = "onpaste" - @usableFromInline static let onpause: JSString = "onpause" - @usableFromInline static let onplay: JSString = "onplay" - @usableFromInline static let onplaying: JSString = "onplaying" - @usableFromInline static let onpopstate: JSString = "onpopstate" - @usableFromInline static let onprogress: JSString = "onprogress" - @usableFromInline static let onratechange: JSString = "onratechange" - @usableFromInline static let onrejectionhandled: JSString = "onrejectionhandled" - @usableFromInline static let onremovetrack: JSString = "onremovetrack" - @usableFromInline static let onreset: JSString = "onreset" - @usableFromInline static let onresize: JSString = "onresize" - @usableFromInline static let onscroll: JSString = "onscroll" - @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" - @usableFromInline static let onseeked: JSString = "onseeked" - @usableFromInline static let onseeking: JSString = "onseeking" - @usableFromInline static let onselect: JSString = "onselect" - @usableFromInline static let onslotchange: JSString = "onslotchange" - @usableFromInline static let onstalled: JSString = "onstalled" - @usableFromInline static let onstorage: JSString = "onstorage" - @usableFromInline static let onsubmit: JSString = "onsubmit" - @usableFromInline static let onsuspend: JSString = "onsuspend" - @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" - @usableFromInline static let ontoggle: JSString = "ontoggle" - @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" - @usableFromInline static let onunload: JSString = "onunload" - @usableFromInline static let onvolumechange: JSString = "onvolumechange" - @usableFromInline static let onwaiting: JSString = "onwaiting" - @usableFromInline static let onwebkitanimationend: JSString = "onwebkitanimationend" - @usableFromInline static let onwebkitanimationiteration: JSString = "onwebkitanimationiteration" - @usableFromInline static let onwebkitanimationstart: JSString = "onwebkitanimationstart" - @usableFromInline static let onwebkittransitionend: JSString = "onwebkittransitionend" - @usableFromInline static let onwheel: JSString = "onwheel" - @usableFromInline static let open: JSString = "open" - @usableFromInline static let opener: JSString = "opener" - @usableFromInline static let optimum: JSString = "optimum" - @usableFromInline static let options: JSString = "options" - @usableFromInline static let origin: JSString = "origin" - @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" - @usableFromInline static let oscpu: JSString = "oscpu" - @usableFromInline static let outerText: JSString = "outerText" - @usableFromInline static let parent: JSString = "parent" - @usableFromInline static let parseFromString: JSString = "parseFromString" - @usableFromInline static let password: JSString = "password" - @usableFromInline static let pathname: JSString = "pathname" - @usableFromInline static let pattern: JSString = "pattern" - @usableFromInline static let patternMismatch: JSString = "patternMismatch" - @usableFromInline static let pause: JSString = "pause" - @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" - @usableFromInline static let paused: JSString = "paused" - @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" - @usableFromInline static let persisted: JSString = "persisted" - @usableFromInline static let personalbar: JSString = "personalbar" - @usableFromInline static let ping: JSString = "ping" - @usableFromInline static let placeholder: JSString = "placeholder" - @usableFromInline static let platform: JSString = "platform" - @usableFromInline static let play: JSString = "play" - @usableFromInline static let playbackRate: JSString = "playbackRate" - @usableFromInline static let played: JSString = "played" - @usableFromInline static let playsInline: JSString = "playsInline" - @usableFromInline static let plugins: JSString = "plugins" - @usableFromInline static let port: JSString = "port" - @usableFromInline static let port1: JSString = "port1" - @usableFromInline static let port2: JSString = "port2" - @usableFromInline static let ports: JSString = "ports" - @usableFromInline static let position: JSString = "position" - @usableFromInline static let postMessage: JSString = "postMessage" - @usableFromInline static let poster: JSString = "poster" - @usableFromInline static let preload: JSString = "preload" - @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" - @usableFromInline static let preservesPitch: JSString = "preservesPitch" - @usableFromInline static let preventScroll: JSString = "preventScroll" - @usableFromInline static let print: JSString = "print" - @usableFromInline static let product: JSString = "product" - @usableFromInline static let productSub: JSString = "productSub" - @usableFromInline static let promise: JSString = "promise" - @usableFromInline static let prompt: JSString = "prompt" - @usableFromInline static let `protocol`: JSString = "protocol" - @usableFromInline static let pushState: JSString = "pushState" - @usableFromInline static let putImageData: JSString = "putImageData" - @usableFromInline static let quadraticCurveTo: JSString = "quadraticCurveTo" - @usableFromInline static let quality: JSString = "quality" - @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" - @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" - @usableFromInline static let readOnly: JSString = "readOnly" - @usableFromInline static let readyState: JSString = "readyState" - @usableFromInline static let reason: JSString = "reason" - @usableFromInline static let rect: JSString = "rect" - @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" - @usableFromInline static let refresh: JSString = "refresh" - @usableFromInline static let registerProtocolHandler: JSString = "registerProtocolHandler" - @usableFromInline static let rel: JSString = "rel" - @usableFromInline static let relList: JSString = "relList" - @usableFromInline static let releaseEvents: JSString = "releaseEvents" - @usableFromInline static let reload: JSString = "reload" - @usableFromInline static let remove: JSString = "remove" - @usableFromInline static let removeCue: JSString = "removeCue" - @usableFromInline static let replace: JSString = "replace" - @usableFromInline static let replaceState: JSString = "replaceState" - @usableFromInline static let reportError: JSString = "reportError" - @usableFromInline static let reportValidity: JSString = "reportValidity" - @usableFromInline static let requestSubmit: JSString = "requestSubmit" - @usableFromInline static let required: JSString = "required" - @usableFromInline static let reset: JSString = "reset" - @usableFromInline static let resetTransform: JSString = "resetTransform" - @usableFromInline static let resizeHeight: JSString = "resizeHeight" - @usableFromInline static let resizeQuality: JSString = "resizeQuality" - @usableFromInline static let resizeWidth: JSString = "resizeWidth" - @usableFromInline static let restore: JSString = "restore" - @usableFromInline static let returnValue: JSString = "returnValue" - @usableFromInline static let rev: JSString = "rev" - @usableFromInline static let reversed: JSString = "reversed" - @usableFromInline static let rotate: JSString = "rotate" - @usableFromInline static let roundRect: JSString = "roundRect" - @usableFromInline static let rowIndex: JSString = "rowIndex" - @usableFromInline static let rowSpan: JSString = "rowSpan" - @usableFromInline static let rows: JSString = "rows" - @usableFromInline static let rules: JSString = "rules" - @usableFromInline static let sandbox: JSString = "sandbox" - @usableFromInline static let save: JSString = "save" - @usableFromInline static let scale: JSString = "scale" - @usableFromInline static let scheme: JSString = "scheme" - @usableFromInline static let scope: JSString = "scope" - @usableFromInline static let scrollAmount: JSString = "scrollAmount" - @usableFromInline static let scrollDelay: JSString = "scrollDelay" - @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" - @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" - @usableFromInline static let scrollbars: JSString = "scrollbars" - @usableFromInline static let scrolling: JSString = "scrolling" - @usableFromInline static let search: JSString = "search" - @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" - @usableFromInline static let seekable: JSString = "seekable" - @usableFromInline static let seeking: JSString = "seeking" - @usableFromInline static let select: JSString = "select" - @usableFromInline static let selected: JSString = "selected" - @usableFromInline static let selectedIndex: JSString = "selectedIndex" - @usableFromInline static let selectedOptions: JSString = "selectedOptions" - @usableFromInline static let selectionDirection: JSString = "selectionDirection" - @usableFromInline static let selectionEnd: JSString = "selectionEnd" - @usableFromInline static let selectionStart: JSString = "selectionStart" - @usableFromInline static let sessionStorage: JSString = "sessionStorage" - @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" - @usableFromInline static let setData: JSString = "setData" - @usableFromInline static let setDragImage: JSString = "setDragImage" - @usableFromInline static let setFormValue: JSString = "setFormValue" - @usableFromInline static let setInterval: JSString = "setInterval" - @usableFromInline static let setLineDash: JSString = "setLineDash" - @usableFromInline static let setRangeText: JSString = "setRangeText" - @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" - @usableFromInline static let setTimeout: JSString = "setTimeout" - @usableFromInline static let setTransform: JSString = "setTransform" - @usableFromInline static let setValidity: JSString = "setValidity" - @usableFromInline static let shadowBlur: JSString = "shadowBlur" - @usableFromInline static let shadowColor: JSString = "shadowColor" - @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" - @usableFromInline static let shadowOffsetY: JSString = "shadowOffsetY" - @usableFromInline static let shadowRoot: JSString = "shadowRoot" - @usableFromInline static let shape: JSString = "shape" - @usableFromInline static let show: JSString = "show" - @usableFromInline static let showModal: JSString = "showModal" - @usableFromInline static let showPicker: JSString = "showPicker" - @usableFromInline static let size: JSString = "size" - @usableFromInline static let sizes: JSString = "sizes" - @usableFromInline static let source: JSString = "source" - @usableFromInline static let span: JSString = "span" - @usableFromInline static let spellcheck: JSString = "spellcheck" - @usableFromInline static let src: JSString = "src" - @usableFromInline static let srcdoc: JSString = "srcdoc" - @usableFromInline static let srclang: JSString = "srclang" - @usableFromInline static let srcset: JSString = "srcset" - @usableFromInline static let standby: JSString = "standby" - @usableFromInline static let start: JSString = "start" - @usableFromInline static let startTime: JSString = "startTime" - @usableFromInline static let state: JSString = "state" - @usableFromInline static let status: JSString = "status" - @usableFromInline static let statusbar: JSString = "statusbar" - @usableFromInline static let step: JSString = "step" - @usableFromInline static let stepDown: JSString = "stepDown" - @usableFromInline static let stepMismatch: JSString = "stepMismatch" - @usableFromInline static let stepUp: JSString = "stepUp" - @usableFromInline static let stop: JSString = "stop" - @usableFromInline static let storageArea: JSString = "storageArea" - @usableFromInline static let stroke: JSString = "stroke" - @usableFromInline static let strokeRect: JSString = "strokeRect" - @usableFromInline static let strokeStyle: JSString = "strokeStyle" - @usableFromInline static let strokeText: JSString = "strokeText" - @usableFromInline static let structuredClone: JSString = "structuredClone" - @usableFromInline static let submit: JSString = "submit" - @usableFromInline static let submitter: JSString = "submitter" - @usableFromInline static let suffixes: JSString = "suffixes" - @usableFromInline static let summary: JSString = "summary" - @usableFromInline static let supports: JSString = "supports" - @usableFromInline static let tBodies: JSString = "tBodies" - @usableFromInline static let tFoot: JSString = "tFoot" - @usableFromInline static let tHead: JSString = "tHead" - @usableFromInline static let tabIndex: JSString = "tabIndex" - @usableFromInline static let taintEnabled: JSString = "taintEnabled" - @usableFromInline static let target: JSString = "target" - @usableFromInline static let targetOrigin: JSString = "targetOrigin" - @usableFromInline static let terminate: JSString = "terminate" - @usableFromInline static let text: JSString = "text" - @usableFromInline static let textAlign: JSString = "textAlign" - @usableFromInline static let textBaseline: JSString = "textBaseline" - @usableFromInline static let textLength: JSString = "textLength" - @usableFromInline static let textRendering: JSString = "textRendering" - @usableFromInline static let textTracks: JSString = "textTracks" - @usableFromInline static let title: JSString = "title" - @usableFromInline static let toDataURL: JSString = "toDataURL" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let tooLong: JSString = "tooLong" - @usableFromInline static let tooShort: JSString = "tooShort" - @usableFromInline static let toolbar: JSString = "toolbar" - @usableFromInline static let top: JSString = "top" - @usableFromInline static let track: JSString = "track" - @usableFromInline static let transfer: JSString = "transfer" - @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" - @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" - @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" - @usableFromInline static let transform: JSString = "transform" - @usableFromInline static let translate: JSString = "translate" - @usableFromInline static let trueSpeed: JSString = "trueSpeed" - @usableFromInline static let type: JSString = "type" - @usableFromInline static let typeMismatch: JSString = "typeMismatch" - @usableFromInline static let types: JSString = "types" - @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" - @usableFromInline static let upgrade: JSString = "upgrade" - @usableFromInline static let url: JSString = "url" - @usableFromInline static let useMap: JSString = "useMap" - @usableFromInline static let userAgent: JSString = "userAgent" - @usableFromInline static let username: JSString = "username" - @usableFromInline static let vAlign: JSString = "vAlign" - @usableFromInline static let vLink: JSString = "vLink" - @usableFromInline static let valid: JSString = "valid" - @usableFromInline static let validationMessage: JSString = "validationMessage" - @usableFromInline static let validity: JSString = "validity" - @usableFromInline static let value: JSString = "value" - @usableFromInline static let valueAsDate: JSString = "valueAsDate" - @usableFromInline static let valueAsNumber: JSString = "valueAsNumber" - @usableFromInline static let valueMissing: JSString = "valueMissing" - @usableFromInline static let valueType: JSString = "valueType" - @usableFromInline static let vendor: JSString = "vendor" - @usableFromInline static let vendorSub: JSString = "vendorSub" - @usableFromInline static let version: JSString = "version" - @usableFromInline static let videoHeight: JSString = "videoHeight" - @usableFromInline static let videoTracks: JSString = "videoTracks" - @usableFromInline static let videoWidth: JSString = "videoWidth" - @usableFromInline static let visible: JSString = "visible" - @usableFromInline static let volume: JSString = "volume" - @usableFromInline static let vspace: JSString = "vspace" - @usableFromInline static let whenDefined: JSString = "whenDefined" - @usableFromInline static let width: JSString = "width" - @usableFromInline static let willReadFrequently: JSString = "willReadFrequently" - @usableFromInline static let willValidate: JSString = "willValidate" - @usableFromInline static let window: JSString = "window" - @usableFromInline static let withCredentials: JSString = "withCredentials" - @usableFromInline static let wordSpacing: JSString = "wordSpacing" - @usableFromInline static let wrap: JSString = "wrap" -} - -public protocol Any_AudioTrack_or_TextTrack_or_VideoTrack: ConvertibleToJSValue {} -extension AudioTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} -extension TextTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} -extension VideoTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} - -public enum AudioTrack_or_TextTrack_or_VideoTrack: JSValueCompatible, Any_AudioTrack_or_TextTrack_or_VideoTrack { - case audioTrack(AudioTrack) - case textTrack(TextTrack) - case videoTrack(VideoTrack) - - var audioTrack: AudioTrack? { - switch self { - case let .audioTrack(audioTrack): return audioTrack - default: return nil - } - } - - var textTrack: TextTrack? { - switch self { - case let .textTrack(textTrack): return textTrack - default: return nil - } - } - - var videoTrack: VideoTrack? { - switch self { - case let .videoTrack(videoTrack): return videoTrack - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let audioTrack: AudioTrack = value.fromJSValue() { - return .audioTrack(audioTrack) - } - if let textTrack: TextTrack = value.fromJSValue() { - return .textTrack(textTrack) - } - if let videoTrack: VideoTrack = value.fromJSValue() { - return .videoTrack(videoTrack) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .audioTrack(audioTrack): - return audioTrack.jsValue - case let .textTrack(textTrack): - return textTrack.jsValue - case let .videoTrack(videoTrack): - return videoTrack.jsValue - } - } -} - -public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} -extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} -extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} - -public enum CanvasFilterInput_or_seq_of_CanvasFilterInput: JSValueCompatible, Any_CanvasFilterInput_or_seq_of_CanvasFilterInput { - case canvasFilterInput(CanvasFilterInput) - case seq_of_CanvasFilterInput([CanvasFilterInput]) - - var canvasFilterInput: CanvasFilterInput? { - switch self { - case let .canvasFilterInput(canvasFilterInput): return canvasFilterInput - default: return nil - } - } - - var seq_of_CanvasFilterInput: [CanvasFilterInput]? { - switch self { - case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): return seq_of_CanvasFilterInput - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasFilterInput: CanvasFilterInput = value.fromJSValue() { - return .canvasFilterInput(canvasFilterInput) - } - if let seq_of_CanvasFilterInput: [CanvasFilterInput] = value.fromJSValue() { - return .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasFilterInput(canvasFilterInput): - return canvasFilterInput.jsValue - case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): - return seq_of_CanvasFilterInput.jsValue - } - } -} - -public protocol Any_CanvasFilter_or_String: ConvertibleToJSValue {} -extension CanvasFilter: Any_CanvasFilter_or_String {} -extension String: Any_CanvasFilter_or_String {} - -public enum CanvasFilter_or_String: JSValueCompatible, Any_CanvasFilter_or_String { - case canvasFilter(CanvasFilter) - case string(String) - - var canvasFilter: CanvasFilter? { - switch self { - case let .canvasFilter(canvasFilter): return canvasFilter - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasFilter: CanvasFilter = value.fromJSValue() { - return .canvasFilter(canvasFilter) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasFilter(canvasFilter): - return canvasFilter.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_CanvasGradient_or_CanvasPattern_or_String: ConvertibleToJSValue {} -extension CanvasGradient: Any_CanvasGradient_or_CanvasPattern_or_String {} -extension CanvasPattern: Any_CanvasGradient_or_CanvasPattern_or_String {} -extension String: Any_CanvasGradient_or_CanvasPattern_or_String {} - -public enum CanvasGradient_or_CanvasPattern_or_String: JSValueCompatible, Any_CanvasGradient_or_CanvasPattern_or_String { - case canvasGradient(CanvasGradient) - case canvasPattern(CanvasPattern) - case string(String) - - var canvasGradient: CanvasGradient? { - switch self { - case let .canvasGradient(canvasGradient): return canvasGradient - default: return nil - } - } - - var canvasPattern: CanvasPattern? { - switch self { - case let .canvasPattern(canvasPattern): return canvasPattern - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasGradient: CanvasGradient = value.fromJSValue() { - return .canvasGradient(canvasGradient) - } - if let canvasPattern: CanvasPattern = value.fromJSValue() { - return .canvasPattern(canvasPattern) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasGradient(canvasGradient): - return canvasGradient.jsValue - case let .canvasPattern(canvasPattern): - return canvasPattern.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_DOMPointInit_or_Double: ConvertibleToJSValue {} -extension DOMPointInit: Any_DOMPointInit_or_Double {} -extension Double: Any_DOMPointInit_or_Double {} - -public enum DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double { - case domPointInit(DOMPointInit) - case double(Double) - - var domPointInit: DOMPointInit? { - switch self { - case let .domPointInit(domPointInit): return domPointInit - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let domPointInit: DOMPointInit = value.fromJSValue() { - return .domPointInit(domPointInit) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - } - } -} - -public protocol Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: ConvertibleToJSValue {} -extension DOMPointInit: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} -extension Double: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} -extension Array: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double where Element == DOMPointInit_or_Double {} - -public enum DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double { - case domPointInit(DOMPointInit) - case double(Double) - case seq_of_DOMPointInit_or_Double([DOMPointInit_or_Double]) - - var domPointInit: DOMPointInit? { - switch self { - case let .domPointInit(domPointInit): return domPointInit - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double]? { - switch self { - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): return seq_of_DOMPointInit_or_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let domPointInit: DOMPointInit = value.fromJSValue() { - return .domPointInit(domPointInit) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { - return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): - return seq_of_DOMPointInit_or_Double.jsValue - } - } -} - -public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} -extension Element: Any_Element_or_HTMLCollection {} -extension HTMLCollection: Any_Element_or_HTMLCollection {} - -public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { - case element(Element) - case htmlCollection(HTMLCollection) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var htmlCollection: HTMLCollection? { - switch self { - case let .htmlCollection(htmlCollection): return htmlCollection - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let htmlCollection: HTMLCollection = value.fromJSValue() { - return .htmlCollection(htmlCollection) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .htmlCollection(htmlCollection): - return htmlCollection.jsValue - } - } -} - -public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} -extension Element: Any_Element_or_RadioNodeList {} -extension RadioNodeList: Any_Element_or_RadioNodeList {} - -public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { - case element(Element) - case radioNodeList(RadioNodeList) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var radioNodeList: RadioNodeList? { - switch self { - case let .radioNodeList(radioNodeList): return radioNodeList - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let radioNodeList: RadioNodeList = value.fromJSValue() { - return .radioNodeList(radioNodeList) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .radioNodeList(radioNodeList): - return radioNodeList.jsValue - } - } -} - -public protocol Any_Element_or_Text: ConvertibleToJSValue {} -extension Element: Any_Element_or_Text {} -extension Text: Any_Element_or_Text {} - -public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { - case element(Element) - case text(Text) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var text: Text? { - switch self { - case let .text(text): return text - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let text: Text = value.fromJSValue() { - return .text(text) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .text(text): - return text.jsValue - } - } -} - -public protocol Any_Event_or_String: ConvertibleToJSValue {} -extension Event: Any_Event_or_String {} -extension String: Any_Event_or_String {} - -public enum Event_or_String: JSValueCompatible, Any_Event_or_String { - case event(Event) - case string(String) - - var event: Event? { - switch self { - case let .event(event): return event - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let event: Event = value.fromJSValue() { - return .event(event) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .event(event): - return event.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} -extension File: Any_File_or_FormData_or_String {} -extension FormData: Any_File_or_FormData_or_String {} -extension String: Any_File_or_FormData_or_String {} - -public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { - case file(File) - case formData(FormData) - case string(String) - - var file: File? { - switch self { - case let .file(file): return file - default: return nil - } - } - - var formData: FormData? { - switch self { - case let .formData(formData): return formData - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .file(file): - return file.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} -extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} - -public enum HTMLCanvasElement_or_OffscreenCanvas: JSValueCompatible, Any_HTMLCanvasElement_or_OffscreenCanvas { - case htmlCanvasElement(HTMLCanvasElement) - case offscreenCanvas(OffscreenCanvas) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue - } - } -} - -public protocol Any_HTMLElement_or_Int32: ConvertibleToJSValue {} -extension HTMLElement: Any_HTMLElement_or_Int32 {} -extension Int32: Any_HTMLElement_or_Int32 {} - -public enum HTMLElement_or_Int32: JSValueCompatible, Any_HTMLElement_or_Int32 { - case htmlElement(HTMLElement) - case int32(Int32) - - var htmlElement: HTMLElement? { - switch self { - case let .htmlElement(htmlElement): return htmlElement - default: return nil - } - } - - var int32: Int32? { - switch self { - case let .int32(int32): return int32 - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlElement: HTMLElement = value.fromJSValue() { - return .htmlElement(htmlElement) - } - if let int32: Int32 = value.fromJSValue() { - return .int32(int32) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlElement(htmlElement): - return htmlElement.jsValue - case let .int32(int32): - return int32.jsValue - } - } -} - -public protocol Any_HTMLOptGroupElement_or_HTMLOptionElement: ConvertibleToJSValue {} -extension HTMLOptGroupElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} -extension HTMLOptionElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} - -public enum HTMLOptGroupElement_or_HTMLOptionElement: JSValueCompatible, Any_HTMLOptGroupElement_or_HTMLOptionElement { - case htmlOptGroupElement(HTMLOptGroupElement) - case htmlOptionElement(HTMLOptionElement) - - var htmlOptGroupElement: HTMLOptGroupElement? { - switch self { - case let .htmlOptGroupElement(htmlOptGroupElement): return htmlOptGroupElement - default: return nil - } - } - - var htmlOptionElement: HTMLOptionElement? { - switch self { - case let .htmlOptionElement(htmlOptionElement): return htmlOptionElement - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlOptGroupElement: HTMLOptGroupElement = value.fromJSValue() { - return .htmlOptGroupElement(htmlOptGroupElement) - } - if let htmlOptionElement: HTMLOptionElement = value.fromJSValue() { - return .htmlOptionElement(htmlOptionElement) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlOptGroupElement(htmlOptGroupElement): - return htmlOptGroupElement.jsValue - case let .htmlOptionElement(htmlOptionElement): - return htmlOptionElement.jsValue - } - } -} - -public protocol Any_ImageBitmapSource: ConvertibleToJSValue {} -extension Blob: Any_ImageBitmapSource {} -extension CanvasImageSource: Any_ImageBitmapSource {} -extension ImageData: Any_ImageBitmapSource {} - -public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource { - case blob(Blob) - case canvasImageSource(CanvasImageSource) - case imageData(ImageData) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var canvasImageSource: CanvasImageSource? { - switch self { - case let .canvasImageSource(canvasImageSource): return canvasImageSource - default: return nil - } - } - - var imageData: ImageData? { - switch self { - case let .imageData(imageData): return imageData - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let canvasImageSource: CanvasImageSource = value.fromJSValue() { - return .canvasImageSource(canvasImageSource) - } - if let imageData: ImageData = value.fromJSValue() { - return .imageData(imageData) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .canvasImageSource(canvasImageSource): - return canvasImageSource.jsValue - case let .imageData(imageData): - return imageData.jsValue - } - } -} - -public protocol Any_MessageEventSource: ConvertibleToJSValue {} -extension MessagePort: Any_MessageEventSource {} -extension ServiceWorker: Any_MessageEventSource {} -extension WindowProxy: Any_MessageEventSource {} - -public enum MessageEventSource: JSValueCompatible, Any_MessageEventSource { - case messagePort(MessagePort) - case serviceWorker(ServiceWorker) - case windowProxy(WindowProxy) - - var messagePort: MessagePort? { - switch self { - case let .messagePort(messagePort): return messagePort - default: return nil - } - } - - var serviceWorker: ServiceWorker? { - switch self { - case let .serviceWorker(serviceWorker): return serviceWorker - default: return nil - } - } - - var windowProxy: WindowProxy? { - switch self { - case let .windowProxy(windowProxy): return windowProxy - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let messagePort: MessagePort = value.fromJSValue() { - return .messagePort(messagePort) - } - if let serviceWorker: ServiceWorker = value.fromJSValue() { - return .serviceWorker(serviceWorker) - } - if let windowProxy: WindowProxy = value.fromJSValue() { - return .windowProxy(windowProxy) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .messagePort(messagePort): - return messagePort.jsValue - case let .serviceWorker(serviceWorker): - return serviceWorker.jsValue - case let .windowProxy(windowProxy): - return windowProxy.jsValue - } - } -} - -public protocol Any_Path2D_or_String: ConvertibleToJSValue {} -extension Path2D: Any_Path2D_or_String {} -extension String: Any_Path2D_or_String {} - -public enum Path2D_or_String: JSValueCompatible, Any_Path2D_or_String { - case path2D(Path2D) - case string(String) - - var path2D: Path2D? { - switch self { - case let .path2D(path2D): return path2D - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let path2D: Path2D = value.fromJSValue() { - return .path2D(path2D) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .path2D(path2D): - return path2D.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_String_or_WorkerOptions: ConvertibleToJSValue {} -extension String: Any_String_or_WorkerOptions {} -extension WorkerOptions: Any_String_or_WorkerOptions {} - -public enum String_or_WorkerOptions: JSValueCompatible, Any_String_or_WorkerOptions { - case string(String) - case workerOptions(WorkerOptions) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var workerOptions: WorkerOptions? { - switch self { - case let .workerOptions(workerOptions): return workerOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let workerOptions: WorkerOptions = value.fromJSValue() { - return .workerOptions(workerOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .workerOptions(workerOptions): - return workerOptions.jsValue - } - } -} - -public protocol Any_TimerHandler: ConvertibleToJSValue {} -extension JSFunction: Any_TimerHandler {} -extension String: Any_TimerHandler {} - -public enum TimerHandler: JSValueCompatible, Any_TimerHandler { - case jsFunction(JSFunction) - case string(String) - - var jsFunction: JSFunction? { - switch self { - case let .jsFunction(jsFunction): return jsFunction - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let jsFunction: JSFunction = value.fromJSValue() { - return .jsFunction(jsFunction) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .jsFunction(jsFunction): - return jsFunction.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKitHTML/ServiceWorker.swift b/Sources/DOMKitHTML/ServiceWorker.swift deleted file mode 100644 index e2557e32..00000000 --- a/Sources/DOMKitHTML/ServiceWorker.swift +++ /dev/null @@ -1,697 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Cache: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.Cache].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func add(request: RequestInfo) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func add(request: RequestInfo) async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addAll(requests: [RequestInfo]) async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func put(request: RequestInfo, response: Response) async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class CacheQueryOptions: BridgedDictionary { - public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - object[ServiceWorkerStrings.ignoreSearch] = ignoreSearch.jsValue - object[ServiceWorkerStrings.ignoreMethod] = ignoreMethod.jsValue - object[ServiceWorkerStrings.ignoreVary] = ignoreVary.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _ignoreSearch = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.ignoreSearch) - _ignoreMethod = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.ignoreMethod) - _ignoreVary = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.ignoreVary) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var ignoreSearch: Bool - - @ReadWriteAttribute - public var ignoreMethod: Bool - - @ReadWriteAttribute - public var ignoreVary: Bool -} - -public class CacheStorage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.CacheStorage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func has(cacheName: String) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func has(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func open(cacheName: String) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func open(cacheName: String) async throws -> Cache { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func delete(cacheName: String) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func keys() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.keys].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys() async throws -> [String] { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.keys].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class ClientQueryOptions: BridgedDictionary { - public convenience init(includeUncontrolled: Bool, type: ClientType) { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - object[ServiceWorkerStrings.includeUncontrolled] = includeUncontrolled.jsValue - object[ServiceWorkerStrings.type] = type.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.includeUncontrolled) - _type = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.type) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var includeUncontrolled: Bool - - @ReadWriteAttribute - public var type: ClientType -} - -public enum ClientType: JSString, JSValueCompatible { - case window = "window" - case worker = "worker" - case sharedworker = "sharedworker" - case all = "all" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class ExtendableEventInit: BridgedDictionary { - public convenience init() { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - super.init(unsafelyWrapping: object) - } -} - -public class FetchEventInit: BridgedDictionary { - public convenience init(request: Request, preloadResponse: JSPromise, clientId: String, resultingClientId: String, replacesClientId: String, handled: JSPromise) { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - object[ServiceWorkerStrings.request] = request.jsValue - object[ServiceWorkerStrings.preloadResponse] = preloadResponse.jsValue - object[ServiceWorkerStrings.clientId] = clientId.jsValue - object[ServiceWorkerStrings.resultingClientId] = resultingClientId.jsValue - object[ServiceWorkerStrings.replacesClientId] = replacesClientId.jsValue - object[ServiceWorkerStrings.handled] = handled.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _request = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.request) - _preloadResponse = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.preloadResponse) - _clientId = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.clientId) - _resultingClientId = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.resultingClientId) - _replacesClientId = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.replacesClientId) - _handled = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.handled) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var request: Request - - @ReadWriteAttribute - public var preloadResponse: JSPromise - - @ReadWriteAttribute - public var clientId: String - - @ReadWriteAttribute - public var resultingClientId: String - - @ReadWriteAttribute - public var replacesClientId: String - - @ReadWriteAttribute - public var handled: JSPromise -} - -public enum FrameType: JSString, JSValueCompatible { - case auxiliary = "auxiliary" - case topLevel = "top-level" - case nested = "nested" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class MultiCacheQueryOptions: BridgedDictionary { - public convenience init(cacheName: String) { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - object[ServiceWorkerStrings.cacheName] = cacheName.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _cacheName = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.cacheName) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var cacheName: String -} - -public class NavigationPreloadManager: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.NavigationPreloadManager].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func enable() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.enable].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func enable() async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.enable].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func disable() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.disable].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func disable() async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.disable].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func setHeaderValue(value: String) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func setHeaderValue(value: String) async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getState() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.getState].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getState() async throws -> NavigationPreloadState { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.getState].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class NavigationPreloadState: BridgedDictionary { - public convenience init(enabled: Bool, headerValue: String) { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - object[ServiceWorkerStrings.enabled] = enabled.jsValue - object[ServiceWorkerStrings.headerValue] = headerValue.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _enabled = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.enabled) - _headerValue = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.headerValue) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var enabled: Bool - - @ReadWriteAttribute - public var headerValue: String -} - -public class RegistrationOptions: BridgedDictionary { - public convenience init(scope: String, type: WorkerType, updateViaCache: ServiceWorkerUpdateViaCache) { - let object = JSObject.global[ServiceWorkerStrings.Object].function!.new() - object[ServiceWorkerStrings.scope] = scope.jsValue - object[ServiceWorkerStrings.type] = type.jsValue - object[ServiceWorkerStrings.updateViaCache] = updateViaCache.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _scope = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.scope) - _type = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.type) - _updateViaCache = ReadWriteAttribute(jsObject: object, name: ServiceWorkerStrings.updateViaCache) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var scope: String - - @ReadWriteAttribute - public var type: WorkerType - - @ReadWriteAttribute - public var updateViaCache: ServiceWorkerUpdateViaCache -} - -public class ServiceWorker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.ServiceWorker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _scriptURL = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.scriptURL) - _state = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.state) - _onstatechange = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onstatechange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var scriptURL: String - - @ReadonlyAttribute - public var state: ServiceWorkerState - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[ServiceWorkerStrings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[ServiceWorkerStrings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @ReadWriteAttribute - public var onstatechange: EventHandler -} - -public class ServiceWorkerContainer: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.ServiceWorkerContainer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _controller = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.controller) - _ready = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.ready) - _oncontrollerchange = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.oncontrollerchange) - _onmessage = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onmessage) - _onmessageerror = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var controller: ServiceWorker? - - @ReadonlyAttribute - public var ready: JSPromise - - @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) async throws -> ServiceWorkerRegistration { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getRegistration(clientURL: String? = nil) -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getRegistration(clientURL: String? = nil) async throws -> ServiceWorkerRegistration? { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getRegistrations() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getRegistrations() async throws -> [ServiceWorkerRegistration] { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func startMessages() { - let this = jsObject - _ = this[ServiceWorkerStrings.startMessages].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var oncontrollerchange: EventHandler - - @ReadWriteAttribute - public var onmessage: EventHandler - - @ReadWriteAttribute - public var onmessageerror: EventHandler -} - -public class ServiceWorkerRegistration: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[ServiceWorkerStrings.ServiceWorkerRegistration].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _installing = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.installing) - _waiting = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.waiting) - _active = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.active) - _navigationPreload = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.navigationPreload) - _scope = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.scope) - _updateViaCache = ReadonlyAttribute(jsObject: jsObject, name: ServiceWorkerStrings.updateViaCache) - _onupdatefound = ReadWriteAttribute(jsObject: jsObject, name: ServiceWorkerStrings.onupdatefound) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var installing: ServiceWorker? - - @ReadonlyAttribute - public var waiting: ServiceWorker? - - @ReadonlyAttribute - public var active: ServiceWorker? - - @ReadonlyAttribute - public var navigationPreload: NavigationPreloadManager - - @ReadonlyAttribute - public var scope: String - - @ReadonlyAttribute - public var updateViaCache: ServiceWorkerUpdateViaCache - - @inlinable public func update() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.update].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func update() async throws { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.update].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func unregister() -> JSPromise { - let this = jsObject - return this[ServiceWorkerStrings.unregister].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func unregister() async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[ServiceWorkerStrings.unregister].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @ReadWriteAttribute - public var onupdatefound: EventHandler -} - -public enum ServiceWorkerState: JSString, JSValueCompatible { - case parsed = "parsed" - case installing = "installing" - case installed = "installed" - case activating = "activating" - case activated = "activated" - case redundant = "redundant" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ServiceWorkerUpdateViaCache: JSString, JSValueCompatible { - case imports = "imports" - case all = "all" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public extension WindowOrWorkerGlobalScope { - @inlinable var caches: CacheStorage { ReadonlyAttribute[ServiceWorkerStrings.caches, in: jsObject] } -} - -/* variadic generics please */ - -@usableFromInline enum ServiceWorkerStrings { - static let _self: JSString = "self" - @usableFromInline static let Cache: JSString = "Cache" - @usableFromInline static let CacheStorage: JSString = "CacheStorage" - @usableFromInline static let NavigationPreloadManager: JSString = "NavigationPreloadManager" - @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" - @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" - @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" - @usableFromInline static let active: JSString = "active" - @usableFromInline static let add: JSString = "add" - @usableFromInline static let addAll: JSString = "addAll" - @usableFromInline static let cacheName: JSString = "cacheName" - @usableFromInline static let caches: JSString = "caches" - @usableFromInline static let clientId: JSString = "clientId" - @usableFromInline static let controller: JSString = "controller" - @usableFromInline static let delete: JSString = "delete" - @usableFromInline static let disable: JSString = "disable" - @usableFromInline static let enable: JSString = "enable" - @usableFromInline static let enabled: JSString = "enabled" - @usableFromInline static let getRegistration: JSString = "getRegistration" - @usableFromInline static let getRegistrations: JSString = "getRegistrations" - @usableFromInline static let getState: JSString = "getState" - @usableFromInline static let handled: JSString = "handled" - @usableFromInline static let has: JSString = "has" - @usableFromInline static let headerValue: JSString = "headerValue" - @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" - @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" - @usableFromInline static let ignoreVary: JSString = "ignoreVary" - @usableFromInline static let includeUncontrolled: JSString = "includeUncontrolled" - @usableFromInline static let installing: JSString = "installing" - @usableFromInline static let keys: JSString = "keys" - @usableFromInline static let match: JSString = "match" - @usableFromInline static let matchAll: JSString = "matchAll" - @usableFromInline static let navigationPreload: JSString = "navigationPreload" - @usableFromInline static let oncontrollerchange: JSString = "oncontrollerchange" - @usableFromInline static let onmessage: JSString = "onmessage" - @usableFromInline static let onmessageerror: JSString = "onmessageerror" - @usableFromInline static let onstatechange: JSString = "onstatechange" - @usableFromInline static let onupdatefound: JSString = "onupdatefound" - @usableFromInline static let open: JSString = "open" - @usableFromInline static let postMessage: JSString = "postMessage" - @usableFromInline static let preloadResponse: JSString = "preloadResponse" - @usableFromInline static let put: JSString = "put" - @usableFromInline static let ready: JSString = "ready" - @usableFromInline static let register: JSString = "register" - @usableFromInline static let replacesClientId: JSString = "replacesClientId" - @usableFromInline static let request: JSString = "request" - @usableFromInline static let resultingClientId: JSString = "resultingClientId" - @usableFromInline static let scope: JSString = "scope" - @usableFromInline static let scriptURL: JSString = "scriptURL" - @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" - @usableFromInline static let startMessages: JSString = "startMessages" - @usableFromInline static let state: JSString = "state" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let type: JSString = "type" - @usableFromInline static let unregister: JSString = "unregister" - @usableFromInline static let update: JSString = "update" - @usableFromInline static let updateViaCache: JSString = "updateViaCache" - @usableFromInline static let waiting: JSString = "waiting" -} diff --git a/Sources/DOMKitHTML/Support.swift b/Sources/DOMKitHTML/Support.swift deleted file mode 100644 index 89e4f0c8..00000000 --- a/Sources/DOMKitHTML/Support.swift +++ /dev/null @@ -1,4 +0,0 @@ -@_exported import ECMAScript -import JavaScriptKit - -public typealias RequestInfo = JSValue diff --git a/Sources/DOMKitWebIDL/DOMKitWebIDL.swift b/Sources/DOMKitWebIDL/DOMKitWebIDL.swift new file mode 100644 index 00000000..a968cc07 --- /dev/null +++ b/Sources/DOMKitWebIDL/DOMKitWebIDL.swift @@ -0,0 +1,198 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import ECMAScript +import JavaScriptEventLoop +import JavaScriptKit + +public class DOMException: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + self.jsObject = jsObject + } + + @inlinable public convenience init(message: String? = nil, name: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var code: UInt16 + + public static let INDEX_SIZE_ERR: UInt16 = 1 + + public static let DOMSTRING_SIZE_ERR: UInt16 = 2 + + public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 + + public static let WRONG_DOCUMENT_ERR: UInt16 = 4 + + public static let INVALID_CHARACTER_ERR: UInt16 = 5 + + public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 + + public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 + + public static let NOT_FOUND_ERR: UInt16 = 8 + + public static let NOT_SUPPORTED_ERR: UInt16 = 9 + + public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 + + public static let INVALID_STATE_ERR: UInt16 = 11 + + public static let SYNTAX_ERR: UInt16 = 12 + + public static let INVALID_MODIFICATION_ERR: UInt16 = 13 + + public static let NAMESPACE_ERR: UInt16 = 14 + + public static let INVALID_ACCESS_ERR: UInt16 = 15 + + public static let VALIDATION_ERR: UInt16 = 16 + + public static let TYPE_MISMATCH_ERR: UInt16 = 17 + + public static let SECURITY_ERR: UInt16 = 18 + + public static let NETWORK_ERR: UInt16 = 19 + + public static let ABORT_ERR: UInt16 = 20 + + public static let URL_MISMATCH_ERR: UInt16 = 21 + + public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 + + public static let TIMEOUT_ERR: UInt16 = 23 + + public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 + + public static let DATA_CLONE_ERR: UInt16 = 25 +} + +public typealias DOMTimeStamp = UInt64 +public typealias VoidFunction = () -> Void + +/* variadic generics please */ +@propertyWrapper public final class ClosureAttribute0OptionalVoid { + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (() -> Void)? { + get { ClosureAttribute0OptionalVoid[name, in: jsObject] } + set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function() } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { _ in + newValue() + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute0Void { + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: () -> Void { + get { ClosureAttribute0Void[name, in: jsObject] } + set { ClosureAttribute0Void[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { + get { + let function = jsObject[name].function! + return { function() } + } + set { + jsObject[name] = JSClosure { _ in + newValue() + return .undefined + }.jsValue + } + } +} + +@usableFromInline enum Strings { + static let _self: JSString = "self" + @usableFromInline static let DOMException: JSString = "DOMException" + @usableFromInline static let code: JSString = "code" + @usableFromInline static let message: JSString = "message" + @usableFromInline static let name: JSString = "name" + @usableFromInline static let toString: JSString = "toString" +} + +public protocol Any_BufferSource: ConvertibleToJSValue {} +extension ArrayBuffer: Any_BufferSource {} +extension ArrayBufferView: Any_BufferSource {} + +public enum BufferSource: JSValueCompatible, Any_BufferSource { + case arrayBuffer(ArrayBuffer) + case arrayBufferView(ArrayBufferView) + + var arrayBuffer: ArrayBuffer? { + switch self { + case let .arrayBuffer(arrayBuffer): return arrayBuffer + default: return nil + } + } + + var arrayBufferView: ArrayBufferView? { + switch self { + case let .arrayBufferView(arrayBufferView): return arrayBufferView + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let arrayBuffer: ArrayBuffer = value.fromJSValue() { + return .arrayBuffer(arrayBuffer) + } + if let arrayBufferView: ArrayBufferView = value.fromJSValue() { + return .arrayBufferView(arrayBufferView) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .arrayBuffer(arrayBuffer): + return arrayBuffer.jsValue + case let .arrayBufferView(arrayBufferView): + return arrayBufferView.jsValue + } + } +} diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index 68b54aa7..f00f1a35 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -2,13 +2,6 @@ import Foundation import WebIDL enum IDLBuilder { - static let preamble = """ - // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - - import JavaScriptKit - import JavaScriptEventLoop - \n - """ static let ignoredNames: Set = [ // dictionaries that depend on types not exposed to Window environments @@ -31,9 +24,20 @@ enum IDLBuilder { if FileManager.default.fileExists(atPath: path) { try FileManager.default.removeItem(atPath: path) } - try (preamble + content).write(toFile: path, atomically: true, encoding: .utf8) + try content.write(toFile: path, atomically: true, encoding: .utf8) } + static func preamble(imports: [String]) -> SwiftSource { + """ + // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + + import JavaScriptKit + import JavaScriptEventLoop + import ECMAScript + \(lines: imports.map { "import \($0)"}) + + """ + } static func generateIDLBindings(idl: [GenericCollection]) throws -> SwiftSource { let declarations = idl.flatMap(\.array) let merged = DeclarationMerger.merge(declarations: declarations) diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 82362ff7..0c23e85b 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -23,32 +23,36 @@ enum IDLParser { return try JSONDecoder().decode(GenericCollection.self, from: data) } - static func defaultIDLs() -> [(path: URL, shouldBeMerged: Bool)] { - let enabledIDLs: [(name: String, shouldBeMerged: Bool)] = [ - ("dom", true), - ("fetch", true), - ("FileAPI", true), - ("html", true), - ("geometry", true), - ("hr-time", true), - ("referrer-policy", true), - ("uievents", true), - ("wai-aria", true), - ("webidl", true), - ("web-animations", true), - ("xhr", true), - ("service-workers", true), - ("url", true), - ("streams", true), - ("console", true), + static func defaultIDLs() -> [(moduleName: String, paths: [URL], imports: [String])] { + let enabledIDLs: [(moduleName: String, idlNames: [String], imports: [String])] = [ + ("DOMKit", [ + "fetch", + "geometry", + "hr-time", + "referrer-policy", + "uievents", + "wai-aria", + "web-animations", + "xhr", + "service-workers", + "url", + "streams", + "dom", + "html", + ], ["DOMKitConsole", "DOMKitFileAPI", "DOMKitWebIDL"]), + ("DOMKitWebIDL", ["webidl"], []), + ("DOMKitConsole", ["console"], []), + ("DOMKitFileAPI", ["FileAPI"], ["DOMKitWebIDL"]), ] return enabledIDLs.map { idl in - let path = packageDir - .appendingPathComponent("node_modules") - .appendingPathComponent("@webref") - .appendingPathComponent("idl") - .appendingPathComponent(idl.name + ".idl") - return (path, idl.shouldBeMerged) + let paths = idl.idlNames.map { + packageDir + .appendingPathComponent("node_modules") + .appendingPathComponent("@webref") + .appendingPathComponent("idl") + .appendingPathComponent($0 + ".idl") + } + return (idl.moduleName, paths, idl.imports) } } } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 45c0cffb..46a0212b 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -1,23 +1,15 @@ import Foundation import WebIDL -func parseOptions() -> [(outputPath: String, idlPaths: [URL])] { +func parseOptions() -> [(outputPath: String, idlPaths: [URL], imports: [String])] { let args = CommandLine.arguments if args.count > 2 { - return [(args[1], Array(args[2...].map(URL.init(fileURLWithPath: ))))] + return [(args[1], Array(args[2...].map(URL.init(fileURLWithPath: ))), [])] } else { - var mergedSources: [URL] = [] - var separateSources: [(String, [URL])] = [] - for idl in IDLParser.defaultIDLs() { - if idl.shouldBeMerged { - mergedSources.append(idl.path) - } else { - let name = idl.path.deletingPathExtension().lastPathComponent - let outputPath = "Sources/DOMKit/\(name).swift" - separateSources.append((outputPath, [idl.path])) - } + return IDLParser.defaultIDLs().map { idl in + let outputPath = "Sources/\(idl.moduleName)/\(idl.moduleName).swift" + return (outputPath, idl.paths, idl.imports) } - return [("Sources/DOMKit/Generated.swift", mergedSources)] + separateSources } } @@ -26,12 +18,12 @@ main() func main() { do { let options = parseOptions() - for (outputPath, idlPaths) in options { + for (outputPath, idlPaths, imports) in options { Record.reset() let startTime = Date() print("Generating bindings for \(idlPaths.map(\.path))...") let idls = try idlPaths.map { try IDLParser.parseIDL(path: $0) } - try generate(idls: idls, outputPath: outputPath) + try generate(idls: idls, imports: imports, outputPath: outputPath) print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") } } catch { @@ -39,8 +31,12 @@ func main() { } } -private func generate(idls: [GenericCollection], outputPath: String) throws { +private func generate(idls: [GenericCollection], + imports: [String], + outputPath: String, + fileManager: FileManager = .default) throws { var contents: [SwiftSource] = [] + contents.append(IDLBuilder.preamble(imports: imports)) contents.append(try IDLBuilder.generateIDLBindings(idl: idls)) print("Generating closure property wrappers...") contents.append(try IDLBuilder.generateClosureTypes()) @@ -48,6 +44,10 @@ private func generate(idls: [GenericCollection], outputPath: String) th contents.append(try IDLBuilder.generateStrings()) print("Generating union protocols...") contents.append(try IDLBuilder.generateUnions()) + try fileManager.createDirectory( + at: URL(fileURLWithPath: outputPath).deletingLastPathComponent(), + withIntermediateDirectories: true + ) try IDLBuilder.writeFile( path: outputPath, content: contents.joined(separator: "\n\n").source) From 5b8be21d3f0c76c60e0e9c925c77f18e775259e0 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 08:24:31 +0900 Subject: [PATCH 16/24] WIP --- Package.swift | 4 +- Sources/DOMKit/DOMKit.swift | 185 +--------------------- Sources/DOMKitURL/DOMKitURL.swift | 215 ++++++++++++++++++++++++++ Sources/WebIDLToSwift/IDLParser.swift | 4 +- 4 files changed, 221 insertions(+), 187 deletions(-) create mode 100644 Sources/DOMKitURL/DOMKitURL.swift diff --git a/Package.swift b/Package.swift index 034ac61d..338aca71 100644 --- a/Package.swift +++ b/Package.swift @@ -31,11 +31,13 @@ let package = Package( dependencies: dependencyOfWebIDLToSwift + [ "DOMKitFileAPI", "DOMKitConsole", - "DOMKitWebIDL" + "DOMKitWebIDL", + "DOMKitURL", ]), .target(name: "DOMKitConsole", dependencies: dependencyOfWebIDLToSwift), .target(name: "DOMKitFileAPI", dependencies: dependencyOfWebIDLToSwift + ["DOMKitWebIDL"]), .target(name: "DOMKitWebIDL", dependencies: dependencyOfWebIDLToSwift), + .target(name: "DOMKitURL", dependencies: dependencyOfWebIDLToSwift), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", diff --git a/Sources/DOMKit/DOMKit.swift b/Sources/DOMKit/DOMKit.swift index 521af76c..9667212b 100644 --- a/Sources/DOMKit/DOMKit.swift +++ b/Sources/DOMKit/DOMKit.swift @@ -2,6 +2,7 @@ import DOMKitConsole import DOMKitFileAPI +import DOMKitURL import DOMKitWebIDL import ECMAScript import JavaScriptEventLoop @@ -12986,131 +12987,6 @@ public class UIEventInit: BridgedDictionary { public var which: UInt32 } -public class URL: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) - _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) - self.jsObject = jsObject - } - - @inlinable public convenience init(url: String, base: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) - } - - @ReadWriteAttribute - public var href: String - - @ReadonlyAttribute - public var origin: String - - @ReadWriteAttribute - public var `protocol`: String - - @ReadWriteAttribute - public var username: String - - @ReadWriteAttribute - public var password: String - - @ReadWriteAttribute - public var host: String - - @ReadWriteAttribute - public var hostname: String - - @ReadWriteAttribute - public var port: String - - @ReadWriteAttribute - public var pathname: String - - @ReadWriteAttribute - public var search: String - - @ReadonlyAttribute - public var searchParams: URLSearchParams - - @ReadWriteAttribute - public var hash: String - - @inlinable public func toJSON() -> String { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class URLSearchParams: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(init: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAll(name: String) -> [String] { - let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func sort() { - let this = jsObject - _ = this[Strings.sort].function!(this: this, arguments: []) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } -} - public class UnderlyingSink: BridgedDictionary { public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { let object = JSObject.global[Strings.Object].function!.new() @@ -15017,7 +14893,6 @@ public class XSLTProcessor: JSBridgedClass { @usableFromInline static let TreeWalker: JSString = "TreeWalker" @usableFromInline static let UIEvent: JSString = "UIEvent" @usableFromInline static let URL: JSString = "URL" - @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" @usableFromInline static let ValidityState: JSString = "ValidityState" @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" @@ -15994,7 +15869,6 @@ public class XSLTProcessor: JSBridgedClass { @usableFromInline static let scrollbars: JSString = "scrollbars" @usableFromInline static let scrolling: JSString = "scrolling" @usableFromInline static let search: JSString = "search" - @usableFromInline static let searchParams: JSString = "searchParams" @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" @usableFromInline static let seekable: JSString = "seekable" @usableFromInline static let seeking: JSString = "seeking" @@ -16061,7 +15935,6 @@ public class XSLTProcessor: JSBridgedClass { @usableFromInline static let slotAssignment: JSString = "slotAssignment" @usableFromInline static let snapshotItem: JSString = "snapshotItem" @usableFromInline static let snapshotLength: JSString = "snapshotLength" - @usableFromInline static let sort: JSString = "sort" @usableFromInline static let source: JSString = "source" @usableFromInline static let span: JSString = "span" @usableFromInline static let specified: JSString = "specified" @@ -17557,62 +17430,6 @@ public enum String_or_WorkerOptions: JSValueCompatible, Any_String_or_WorkerOpti } } -public protocol Any_String_or_record_String_to_String_or_seq_of_seq_of_String: ConvertibleToJSValue {} -extension String: Any_String_or_record_String_to_String_or_seq_of_seq_of_String {} -extension Dictionary: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Key == String, Value == String {} -extension Array: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Element == [String] {} - -public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCompatible, Any_String_or_record_String_to_String_or_seq_of_seq_of_String { - case string(String) - case record_String_to_String([String: String]) - case seq_of_seq_of_String([[String]]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var record_String_to_String: [String: String]? { - switch self { - case let .record_String_to_String(record_String_to_String): return record_String_to_String - default: return nil - } - } - - var seq_of_seq_of_String: [[String]]? { - switch self { - case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let record_String_to_String: [String: String] = value.fromJSValue() { - return .record_String_to_String(record_String_to_String) - } - if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { - return .seq_of_seq_of_String(seq_of_seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .record_String_to_String(record_String_to_String): - return record_String_to_String.jsValue - case let .seq_of_seq_of_String(seq_of_seq_of_String): - return seq_of_seq_of_String.jsValue - } - } -} - public protocol Any_String_or_seq_of_Double: ConvertibleToJSValue {} extension String: Any_String_or_seq_of_Double {} extension Array: Any_String_or_seq_of_Double where Element == Double {} diff --git a/Sources/DOMKitURL/DOMKitURL.swift b/Sources/DOMKitURL/DOMKitURL.swift new file mode 100644 index 00000000..215aa7c2 --- /dev/null +++ b/Sources/DOMKitURL/DOMKitURL.swift @@ -0,0 +1,215 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import ECMAScript +import JavaScriptEventLoop +import JavaScriptKit + +public class URL: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) + _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) + self.jsObject = jsObject + } + + @inlinable public convenience init(url: String, base: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) + } + + @ReadWriteAttribute + public var href: String + + @ReadonlyAttribute + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var username: String + + @ReadWriteAttribute + public var password: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String + + @ReadonlyAttribute + public var searchParams: URLSearchParams + + @ReadWriteAttribute + public var hash: String + + @inlinable public func toJSON() -> String { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class URLSearchParams: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAll(name: String) -> [String] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func sort() { + let this = jsObject + _ = this[Strings.sort].function!(this: this, arguments: []) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } +} + +/* variadic generics please */ + +@usableFromInline enum Strings { + static let _self: JSString = "self" + @usableFromInline static let URL: JSString = "URL" + @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" + @usableFromInline static let append: JSString = "append" + @usableFromInline static let delete: JSString = "delete" + @usableFromInline static let get: JSString = "get" + @usableFromInline static let getAll: JSString = "getAll" + @usableFromInline static let has: JSString = "has" + @usableFromInline static let hash: JSString = "hash" + @usableFromInline static let host: JSString = "host" + @usableFromInline static let hostname: JSString = "hostname" + @usableFromInline static let href: JSString = "href" + @usableFromInline static let origin: JSString = "origin" + @usableFromInline static let password: JSString = "password" + @usableFromInline static let pathname: JSString = "pathname" + @usableFromInline static let port: JSString = "port" + @usableFromInline static let `protocol`: JSString = "protocol" + @usableFromInline static let search: JSString = "search" + @usableFromInline static let searchParams: JSString = "searchParams" + @usableFromInline static let set: JSString = "set" + @usableFromInline static let sort: JSString = "sort" + @usableFromInline static let toJSON: JSString = "toJSON" + @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let username: JSString = "username" +} + +public protocol Any_String_or_record_String_to_String_or_seq_of_seq_of_String: ConvertibleToJSValue {} +extension String: Any_String_or_record_String_to_String_or_seq_of_seq_of_String {} +extension Dictionary: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Key == String, Value == String {} +extension Array: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Element == [String] {} + +public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCompatible, Any_String_or_record_String_to_String_or_seq_of_seq_of_String { + case string(String) + case record_String_to_String([String: String]) + case seq_of_seq_of_String([[String]]) + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var record_String_to_String: [String: String]? { + switch self { + case let .record_String_to_String(record_String_to_String): return record_String_to_String + default: return nil + } + } + + var seq_of_seq_of_String: [[String]]? { + switch self { + case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let string: String = value.fromJSValue() { + return .string(string) + } + if let record_String_to_String: [String: String] = value.fromJSValue() { + return .record_String_to_String(record_String_to_String) + } + if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { + return .seq_of_seq_of_String(seq_of_seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .string(string): + return string.jsValue + case let .record_String_to_String(record_String_to_String): + return record_String_to_String.jsValue + case let .seq_of_seq_of_String(seq_of_seq_of_String): + return seq_of_seq_of_String.jsValue + } + } +} diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 0c23e85b..57db0020 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -35,12 +35,12 @@ enum IDLParser { "web-animations", "xhr", "service-workers", - "url", "streams", "dom", "html", - ], ["DOMKitConsole", "DOMKitFileAPI", "DOMKitWebIDL"]), + ], ["DOMKitConsole", "DOMKitFileAPI", "DOMKitWebIDL", "DOMKitURL"]), ("DOMKitWebIDL", ["webidl"], []), + ("DOMKitURL", ["url"], []), ("DOMKitConsole", ["console"], []), ("DOMKitFileAPI", ["FileAPI"], ["DOMKitWebIDL"]), ] From 5bfeaef4072b48d3868da9fe8512949f987e1e74 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 09:20:03 +0900 Subject: [PATCH 17/24] Give up typing unions --- Sources/DOMKit/DOMKit.swift | 1674 +---------------- Sources/DOMKitFileAPI/DOMKitFileAPI.swift | 102 +- Sources/DOMKitURL/DOMKitURL.swift | 58 +- Sources/DOMKitWebIDL/DOMKitWebIDL.swift | 42 - Sources/WebIDLToSwift/Context.swift | 11 +- .../UnionType+SwiftRepresentable.swift | 10 +- Sources/WebIDLToSwift/UnionType.swift | 1 - .../WebIDL+SwiftRepresentation.swift | 15 +- 8 files changed, 50 insertions(+), 1863 deletions(-) diff --git a/Sources/DOMKit/DOMKit.swift b/Sources/DOMKit/DOMKit.swift index 9667212b..fc1368e5 100644 --- a/Sources/DOMKit/DOMKit.swift +++ b/Sources/DOMKit/DOMKit.swift @@ -340,7 +340,7 @@ public class AddEventListenerOptions: BridgedDictionary { public protocol Animatable: JSBridgedClass {} public extension Animatable { - @inlinable func animate(keyframes: JSObject?, options: Double_or_KeyframeAnimationOptions? = nil) -> Animation { + @inlinable func animate(keyframes: JSObject?, options: JSValue? = nil) -> Animation { let this = jsObject return this[Strings.animate].function!(this: this, arguments: [keyframes.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } @@ -730,7 +730,7 @@ public class BaseKeyframe: BridgedDictionary { } public class BasePropertyIndexedKeyframe: BridgedDictionary { - public convenience init(offset: nullable_Double_or_seq_of_nullable_Double, easing: String_or_seq_of_String, composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto) { + public convenience init(offset: JSValue, easing: JSValue, composite: JSValue) { let object = JSObject.global[Strings.Object].function!.new() object[Strings.offset] = offset.jsValue object[Strings.easing] = easing.jsValue @@ -746,13 +746,13 @@ public class BasePropertyIndexedKeyframe: BridgedDictionary { } @ReadWriteAttribute - public var offset: nullable_Double_or_seq_of_nullable_Double + public var offset: JSValue @ReadWriteAttribute - public var easing: String_or_seq_of_String + public var easing: JSValue @ReadWriteAttribute - public var composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto + public var composite: JSValue } public class BeforeUnloadEvent: Event { @@ -1242,12 +1242,12 @@ public enum CanvasFillRule: JSString, JSValueCompatible { public protocol CanvasFillStrokeStyles: JSBridgedClass {} public extension CanvasFillStrokeStyles { - @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { + @inlinable var strokeStyle: JSValue { get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } } - @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { + @inlinable var fillStyle: JSValue { get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } } @@ -1288,14 +1288,14 @@ public class CanvasFilter: JSBridgedClass { self.jsObject = jsObject } - @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { + @inlinable public convenience init(filters: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) } } public protocol CanvasFilters: JSBridgedClass {} public extension CanvasFilters { - @inlinable var filter: CanvasFilter_or_String { + @inlinable var filter: JSValue { get { ReadWriteAttribute[Strings.filter, in: jsObject] } nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } } @@ -1512,7 +1512,7 @@ public extension CanvasPath { _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) } - @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { + @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: JSValue? = nil) { let this = jsObject _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) } @@ -1964,17 +1964,17 @@ public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { public protocol ChildNode: JSBridgedClass {} public extension ChildNode { - @inlinable func before(nodes: Node_or_String...) { + @inlinable func before(nodes: JSValue...) { let this = jsObject _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) } - @inlinable func after(nodes: Node_or_String...) { + @inlinable func after(nodes: JSValue...) { let this = jsObject _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) } - @inlinable func replaceWith(nodes: Node_or_String...) { + @inlinable func replaceWith(nodes: JSValue...) { let this = jsObject _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) } @@ -2308,7 +2308,7 @@ public class DOMMatrix: DOMMatrixReadOnly { super.init(unsafelyWrapping: jsObject) } - @inlinable public convenience init(init: String_or_seq_of_Double? = nil) { + @inlinable public convenience init(init: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) } @@ -2690,7 +2690,7 @@ public class DOMMatrixReadOnly: JSBridgedClass { self.jsObject = jsObject } - @inlinable public convenience init(init: String_or_seq_of_Double? = nil) { + @inlinable public convenience init(init: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) } @@ -3581,12 +3581,12 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! } - @inlinable public func createElement(localName: String, options: ElementCreationOptions_or_String? = nil) -> Element { + @inlinable public func createElement(localName: String, options: JSValue? = nil) -> Element { let this = jsObject return this[Strings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: ElementCreationOptions_or_String? = nil) -> Element { + @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: JSValue? = nil) -> Element { let this = jsObject return this[Strings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } @@ -4274,7 +4274,7 @@ public class ElementInternals: JSBridgedClass, ARIAMixin { @ReadonlyAttribute public var shadowRoot: ShadowRoot? - @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { + @inlinable public func setFormValue(value: JSValue?, state: JSValue? = nil) { let this = jsObject _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) } @@ -5338,11 +5338,11 @@ public class HTMLAllCollection: JSBridgedClass { jsObject[key].fromJSValue()! } - @inlinable public subscript(key: String) -> Element_or_HTMLCollection? { + @inlinable public subscript(key: String) -> JSValue? { jsObject[key].fromJSValue() } - @inlinable public func item(nameOrIndex: String? = nil) -> Element_or_HTMLCollection? { + @inlinable public func item(nameOrIndex: String? = nil) -> JSValue? { let this = jsObject return this[Strings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! } @@ -6030,7 +6030,7 @@ public class HTMLFormControlsCollection: HTMLCollection { super.init(unsafelyWrapping: jsObject) } - @inlinable public subscript(key: String) -> Element_or_RadioNodeList? { + @inlinable public subscript(key: String) -> JSValue? { jsObject[key].fromJSValue() } } @@ -6102,7 +6102,7 @@ public class HTMLFormElement: HTMLElement { jsObject[key].fromJSValue()! } - @inlinable public subscript(key: String) -> Element_or_RadioNodeList { + @inlinable public subscript(key: String) -> JSValue { jsObject[key].fromJSValue()! } @@ -7531,7 +7531,7 @@ public class HTMLOptionsCollection: HTMLCollection { // XXX: unsupported setter for keys of type UInt32 - @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { + @inlinable public func add(element: JSValue, before: JSValue? = nil) { let this = jsObject _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) } @@ -7894,7 +7894,7 @@ public class HTMLSelectElement: HTMLElement { return this[Strings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! } - @inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) { + @inlinable public func add(element: JSValue, before: JSValue? = nil) { let this = jsObject _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) } @@ -7973,7 +7973,7 @@ public class HTMLSlotElement: HTMLElement { return this[Strings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable public func assign(nodes: Element_or_Text...) { + @inlinable public func assign(nodes: JSValue...) { let this = jsObject _ = this[Strings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) } @@ -8898,7 +8898,7 @@ public class ImageBitmapRenderingContext: JSBridgedClass { } @ReadonlyAttribute - public var canvas: HTMLCanvasElement_or_OffscreenCanvas + public var canvas: JSValue @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { let this = jsObject @@ -9241,7 +9241,7 @@ public class KeyframeEffect: AnimationEffect { super.init(unsafelyWrapping: jsObject) } - @inlinable public convenience init(target: Element?, keyframes: JSObject?, options: Double_or_KeyframeEffectOptions? = nil) { + @inlinable public convenience init(target: Element?, keyframes: JSObject?, options: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [target.jsValue, keyframes.jsValue, options?.jsValue ?? .undefined])) } @@ -10441,7 +10441,7 @@ public enum OffscreenRenderingContextId: JSString, JSValueCompatible { } public class OptionalEffectTiming: BridgedDictionary { - public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, duration: Double_or_String, direction: PlaybackDirection, easing: String) { + public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, duration: JSValue, direction: PlaybackDirection, easing: String) { let object = JSObject.global[Strings.Object].function!.new() object[Strings.delay] = delay.jsValue object[Strings.endDelay] = endDelay.jsValue @@ -10482,7 +10482,7 @@ public class OptionalEffectTiming: BridgedDictionary { public var iterations: Double @ReadWriteAttribute - public var duration: Double_or_String + public var duration: JSValue @ReadWriteAttribute public var direction: PlaybackDirection @@ -10533,17 +10533,17 @@ public extension ParentNode { @inlinable var childElementCount: UInt32 { ReadonlyAttribute[Strings.childElementCount, in: jsObject] } - @inlinable func prepend(nodes: Node_or_String...) { + @inlinable func prepend(nodes: JSValue...) { let this = jsObject _ = this[Strings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) } - @inlinable func append(nodes: Node_or_String...) { + @inlinable func append(nodes: JSValue...) { let this = jsObject _ = this[Strings.append].function!(this: this, arguments: nodes.map(\.jsValue)) } - @inlinable func replaceChildren(nodes: Node_or_String...) { + @inlinable func replaceChildren(nodes: JSValue...) { let this = jsObject _ = this[Strings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) } @@ -10568,7 +10568,7 @@ public class Path2D: JSBridgedClass, CanvasPath { self.jsObject = jsObject } - @inlinable public convenience init(path: Path2D_or_String? = nil) { + @inlinable public convenience init(path: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) } @@ -12152,7 +12152,7 @@ public class SharedWorker: EventTarget, AbstractWorker { super.init(unsafelyWrapping: jsObject) } - @inlinable public convenience init(scriptURL: String, options: String_or_WorkerOptions? = nil) { + @inlinable public convenience init(scriptURL: String, options: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) } @@ -12740,11 +12740,11 @@ public class TrackEvent: Event { } @ReadonlyAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? + public var track: JSValue? } public class TrackEventInit: BridgedDictionary { - public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { + public convenience init(track: JSValue?) { let object = JSObject.global[Strings.Object].function!.new() object[Strings.track] = track.jsValue self.init(unsafelyWrapping: object) @@ -12756,7 +12756,7 @@ public class TrackEventInit: BridgedDictionary { } @ReadWriteAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? + public var track: JSValue? } public class TransformStream: JSBridgedClass { @@ -12929,7 +12929,7 @@ public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void public typealias EventHandlerNonNull = (Event) -> JSValue -public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue +public typealias OnErrorEventHandlerNonNull = (JSValue, String, UInt32, UInt32, JSValue) -> JSValue public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void public class UIEvent: Event { @@ -14025,7 +14025,7 @@ public class XMLHttpRequest: XMLHttpRequestEventTarget { @ReadonlyAttribute public var upload: XMLHttpRequestUpload - @inlinable public func send(body: Document_or_XMLHttpRequestBodyInit? = nil) { + @inlinable public func send(body: JSValue? = nil) { let this = jsObject _ = this[Strings.send].function!(this: this, arguments: [body?.jsValue ?? .undefined]) } @@ -16085,1599 +16085,3 @@ public class XSLTProcessor: JSBridgedClass { @usableFromInline static let y: JSString = "y" @usableFromInline static let z: JSString = "z" } - -public protocol Any_AudioTrack_or_TextTrack_or_VideoTrack: ConvertibleToJSValue {} -extension AudioTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} -extension TextTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} -extension VideoTrack: Any_AudioTrack_or_TextTrack_or_VideoTrack {} - -public enum AudioTrack_or_TextTrack_or_VideoTrack: JSValueCompatible, Any_AudioTrack_or_TextTrack_or_VideoTrack { - case audioTrack(AudioTrack) - case textTrack(TextTrack) - case videoTrack(VideoTrack) - - var audioTrack: AudioTrack? { - switch self { - case let .audioTrack(audioTrack): return audioTrack - default: return nil - } - } - - var textTrack: TextTrack? { - switch self { - case let .textTrack(textTrack): return textTrack - default: return nil - } - } - - var videoTrack: VideoTrack? { - switch self { - case let .videoTrack(videoTrack): return videoTrack - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let audioTrack: AudioTrack = value.fromJSValue() { - return .audioTrack(audioTrack) - } - if let textTrack: TextTrack = value.fromJSValue() { - return .textTrack(textTrack) - } - if let videoTrack: VideoTrack = value.fromJSValue() { - return .videoTrack(videoTrack) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .audioTrack(audioTrack): - return audioTrack.jsValue - case let .textTrack(textTrack): - return textTrack.jsValue - case let .videoTrack(videoTrack): - return videoTrack.jsValue - } - } -} - -public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} -extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} -extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} - -public enum CanvasFilterInput_or_seq_of_CanvasFilterInput: JSValueCompatible, Any_CanvasFilterInput_or_seq_of_CanvasFilterInput { - case canvasFilterInput(CanvasFilterInput) - case seq_of_CanvasFilterInput([CanvasFilterInput]) - - var canvasFilterInput: CanvasFilterInput? { - switch self { - case let .canvasFilterInput(canvasFilterInput): return canvasFilterInput - default: return nil - } - } - - var seq_of_CanvasFilterInput: [CanvasFilterInput]? { - switch self { - case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): return seq_of_CanvasFilterInput - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasFilterInput: CanvasFilterInput = value.fromJSValue() { - return .canvasFilterInput(canvasFilterInput) - } - if let seq_of_CanvasFilterInput: [CanvasFilterInput] = value.fromJSValue() { - return .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasFilterInput(canvasFilterInput): - return canvasFilterInput.jsValue - case let .seq_of_CanvasFilterInput(seq_of_CanvasFilterInput): - return seq_of_CanvasFilterInput.jsValue - } - } -} - -public protocol Any_CanvasFilter_or_String: ConvertibleToJSValue {} -extension CanvasFilter: Any_CanvasFilter_or_String {} -extension String: Any_CanvasFilter_or_String {} - -public enum CanvasFilter_or_String: JSValueCompatible, Any_CanvasFilter_or_String { - case canvasFilter(CanvasFilter) - case string(String) - - var canvasFilter: CanvasFilter? { - switch self { - case let .canvasFilter(canvasFilter): return canvasFilter - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasFilter: CanvasFilter = value.fromJSValue() { - return .canvasFilter(canvasFilter) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasFilter(canvasFilter): - return canvasFilter.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_CanvasGradient_or_CanvasPattern_or_String: ConvertibleToJSValue {} -extension CanvasGradient: Any_CanvasGradient_or_CanvasPattern_or_String {} -extension CanvasPattern: Any_CanvasGradient_or_CanvasPattern_or_String {} -extension String: Any_CanvasGradient_or_CanvasPattern_or_String {} - -public enum CanvasGradient_or_CanvasPattern_or_String: JSValueCompatible, Any_CanvasGradient_or_CanvasPattern_or_String { - case canvasGradient(CanvasGradient) - case canvasPattern(CanvasPattern) - case string(String) - - var canvasGradient: CanvasGradient? { - switch self { - case let .canvasGradient(canvasGradient): return canvasGradient - default: return nil - } - } - - var canvasPattern: CanvasPattern? { - switch self { - case let .canvasPattern(canvasPattern): return canvasPattern - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasGradient: CanvasGradient = value.fromJSValue() { - return .canvasGradient(canvasGradient) - } - if let canvasPattern: CanvasPattern = value.fromJSValue() { - return .canvasPattern(canvasPattern) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasGradient(canvasGradient): - return canvasGradient.jsValue - case let .canvasPattern(canvasPattern): - return canvasPattern.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: ConvertibleToJSValue {} -extension CompositeOperationOrAuto: Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto {} -extension Array: Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto where Element == CompositeOperationOrAuto {} - -public enum CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: JSValueCompatible, Any_CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto { - case compositeOperationOrAuto(CompositeOperationOrAuto) - case seq_of_CompositeOperationOrAuto([CompositeOperationOrAuto]) - - var compositeOperationOrAuto: CompositeOperationOrAuto? { - switch self { - case let .compositeOperationOrAuto(compositeOperationOrAuto): return compositeOperationOrAuto - default: return nil - } - } - - var seq_of_CompositeOperationOrAuto: [CompositeOperationOrAuto]? { - switch self { - case let .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto): return seq_of_CompositeOperationOrAuto - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let compositeOperationOrAuto: CompositeOperationOrAuto = value.fromJSValue() { - return .compositeOperationOrAuto(compositeOperationOrAuto) - } - if let seq_of_CompositeOperationOrAuto: [CompositeOperationOrAuto] = value.fromJSValue() { - return .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .compositeOperationOrAuto(compositeOperationOrAuto): - return compositeOperationOrAuto.jsValue - case let .seq_of_CompositeOperationOrAuto(seq_of_CompositeOperationOrAuto): - return seq_of_CompositeOperationOrAuto.jsValue - } - } -} - -public protocol Any_DOMPointInit_or_Double: ConvertibleToJSValue {} -extension DOMPointInit: Any_DOMPointInit_or_Double {} -extension Double: Any_DOMPointInit_or_Double {} - -public enum DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double { - case domPointInit(DOMPointInit) - case double(Double) - - var domPointInit: DOMPointInit? { - switch self { - case let .domPointInit(domPointInit): return domPointInit - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let domPointInit: DOMPointInit = value.fromJSValue() { - return .domPointInit(domPointInit) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - } - } -} - -public protocol Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: ConvertibleToJSValue {} -extension DOMPointInit: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} -extension Double: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double {} -extension Array: Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double where Element == DOMPointInit_or_Double {} - -public enum DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: JSValueCompatible, Any_DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double { - case domPointInit(DOMPointInit) - case double(Double) - case seq_of_DOMPointInit_or_Double([DOMPointInit_or_Double]) - - var domPointInit: DOMPointInit? { - switch self { - case let .domPointInit(domPointInit): return domPointInit - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double]? { - switch self { - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): return seq_of_DOMPointInit_or_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let domPointInit: DOMPointInit = value.fromJSValue() { - return .domPointInit(domPointInit) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { - return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): - return seq_of_DOMPointInit_or_Double.jsValue - } - } -} - -public protocol Any_Document_or_XMLHttpRequestBodyInit: ConvertibleToJSValue {} -extension Document: Any_Document_or_XMLHttpRequestBodyInit {} -extension XMLHttpRequestBodyInit: Any_Document_or_XMLHttpRequestBodyInit {} - -public enum Document_or_XMLHttpRequestBodyInit: JSValueCompatible, Any_Document_or_XMLHttpRequestBodyInit { - case document(Document) - case xmlHttpRequestBodyInit(XMLHttpRequestBodyInit) - - var document: Document? { - switch self { - case let .document(document): return document - default: return nil - } - } - - var xmlHttpRequestBodyInit: XMLHttpRequestBodyInit? { - switch self { - case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): return xmlHttpRequestBodyInit - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let document: Document = value.fromJSValue() { - return .document(document) - } - if let xmlHttpRequestBodyInit: XMLHttpRequestBodyInit = value.fromJSValue() { - return .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .document(document): - return document.jsValue - case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): - return xmlHttpRequestBodyInit.jsValue - } - } -} - -public protocol Any_Double_or_KeyframeAnimationOptions: ConvertibleToJSValue {} -extension Double: Any_Double_or_KeyframeAnimationOptions {} -extension KeyframeAnimationOptions: Any_Double_or_KeyframeAnimationOptions {} - -public enum Double_or_KeyframeAnimationOptions: JSValueCompatible, Any_Double_or_KeyframeAnimationOptions { - case double(Double) - case keyframeAnimationOptions(KeyframeAnimationOptions) - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var keyframeAnimationOptions: KeyframeAnimationOptions? { - switch self { - case let .keyframeAnimationOptions(keyframeAnimationOptions): return keyframeAnimationOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let keyframeAnimationOptions: KeyframeAnimationOptions = value.fromJSValue() { - return .keyframeAnimationOptions(keyframeAnimationOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .double(double): - return double.jsValue - case let .keyframeAnimationOptions(keyframeAnimationOptions): - return keyframeAnimationOptions.jsValue - } - } -} - -public protocol Any_Double_or_KeyframeEffectOptions: ConvertibleToJSValue {} -extension Double: Any_Double_or_KeyframeEffectOptions {} -extension KeyframeEffectOptions: Any_Double_or_KeyframeEffectOptions {} - -public enum Double_or_KeyframeEffectOptions: JSValueCompatible, Any_Double_or_KeyframeEffectOptions { - case double(Double) - case keyframeEffectOptions(KeyframeEffectOptions) - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var keyframeEffectOptions: KeyframeEffectOptions? { - switch self { - case let .keyframeEffectOptions(keyframeEffectOptions): return keyframeEffectOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let keyframeEffectOptions: KeyframeEffectOptions = value.fromJSValue() { - return .keyframeEffectOptions(keyframeEffectOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .double(double): - return double.jsValue - case let .keyframeEffectOptions(keyframeEffectOptions): - return keyframeEffectOptions.jsValue - } - } -} - -public protocol Any_Double_or_String: ConvertibleToJSValue {} -extension Double: Any_Double_or_String {} -extension String: Any_Double_or_String {} - -public enum Double_or_String: JSValueCompatible, Any_Double_or_String { - case double(Double) - case string(String) - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .double(double): - return double.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} -extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} -extension String: Any_ElementCreationOptions_or_String {} - -public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { - case elementCreationOptions(ElementCreationOptions) - case string(String) - - var elementCreationOptions: ElementCreationOptions? { - switch self { - case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { - return .elementCreationOptions(elementCreationOptions) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .elementCreationOptions(elementCreationOptions): - return elementCreationOptions.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} -extension Element: Any_Element_or_HTMLCollection {} -extension HTMLCollection: Any_Element_or_HTMLCollection {} - -public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { - case element(Element) - case htmlCollection(HTMLCollection) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var htmlCollection: HTMLCollection? { - switch self { - case let .htmlCollection(htmlCollection): return htmlCollection - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let htmlCollection: HTMLCollection = value.fromJSValue() { - return .htmlCollection(htmlCollection) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .htmlCollection(htmlCollection): - return htmlCollection.jsValue - } - } -} - -public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} -extension Element: Any_Element_or_RadioNodeList {} -extension RadioNodeList: Any_Element_or_RadioNodeList {} - -public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { - case element(Element) - case radioNodeList(RadioNodeList) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var radioNodeList: RadioNodeList? { - switch self { - case let .radioNodeList(radioNodeList): return radioNodeList - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let radioNodeList: RadioNodeList = value.fromJSValue() { - return .radioNodeList(radioNodeList) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .radioNodeList(radioNodeList): - return radioNodeList.jsValue - } - } -} - -public protocol Any_Element_or_Text: ConvertibleToJSValue {} -extension Element: Any_Element_or_Text {} -extension Text: Any_Element_or_Text {} - -public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { - case element(Element) - case text(Text) - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var text: Text? { - switch self { - case let .text(text): return text - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let text: Text = value.fromJSValue() { - return .text(text) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .element(element): - return element.jsValue - case let .text(text): - return text.jsValue - } - } -} - -public protocol Any_Event_or_String: ConvertibleToJSValue {} -extension Event: Any_Event_or_String {} -extension String: Any_Event_or_String {} - -public enum Event_or_String: JSValueCompatible, Any_Event_or_String { - case event(Event) - case string(String) - - var event: Event? { - switch self { - case let .event(event): return event - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let event: Event = value.fromJSValue() { - return .event(event) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .event(event): - return event.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} -extension File: Any_File_or_FormData_or_String {} -extension FormData: Any_File_or_FormData_or_String {} -extension String: Any_File_or_FormData_or_String {} - -public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { - case file(File) - case formData(FormData) - case string(String) - - var file: File? { - switch self { - case let .file(file): return file - default: return nil - } - } - - var formData: FormData? { - switch self { - case let .formData(formData): return formData - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .file(file): - return file.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_FormDataEntryValue: ConvertibleToJSValue {} -extension File: Any_FormDataEntryValue {} -extension String: Any_FormDataEntryValue {} - -public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { - case file(File) - case string(String) - - var file: File? { - switch self { - case let .file(file): return file - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .file(file): - return file.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} -extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} - -public enum HTMLCanvasElement_or_OffscreenCanvas: JSValueCompatible, Any_HTMLCanvasElement_or_OffscreenCanvas { - case htmlCanvasElement(HTMLCanvasElement) - case offscreenCanvas(OffscreenCanvas) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue - } - } -} - -public protocol Any_HTMLElement_or_Int32: ConvertibleToJSValue {} -extension HTMLElement: Any_HTMLElement_or_Int32 {} -extension Int32: Any_HTMLElement_or_Int32 {} - -public enum HTMLElement_or_Int32: JSValueCompatible, Any_HTMLElement_or_Int32 { - case htmlElement(HTMLElement) - case int32(Int32) - - var htmlElement: HTMLElement? { - switch self { - case let .htmlElement(htmlElement): return htmlElement - default: return nil - } - } - - var int32: Int32? { - switch self { - case let .int32(int32): return int32 - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlElement: HTMLElement = value.fromJSValue() { - return .htmlElement(htmlElement) - } - if let int32: Int32 = value.fromJSValue() { - return .int32(int32) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlElement(htmlElement): - return htmlElement.jsValue - case let .int32(int32): - return int32.jsValue - } - } -} - -public protocol Any_HTMLOptGroupElement_or_HTMLOptionElement: ConvertibleToJSValue {} -extension HTMLOptGroupElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} -extension HTMLOptionElement: Any_HTMLOptGroupElement_or_HTMLOptionElement {} - -public enum HTMLOptGroupElement_or_HTMLOptionElement: JSValueCompatible, Any_HTMLOptGroupElement_or_HTMLOptionElement { - case htmlOptGroupElement(HTMLOptGroupElement) - case htmlOptionElement(HTMLOptionElement) - - var htmlOptGroupElement: HTMLOptGroupElement? { - switch self { - case let .htmlOptGroupElement(htmlOptGroupElement): return htmlOptGroupElement - default: return nil - } - } - - var htmlOptionElement: HTMLOptionElement? { - switch self { - case let .htmlOptionElement(htmlOptionElement): return htmlOptionElement - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlOptGroupElement: HTMLOptGroupElement = value.fromJSValue() { - return .htmlOptGroupElement(htmlOptGroupElement) - } - if let htmlOptionElement: HTMLOptionElement = value.fromJSValue() { - return .htmlOptionElement(htmlOptionElement) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlOptGroupElement(htmlOptGroupElement): - return htmlOptGroupElement.jsValue - case let .htmlOptionElement(htmlOptionElement): - return htmlOptionElement.jsValue - } - } -} - -public protocol Any_HeadersInit: ConvertibleToJSValue {} -extension Dictionary: Any_HeadersInit where Key == String, Value == String {} -extension Array: Any_HeadersInit where Element == [String] {} - -public enum HeadersInit: JSValueCompatible, Any_HeadersInit { - case record_String_to_String([String: String]) - case seq_of_seq_of_String([[String]]) - - var record_String_to_String: [String: String]? { - switch self { - case let .record_String_to_String(record_String_to_String): return record_String_to_String - default: return nil - } - } - - var seq_of_seq_of_String: [[String]]? { - switch self { - case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let record_String_to_String: [String: String] = value.fromJSValue() { - return .record_String_to_String(record_String_to_String) - } - if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { - return .seq_of_seq_of_String(seq_of_seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .record_String_to_String(record_String_to_String): - return record_String_to_String.jsValue - case let .seq_of_seq_of_String(seq_of_seq_of_String): - return seq_of_seq_of_String.jsValue - } - } -} - -public protocol Any_ImageBitmapSource: ConvertibleToJSValue {} -extension Blob: Any_ImageBitmapSource {} -extension CanvasImageSource: Any_ImageBitmapSource {} -extension ImageData: Any_ImageBitmapSource {} - -public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource { - case blob(Blob) - case canvasImageSource(CanvasImageSource) - case imageData(ImageData) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var canvasImageSource: CanvasImageSource? { - switch self { - case let .canvasImageSource(canvasImageSource): return canvasImageSource - default: return nil - } - } - - var imageData: ImageData? { - switch self { - case let .imageData(imageData): return imageData - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let canvasImageSource: CanvasImageSource = value.fromJSValue() { - return .canvasImageSource(canvasImageSource) - } - if let imageData: ImageData = value.fromJSValue() { - return .imageData(imageData) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .canvasImageSource(canvasImageSource): - return canvasImageSource.jsValue - case let .imageData(imageData): - return imageData.jsValue - } - } -} - -public protocol Any_MessageEventSource: ConvertibleToJSValue {} -extension MessagePort: Any_MessageEventSource {} -extension ServiceWorker: Any_MessageEventSource {} -extension WindowProxy: Any_MessageEventSource {} - -public enum MessageEventSource: JSValueCompatible, Any_MessageEventSource { - case messagePort(MessagePort) - case serviceWorker(ServiceWorker) - case windowProxy(WindowProxy) - - var messagePort: MessagePort? { - switch self { - case let .messagePort(messagePort): return messagePort - default: return nil - } - } - - var serviceWorker: ServiceWorker? { - switch self { - case let .serviceWorker(serviceWorker): return serviceWorker - default: return nil - } - } - - var windowProxy: WindowProxy? { - switch self { - case let .windowProxy(windowProxy): return windowProxy - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let messagePort: MessagePort = value.fromJSValue() { - return .messagePort(messagePort) - } - if let serviceWorker: ServiceWorker = value.fromJSValue() { - return .serviceWorker(serviceWorker) - } - if let windowProxy: WindowProxy = value.fromJSValue() { - return .windowProxy(windowProxy) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .messagePort(messagePort): - return messagePort.jsValue - case let .serviceWorker(serviceWorker): - return serviceWorker.jsValue - case let .windowProxy(windowProxy): - return windowProxy.jsValue - } - } -} - -public protocol Any_Node_or_String: ConvertibleToJSValue {} -extension Node: Any_Node_or_String {} -extension String: Any_Node_or_String {} - -public enum Node_or_String: JSValueCompatible, Any_Node_or_String { - case node(Node) - case string(String) - - var node: Node? { - switch self { - case let .node(node): return node - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let node: Node = value.fromJSValue() { - return .node(node) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .node(node): - return node.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_Path2D_or_String: ConvertibleToJSValue {} -extension Path2D: Any_Path2D_or_String {} -extension String: Any_Path2D_or_String {} - -public enum Path2D_or_String: JSValueCompatible, Any_Path2D_or_String { - case path2D(Path2D) - case string(String) - - var path2D: Path2D? { - switch self { - case let .path2D(path2D): return path2D - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let path2D: Path2D = value.fromJSValue() { - return .path2D(path2D) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .path2D(path2D): - return path2D.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_ReadableStreamController: ConvertibleToJSValue {} -extension ReadableByteStreamController: Any_ReadableStreamController {} -extension ReadableStreamDefaultController: Any_ReadableStreamController {} - -public enum ReadableStreamController: JSValueCompatible, Any_ReadableStreamController { - case readableByteStreamController(ReadableByteStreamController) - case readableStreamDefaultController(ReadableStreamDefaultController) - - var readableByteStreamController: ReadableByteStreamController? { - switch self { - case let .readableByteStreamController(readableByteStreamController): return readableByteStreamController - default: return nil - } - } - - var readableStreamDefaultController: ReadableStreamDefaultController? { - switch self { - case let .readableStreamDefaultController(readableStreamDefaultController): return readableStreamDefaultController - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let readableByteStreamController: ReadableByteStreamController = value.fromJSValue() { - return .readableByteStreamController(readableByteStreamController) - } - if let readableStreamDefaultController: ReadableStreamDefaultController = value.fromJSValue() { - return .readableStreamDefaultController(readableStreamDefaultController) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .readableByteStreamController(readableByteStreamController): - return readableByteStreamController.jsValue - case let .readableStreamDefaultController(readableStreamDefaultController): - return readableStreamDefaultController.jsValue - } - } -} - -public protocol Any_ReadableStreamReader: ConvertibleToJSValue {} -extension ReadableStreamBYOBReader: Any_ReadableStreamReader {} -extension ReadableStreamDefaultReader: Any_ReadableStreamReader {} - -public enum ReadableStreamReader: JSValueCompatible, Any_ReadableStreamReader { - case readableStreamBYOBReader(ReadableStreamBYOBReader) - case readableStreamDefaultReader(ReadableStreamDefaultReader) - - var readableStreamBYOBReader: ReadableStreamBYOBReader? { - switch self { - case let .readableStreamBYOBReader(readableStreamBYOBReader): return readableStreamBYOBReader - default: return nil - } - } - - var readableStreamDefaultReader: ReadableStreamDefaultReader? { - switch self { - case let .readableStreamDefaultReader(readableStreamDefaultReader): return readableStreamDefaultReader - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let readableStreamBYOBReader: ReadableStreamBYOBReader = value.fromJSValue() { - return .readableStreamBYOBReader(readableStreamBYOBReader) - } - if let readableStreamDefaultReader: ReadableStreamDefaultReader = value.fromJSValue() { - return .readableStreamDefaultReader(readableStreamDefaultReader) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .readableStreamBYOBReader(readableStreamBYOBReader): - return readableStreamBYOBReader.jsValue - case let .readableStreamDefaultReader(readableStreamDefaultReader): - return readableStreamDefaultReader.jsValue - } - } -} - -public protocol Any_RequestInfo: ConvertibleToJSValue {} -extension Request: Any_RequestInfo {} -extension String: Any_RequestInfo {} - -public enum RequestInfo: JSValueCompatible, Any_RequestInfo { - case request(Request) - case string(String) - - var request: Request? { - switch self { - case let .request(request): return request - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let request: Request = value.fromJSValue() { - return .request(request) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .request(request): - return request.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_String_or_WorkerOptions: ConvertibleToJSValue {} -extension String: Any_String_or_WorkerOptions {} -extension WorkerOptions: Any_String_or_WorkerOptions {} - -public enum String_or_WorkerOptions: JSValueCompatible, Any_String_or_WorkerOptions { - case string(String) - case workerOptions(WorkerOptions) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var workerOptions: WorkerOptions? { - switch self { - case let .workerOptions(workerOptions): return workerOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let workerOptions: WorkerOptions = value.fromJSValue() { - return .workerOptions(workerOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .workerOptions(workerOptions): - return workerOptions.jsValue - } - } -} - -public protocol Any_String_or_seq_of_Double: ConvertibleToJSValue {} -extension String: Any_String_or_seq_of_Double {} -extension Array: Any_String_or_seq_of_Double where Element == Double {} - -public enum String_or_seq_of_Double: JSValueCompatible, Any_String_or_seq_of_Double { - case string(String) - case seq_of_Double([Double]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var seq_of_Double: [Double]? { - switch self { - case let .seq_of_Double(seq_of_Double): return seq_of_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let seq_of_Double: [Double] = value.fromJSValue() { - return .seq_of_Double(seq_of_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .seq_of_Double(seq_of_Double): - return seq_of_Double.jsValue - } - } -} - -public protocol Any_String_or_seq_of_String: ConvertibleToJSValue {} -extension String: Any_String_or_seq_of_String {} -extension Array: Any_String_or_seq_of_String where Element == String {} - -public enum String_or_seq_of_String: JSValueCompatible, Any_String_or_seq_of_String { - case string(String) - case seq_of_String([String]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var seq_of_String: [String]? { - switch self { - case let .seq_of_String(seq_of_String): return seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let seq_of_String: [String] = value.fromJSValue() { - return .seq_of_String(seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .seq_of_String(seq_of_String): - return seq_of_String.jsValue - } - } -} - -public protocol Any_TimerHandler: ConvertibleToJSValue {} -extension JSFunction: Any_TimerHandler {} -extension String: Any_TimerHandler {} - -public enum TimerHandler: JSValueCompatible, Any_TimerHandler { - case jsFunction(JSFunction) - case string(String) - - var jsFunction: JSFunction? { - switch self { - case let .jsFunction(jsFunction): return jsFunction - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let jsFunction: JSFunction = value.fromJSValue() { - return .jsFunction(jsFunction) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .jsFunction(jsFunction): - return jsFunction.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} -extension Blob: Any_XMLHttpRequestBodyInit {} -extension BufferSource: Any_XMLHttpRequestBodyInit {} -extension FormData: Any_XMLHttpRequestBodyInit {} -extension String: Any_XMLHttpRequestBodyInit {} -extension URLSearchParams: Any_XMLHttpRequestBodyInit {} - -public enum XMLHttpRequestBodyInit: JSValueCompatible, Any_XMLHttpRequestBodyInit { - case blob(Blob) - case bufferSource(BufferSource) - case formData(FormData) - case string(String) - case urlSearchParams(URLSearchParams) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var formData: FormData? { - switch self { - case let .formData(formData): return formData - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var urlSearchParams: URLSearchParams? { - switch self { - case let .urlSearchParams(urlSearchParams): return urlSearchParams - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - if let urlSearchParams: URLSearchParams = value.fromJSValue() { - return .urlSearchParams(urlSearchParams) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue - case let .urlSearchParams(urlSearchParams): - return urlSearchParams.jsValue - } - } -} - -public protocol Any_nullable_Double_or_seq_of_nullable_Double: ConvertibleToJSValue {} -extension Optional: Any_nullable_Double_or_seq_of_nullable_Double where Wrapped == Double {} -extension Array: Any_nullable_Double_or_seq_of_nullable_Double where Element == Double? {} - -public enum nullable_Double_or_seq_of_nullable_Double: JSValueCompatible, Any_nullable_Double_or_seq_of_nullable_Double { - case nullable_Double(Double?) - case seq_of_nullable_Double([Double?]) - - var nullable_Double: Double?? { - switch self { - case let .nullable_Double(nullable_Double): return nullable_Double - default: return nil - } - } - - var seq_of_nullable_Double: [Double?]? { - switch self { - case let .seq_of_nullable_Double(seq_of_nullable_Double): return seq_of_nullable_Double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let nullable_Double: Double? = value.fromJSValue() { - return .nullable_Double(nullable_Double) - } - if let seq_of_nullable_Double: [Double?] = value.fromJSValue() { - return .seq_of_nullable_Double(seq_of_nullable_Double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .nullable_Double(nullable_Double): - return nullable_Double.jsValue - case let .seq_of_nullable_Double(seq_of_nullable_Double): - return seq_of_nullable_Double.jsValue - } - } -} diff --git a/Sources/DOMKitFileAPI/DOMKitFileAPI.swift b/Sources/DOMKitFileAPI/DOMKitFileAPI.swift index a670b129..4c979a34 100644 --- a/Sources/DOMKitFileAPI/DOMKitFileAPI.swift +++ b/Sources/DOMKitFileAPI/DOMKitFileAPI.swift @@ -206,7 +206,7 @@ public class FileReader: EventTarget { public var readyState: UInt16 @ReadonlyAttribute - public var result: ArrayBuffer_or_String? + public var result: JSValue? @ReadonlyAttribute public var error: DOMException? @@ -239,7 +239,7 @@ public class URL: JSBridgedClass { self.jsObject = jsObject } - @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { + @inlinable public static func createObjectURL(obj: JSValue) -> String { let this = constructor return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! } @@ -287,101 +287,3 @@ public class URL: JSBridgedClass { @usableFromInline static let toString: JSString = "toString" @usableFromInline static let type: JSString = "type" } - -public protocol Any_ArrayBuffer_or_String: ConvertibleToJSValue {} -extension ArrayBuffer: Any_ArrayBuffer_or_String {} -extension String: Any_ArrayBuffer_or_String {} - -public enum ArrayBuffer_or_String: JSValueCompatible, Any_ArrayBuffer_or_String { - case arrayBuffer(ArrayBuffer) - case string(String) - - var arrayBuffer: ArrayBuffer? { - switch self { - case let .arrayBuffer(arrayBuffer): return arrayBuffer - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let arrayBuffer: ArrayBuffer = value.fromJSValue() { - return .arrayBuffer(arrayBuffer) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .arrayBuffer(arrayBuffer): - return arrayBuffer.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_BlobPart: ConvertibleToJSValue {} -extension Blob: Any_BlobPart {} -extension BufferSource: Any_BlobPart {} -extension String: Any_BlobPart {} - -public enum BlobPart: JSValueCompatible, Any_BlobPart { - case blob(Blob) - case bufferSource(BufferSource) - case string(String) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .string(string): - return string.jsValue - } - } -} diff --git a/Sources/DOMKitURL/DOMKitURL.swift b/Sources/DOMKitURL/DOMKitURL.swift index 215aa7c2..abcda9bd 100644 --- a/Sources/DOMKitURL/DOMKitURL.swift +++ b/Sources/DOMKitURL/DOMKitURL.swift @@ -80,7 +80,7 @@ public class URLSearchParams: JSBridgedClass, Sequence { self.jsObject = jsObject } - @inlinable public convenience init(init: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { + @inlinable public convenience init(init: JSValue? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) } @@ -157,59 +157,3 @@ public class URLSearchParams: JSBridgedClass, Sequence { @usableFromInline static let toString: JSString = "toString" @usableFromInline static let username: JSString = "username" } - -public protocol Any_String_or_record_String_to_String_or_seq_of_seq_of_String: ConvertibleToJSValue {} -extension String: Any_String_or_record_String_to_String_or_seq_of_seq_of_String {} -extension Dictionary: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Key == String, Value == String {} -extension Array: Any_String_or_record_String_to_String_or_seq_of_seq_of_String where Element == [String] {} - -public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCompatible, Any_String_or_record_String_to_String_or_seq_of_seq_of_String { - case string(String) - case record_String_to_String([String: String]) - case seq_of_seq_of_String([[String]]) - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var record_String_to_String: [String: String]? { - switch self { - case let .record_String_to_String(record_String_to_String): return record_String_to_String - default: return nil - } - } - - var seq_of_seq_of_String: [[String]]? { - switch self { - case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let string: String = value.fromJSValue() { - return .string(string) - } - if let record_String_to_String: [String: String] = value.fromJSValue() { - return .record_String_to_String(record_String_to_String) - } - if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { - return .seq_of_seq_of_String(seq_of_seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .string(string): - return string.jsValue - case let .record_String_to_String(record_String_to_String): - return record_String_to_String.jsValue - case let .seq_of_seq_of_String(seq_of_seq_of_String): - return seq_of_seq_of_String.jsValue - } - } -} diff --git a/Sources/DOMKitWebIDL/DOMKitWebIDL.swift b/Sources/DOMKitWebIDL/DOMKitWebIDL.swift index a968cc07..bf0c1eaf 100644 --- a/Sources/DOMKitWebIDL/DOMKitWebIDL.swift +++ b/Sources/DOMKitWebIDL/DOMKitWebIDL.swift @@ -154,45 +154,3 @@ public typealias VoidFunction = () -> Void @usableFromInline static let name: JSString = "name" @usableFromInline static let toString: JSString = "toString" } - -public protocol Any_BufferSource: ConvertibleToJSValue {} -extension ArrayBuffer: Any_BufferSource {} -extension ArrayBufferView: Any_BufferSource {} - -public enum BufferSource: JSValueCompatible, Any_BufferSource { - case arrayBuffer(ArrayBuffer) - case arrayBufferView(ArrayBufferView) - - var arrayBuffer: ArrayBuffer? { - switch self { - case let .arrayBuffer(arrayBuffer): return arrayBuffer - default: return nil - } - } - - var arrayBufferView: ArrayBufferView? { - switch self { - case let .arrayBufferView(arrayBufferView): return arrayBufferView - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let arrayBuffer: ArrayBuffer = value.fromJSValue() { - return .arrayBuffer(arrayBuffer) - } - if let arrayBufferView: ArrayBufferView = value.fromJSValue() { - return .arrayBufferView(arrayBufferView) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .arrayBuffer(arrayBuffer): - return arrayBuffer.jsValue - case let .arrayBufferView(arrayBufferView): - return arrayBufferView.jsValue - } - } -} diff --git a/Sources/WebIDLToSwift/Context.swift b/Sources/WebIDLToSwift/Context.swift index 86a9f389..895acdf9 100644 --- a/Sources/WebIDLToSwift/Context.swift +++ b/Sources/WebIDLToSwift/Context.swift @@ -79,6 +79,7 @@ enum Context { struct Record { private(set) var closurePatterns: Set = [] private(set) var strings: Set = ["toString"] + @available(*, deprecated) private(set) var unions: Set = [] private(set) static var current = Record() @@ -95,16 +96,6 @@ struct Record { return "Strings.\(name)" } - @discardableResult - static func useUnion(_ types: Set) -> String { - let union = current.unions.first(where: { $0.types == types }) ?? UnionType(types: types) - useUnion(union) - return union.name - } - static func useUnion(_ union: UnionType) { - current.unions.insert(union) - } - static func useClosurePattern(_ closurePattern: ClosurePattern) { current.closurePatterns.insert(closurePattern) } diff --git a/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift b/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift index 45843508..7677eb63 100644 --- a/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift +++ b/Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift @@ -170,8 +170,8 @@ extension SlimIDLType.TypeValue: SwiftRepresentable { } return "\(name)" } - case let .union(types): - return "\(Record.useUnion(types))" + case .union: + return "JSValue" } } @@ -200,12 +200,12 @@ extension SlimIDLType.TypeValue: SwiftRepresentable { } return "\(name)" } - case let .union(types): - return "\(Record.useUnion(types))" + case .union: + return "JSValue" } } } func unionName(types: Set) -> String { - Record.useUnion(types) + "JSValue" } diff --git a/Sources/WebIDLToSwift/UnionType.swift b/Sources/WebIDLToSwift/UnionType.swift index a22f210e..9c09e69d 100644 --- a/Sources/WebIDLToSwift/UnionType.swift +++ b/Sources/WebIDLToSwift/UnionType.swift @@ -59,7 +59,6 @@ struct SlimIDLType: Hashable, Encodable { case let .union(types): let slimmed = Set(types.map(SlimIDLType.init)) self = .union(slimmed) - Record.useUnion(UnionType(types: slimmed)) } } } diff --git a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift index a8ca6afe..b5b560a1 100644 --- a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift +++ b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift @@ -639,19 +639,8 @@ extension IDLType: SwiftRepresentable { extension IDLTypedef: SwiftRepresentable { var swiftRepresentation: SwiftSource { - if case let .union(types) = idlType.value { - let typeSet = Set(types.map(SlimIDLType.init)) - if let existing = Record.current.unions.first(where: { $0.types == typeSet }) { - if let existingName = existing.friendlyName { - return "public typealias \(name) = \(existingName)" - } else { - existing.friendlyName = name - return "" - } - } else { - Record.useUnion(UnionType(types: typeSet, friendlyName: name)) - return "" - } + if case .union = idlType.value { + return "" } return "public typealias \(name) = \(idlType)" } From cb52a3c31aa87f872c8a6b4278b84fc078623fb9 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 14:37:02 +0900 Subject: [PATCH 18/24] WIP --- Sources/WebIDL/Constructor.swift | 3 + Sources/WebIDL/Enum.swift | 3 + Sources/WebIDL/Includes.swift | 3 + Sources/WebIDL/InterfaceMixin.swift | 3 + Sources/WebIDL/Node.swift | 26 ++ Sources/WebIDL/Operation.swift | 4 + Sources/WebIDLToSwift/DeclGraph.swift | 226 ++++++++++++++++++ Sources/WebIDLToSwift/MergeDeclarations.swift | 4 +- 8 files changed, 269 insertions(+), 3 deletions(-) create mode 100644 Sources/WebIDLToSwift/DeclGraph.swift diff --git a/Sources/WebIDL/Constructor.swift b/Sources/WebIDL/Constructor.swift index 3dbb7386..33bb6212 100644 --- a/Sources/WebIDL/Constructor.swift +++ b/Sources/WebIDL/Constructor.swift @@ -2,4 +2,7 @@ public struct IDLConstructor: IDLNode { public static let type = "constructor" public let arguments: [IDLArgument] public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Enum.swift b/Sources/WebIDL/Enum.swift index e4e7dfad..d94ad70f 100644 --- a/Sources/WebIDL/Enum.swift +++ b/Sources/WebIDL/Enum.swift @@ -8,4 +8,7 @@ public struct IDLEnum: IDLNode, IDLNamed { private struct Value: Decodable { let value: String } + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Includes.swift b/Sources/WebIDL/Includes.swift index 7f036ebe..4444eaca 100644 --- a/Sources/WebIDL/Includes.swift +++ b/Sources/WebIDL/Includes.swift @@ -3,4 +3,7 @@ public struct IDLIncludes: IDLNode { public let target: String public let includes: String public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/InterfaceMixin.swift b/Sources/WebIDL/InterfaceMixin.swift index 7bf257a6..853c61c5 100644 --- a/Sources/WebIDL/InterfaceMixin.swift +++ b/Sources/WebIDL/InterfaceMixin.swift @@ -4,6 +4,9 @@ public struct IDLInterfaceMixin: IDLNode, IDLNamed { public let partial: Bool public let members: GenericCollection public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } public protocol IDLInterfaceMixinMember: IDLNode, IDLNamed {} diff --git a/Sources/WebIDL/Node.swift b/Sources/WebIDL/Node.swift index 614cb7fd..85b660ab 100644 --- a/Sources/WebIDL/Node.swift +++ b/Sources/WebIDL/Node.swift @@ -1,6 +1,8 @@ public protocol IDLNode: Decodable { static var type: String { get } var extAttrs: [IDLExtendedAttribute] { get } + + func accept(visitor: inout V) } public protocol IDLNamed { @@ -48,3 +50,27 @@ struct IDLNodeDecoder: Decodable { node = try idlType.init(from: decoder) } } + +public protocol IDLDeclVisitor { + mutating func visit(_ interface: IDLInterface) + mutating func visit(_ interfaceMixin: IDLInterfaceMixin) + mutating func visit(_ include: IDLIncludes) + mutating func visit(_ callback: IDLCallback) + mutating func visit(_ typedef: IDLTypedef) + mutating func visit(_ operation: IDLOperation) + mutating func visit(_ constructor: IDLConstructor) + mutating func visit(_ enum: IDLEnum) + mutating func visit(_ rawNode: IDLNode) +} + +public extension IDLDeclVisitor { + mutating func visitRoot(_ node: IDLNode) { + node.accept(visitor: &self) + } +} + +public extension IDLNode { + func accept(visitor: inout V) { +// visitor.visit(self) + } +} diff --git a/Sources/WebIDL/Operation.swift b/Sources/WebIDL/Operation.swift index 57201f40..54881587 100644 --- a/Sources/WebIDL/Operation.swift +++ b/Sources/WebIDL/Operation.swift @@ -5,4 +5,8 @@ public struct IDLOperation: IDLNode, IDLNamed { public let name: String public let arguments: [IDLArgument] public let extAttrs: [IDLExtendedAttribute] + + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDLToSwift/DeclGraph.swift b/Sources/WebIDLToSwift/DeclGraph.swift new file mode 100644 index 00000000..993dec4e --- /dev/null +++ b/Sources/WebIDLToSwift/DeclGraph.swift @@ -0,0 +1,226 @@ +import WebIDL + +class IDLSource { + let name: String + init(name: String) { + self.name = name + } +} + +protocol IDLCodeGenUnit: IDLNode { + var name: String { get } +} +extension IDLInterface: IDLCodeGenUnit {} +extension IDLInterfaceMixin: IDLCodeGenUnit {} + +struct DeclGraph { + + struct UnownedNode { + unowned let value: Node + } + + typealias NodeId = Array.Index + + final class Node: Hashable { + let declNode: IDLCodeGenUnit + let source: IDLSource + + init(declNode: IDLCodeGenUnit, source: IDLSource) { + self.declNode = declNode + self.source = source + } + + static func == (lhs: DeclGraph.Node, rhs: DeclGraph.Node) -> Bool { + lhs === rhs + } + + func hash(into hasher: inout Hasher) { + hasher.combine(ObjectIdentifier(self)) + } + } + + private var resolutions: [UnresolvedRef: [NodeId]] = [:] + private var nodes: [Node] = [] + private(set) var forwardEdges: [NodeId: [NodeId]] = [:] + + private var nodeByName: [String: NodeId] = [:] + private var sources: [String: IDLSource] = [:] + + mutating func addEdge(from source: NodeId, to destination: NodeId) { + self.forwardEdges[source, default: []].append(destination) + } + + private mutating func collect(unitName: String, decls: [IDLNode]) { + let source = sources[unitName, default: IDLSource(name: unitName)] + for decl in decls { + guard let decl = decl as? IDLCodeGenUnit else { + fatalError("\(decl) is not IDLCodeGenUnit") + } + let newNodeId = nodes.count + let newNode = Node(declNode: decl, source: source) + nodes.append(newNode) + nodeByName[decl.name] = newNodeId + + IDLDeclWalker.walk( + root: decl, + preWalk: { decl in + resolutions[decl, default: []].append(newNodeId) + } + ) + } + } + + private mutating func resolve() { + for (ref, onResolved) in resolutions { + let node = resolve(ref: ref) + onResolved.forEach { sourceNode in + self.addEdge(from: sourceNode, to: node) + } + } + resolutions = [:] + } + + private func resolve(ref: UnresolvedRef) -> NodeId { + switch ref { + case .identifier(let id): + guard let node = nodeByName[id] else { + fatalError("'\(id)' not found") + } + return node + case .type: + fatalError("TODO") + } + } + + func transposed() -> DeclGraph { + var graph = self + graph.forwardEdges = [:] + for (source, destinations) in forwardEdges { + for dest in destinations { + graph.addEdge(from: dest, to: source) + } + } + return graph + } + + private func walkDFS(node: NodeId, postWalk: (NodeId) -> Void, visited: inout Set) { + func visit(_ node: NodeId) { + visited.insert(node) + for neighbor in forwardEdges[node] ?? [] { + guard !visited.contains(neighbor) else { + continue + } + visit(neighbor) + } + postWalk(node) + } + visit(node) + } + + func buildSCC() -> [Set] { + var postOrder: [NodeId] = [] + do { + var visited: Set = [] + for node in nodes.indices { + guard !visited.contains(node) else { continue } + walkDFS(node: node, postWalk: { postOrder.append($0) }, visited: &visited) + } + } + + var results: [Set] = [] + do { + let trans = transposed() + var visited: Set = [] + for node in postOrder.reversed() { + var sccSet: Set = [] + trans.walkDFS(node: node, postWalk: { sccSet.insert($0) }, visited: &visited) + results.append(sccSet) + } + } + return results + } + + static func build(from idls: [(unitName: String, collection: [IDLNode])]) -> DeclGraph { + var graph = DeclGraph() + + for idl in idls { + graph.collect(unitName: idl.unitName, decls: idl.collection) + } + graph.resolve() + return graph + } +} + +enum UnresolvedRef: Hashable { + case identifier(String) + case type(IDLType) +} + +fileprivate struct IDLDeclWalker: IDLDeclVisitor { + + let preWalk: (UnresolvedRef) -> Void + + static func walk(root: IDLNode, preWalk: (UnresolvedRef) -> Void) { + withoutActuallyEscaping(preWalk) { preWalk in + var walker = IDLDeclWalker(preWalk: preWalk) + walker.process(root) + } + } + + mutating public func visit(_ interface: IDLInterface) { + for member in interface.members { + self.process(member) + } + } + + mutating public func visit(_ interfaceMixin: IDLInterfaceMixin) { + for member in interfaceMixin.members { + self.process(member) + } + } + + public mutating func visit(_ include: IDLIncludes) { + process(.identifier(include.includes)) + process(.identifier(include.target)) + } + + public mutating func visit(_ callback: IDLCallback) { + process(.type(callback.idlType)) + for argument in callback.arguments { + process(argument) + } + } + + public mutating func visit(_ typedef: IDLTypedef) { + process(.type(typedef.idlType)) + } + + public mutating func visit(_ operation: IDLOperation) { + if let idlType = operation.idlType { + process(.type(idlType)) + } + for argument in operation.arguments { + process(argument) + } + } + + public mutating func visit(_ constructor: IDLConstructor) { + for argument in constructor.arguments { + process(argument) + } + } + + public func visit(_ enum: IDLEnum) {} + + public func visit(_ rawNode: IDLNode) { + fatalError("Unhandled IDLNode in IDLDeclWalker: \(rawNode)") + } + + mutating func process(_ node: IDLNode) { + self.visitRoot(node) + } + + mutating func process(_ node: UnresolvedRef) { + self.preWalk(node) + } +} diff --git a/Sources/WebIDLToSwift/MergeDeclarations.swift b/Sources/WebIDLToSwift/MergeDeclarations.swift index f0ad3d74..6b3151cf 100644 --- a/Sources/WebIDLToSwift/MergeDeclarations.swift +++ b/Sources/WebIDLToSwift/MergeDeclarations.swift @@ -176,9 +176,7 @@ enum DeclarationMerger { } } -protocol DeclarationFile { - var name: String { get } -} +protocol DeclarationFile: IDLNamed {} extension IDLEnum: DeclarationFile {} From 7e06338d46fcc8e6c1211bf6dd3b1ddcb9fb09c2 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 15:31:10 +0900 Subject: [PATCH 19/24] WIP --- Sources/DOMKit/DOMKit.swift | 16176 +----------------------- Sources/WebIDL/Argument.swift | 4 + Sources/WebIDL/Interface.swift | 9 +- Sources/WebIDL/Node.swift | 3 +- Sources/WebIDL/Typedef.swift | 3 + Sources/WebIDLToSwift/DeclGraph.swift | 84 +- Sources/WebIDLToSwift/IDLParser.swift | 38 +- Sources/WebIDLToSwift/main.swift | 29 +- 8 files changed, 507 insertions(+), 15839 deletions(-) diff --git a/Sources/DOMKit/DOMKit.swift b/Sources/DOMKit/DOMKit.swift index fc1368e5..2b1ee4aa 100644 --- a/Sources/DOMKit/DOMKit.swift +++ b/Sources/DOMKit/DOMKit.swift @@ -1,14565 +1,551 @@ // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! -import DOMKitConsole -import DOMKitFileAPI -import DOMKitURL -import DOMKitWebIDL import ECMAScript import JavaScriptEventLoop import JavaScriptKit -public protocol ARIAMixin: JSBridgedClass {} -public extension ARIAMixin { - @inlinable var role: String? { - get { ReadWriteAttribute[Strings.role, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.role, in: jsObject] = newValue } - } +public class Blob: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } - @inlinable var ariaAtomic: String? { - get { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] = newValue } - } + public let jsObject: JSObject - @inlinable var ariaAutoComplete: String? { - get { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] = newValue } + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + self.jsObject = jsObject } - @inlinable var ariaBusy: String? { - get { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] = newValue } + @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) } - @inlinable var ariaChecked: String? { - get { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] = newValue } - } + @ReadonlyAttribute + public var size: UInt64 - @inlinable var ariaColCount: String? { - get { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] = newValue } - } + @ReadonlyAttribute + public var type: String - @inlinable var ariaColIndex: String? { - get { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] = newValue } + @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { + let this = jsObject + return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable var ariaColIndexText: String? { - get { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] = newValue } - } + // XXX: member 'stream' is ignored - @inlinable var ariaColSpan: String? { - get { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] = newValue } + @inlinable public func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! } - @inlinable var ariaCurrent: String? { - get { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] = newValue } + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable var ariaDescription: String? { - get { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] = newValue } + @inlinable public func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! } - @inlinable var ariaDisabled: String? { - get { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] = newValue } + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } +} - @inlinable var ariaExpanded: String? { - get { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] = newValue } +public class BlobPropertyBag: BridgedDictionary { + public convenience init(type: String, endings: EndingType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.endings] = endings.jsValue + self.init(unsafelyWrapping: object) } - @inlinable var ariaHasPopup: String? { - get { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] = newValue } + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) + super.init(unsafelyWrapping: object) } - @inlinable var ariaHidden: String? { - get { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] = newValue } - } + @ReadWriteAttribute + public var type: String - @inlinable var ariaInvalid: String? { - get { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] = newValue } - } + @ReadWriteAttribute + public var endings: EndingType +} - @inlinable var ariaKeyShortcuts: String? { - get { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] = newValue } - } +public class DOMException: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } - @inlinable var ariaLabel: String? { - get { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] = newValue } - } + public let jsObject: JSObject - @inlinable var ariaLevel: String? { - get { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] = newValue } + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + self.jsObject = jsObject } - @inlinable var ariaLive: String? { - get { ReadWriteAttribute[Strings.ariaLive, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaLive, in: jsObject] = newValue } + @inlinable public convenience init(message: String? = nil, name: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) } - @inlinable var ariaModal: String? { - get { ReadWriteAttribute[Strings.ariaModal, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaModal, in: jsObject] = newValue } - } + @ReadonlyAttribute + public var name: String - @inlinable var ariaMultiLine: String? { - get { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] = newValue } - } + @ReadonlyAttribute + public var message: String - @inlinable var ariaMultiSelectable: String? { - get { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] = newValue } - } + @ReadonlyAttribute + public var code: UInt16 - @inlinable var ariaOrientation: String? { - get { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] = newValue } - } + public static let INDEX_SIZE_ERR: UInt16 = 1 - @inlinable var ariaPlaceholder: String? { - get { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] = newValue } - } + public static let DOMSTRING_SIZE_ERR: UInt16 = 2 - @inlinable var ariaPosInSet: String? { - get { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] = newValue } - } + public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 - @inlinable var ariaPressed: String? { - get { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] = newValue } - } + public static let WRONG_DOCUMENT_ERR: UInt16 = 4 - @inlinable var ariaReadOnly: String? { - get { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] = newValue } - } + public static let INVALID_CHARACTER_ERR: UInt16 = 5 - @inlinable var ariaRequired: String? { - get { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] = newValue } - } + public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 - @inlinable var ariaRoleDescription: String? { - get { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] = newValue } - } + public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 - @inlinable var ariaRowCount: String? { - get { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] = newValue } - } + public static let NOT_FOUND_ERR: UInt16 = 8 - @inlinable var ariaRowIndex: String? { - get { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] = newValue } - } + public static let NOT_SUPPORTED_ERR: UInt16 = 9 - @inlinable var ariaRowIndexText: String? { - get { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] = newValue } - } + public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 - @inlinable var ariaRowSpan: String? { - get { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] = newValue } - } + public static let INVALID_STATE_ERR: UInt16 = 11 - @inlinable var ariaSelected: String? { - get { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] = newValue } - } + public static let SYNTAX_ERR: UInt16 = 12 - @inlinable var ariaSetSize: String? { - get { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] = newValue } - } + public static let INVALID_MODIFICATION_ERR: UInt16 = 13 - @inlinable var ariaSort: String? { - get { ReadWriteAttribute[Strings.ariaSort, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaSort, in: jsObject] = newValue } - } + public static let NAMESPACE_ERR: UInt16 = 14 + + public static let INVALID_ACCESS_ERR: UInt16 = 15 + + public static let VALIDATION_ERR: UInt16 = 16 + + public static let TYPE_MISMATCH_ERR: UInt16 = 17 + + public static let SECURITY_ERR: UInt16 = 18 + + public static let NETWORK_ERR: UInt16 = 19 + + public static let ABORT_ERR: UInt16 = 20 + + public static let URL_MISMATCH_ERR: UInt16 = 21 + + public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 + + public static let TIMEOUT_ERR: UInt16 = 23 + + public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 - @inlinable var ariaValueMax: String? { - get { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] = newValue } + public static let DATA_CLONE_ERR: UInt16 = 25 +} + +public enum EndingType: JSString, JSValueCompatible { + case transparent = "transparent" + case native = "native" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil } - @inlinable var ariaValueMin: String? { - get { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] = newValue } + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) } - @inlinable var ariaValueNow: String? { - get { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] = newValue } + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class File: Blob { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + super.init(unsafelyWrapping: jsObject) } - @inlinable var ariaValueText: String? { - get { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] = newValue } + @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var lastModified: Int64 } -public class AbortController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbortController].function! } +public class FileList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) self.jsObject = jsObject } - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + @inlinable public subscript(key: Int) -> File? { + jsObject[key].fromJSValue() } @ReadonlyAttribute - public var signal: AbortSignal + public var length: UInt32 +} - @inlinable public func abort(reason: JSValue? = nil) { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) +public class FilePropertyBag: BridgedDictionary { + public convenience init(lastModified: Int64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.lastModified] = lastModified.jsValue + self.init(unsafelyWrapping: object) } + + public required init(unsafelyWrapping object: JSObject) { + _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var lastModified: Int64 } -public class AbortSignal: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AbortSignal].function! } +public class FileReader: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } public required init(unsafelyWrapping jsObject: JSObject) { - _aborted = ReadonlyAttribute(jsObject: jsObject, name: Strings.aborted) - _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) - _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + _onloadstart = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadstart) + _onprogress = ReadWriteAttribute(jsObject: jsObject, name: Strings.onprogress) + _onload = ReadWriteAttribute(jsObject: jsObject, name: Strings.onload) + _onabort = ReadWriteAttribute(jsObject: jsObject, name: Strings.onabort) + _onerror = ReadWriteAttribute(jsObject: jsObject, name: Strings.onerror) + _onloadend = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadend) super.init(unsafelyWrapping: jsObject) } - @inlinable public static func abort(reason: JSValue? = nil) -> Self { - let this = constructor - return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) } - @inlinable public static func timeout(milliseconds: UInt64) -> Self { - let this = constructor - return this[Strings.timeout].function!(this: this, arguments: [milliseconds.jsValue]).fromJSValue()! + @inlinable public func readAsArrayBuffer(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) } - @ReadonlyAttribute - public var aborted: Bool - - @ReadonlyAttribute - public var reason: JSValue - - @inlinable public func throwIfAborted() { + @inlinable public func readAsBinaryString(blob: Blob) { let this = jsObject - _ = this[Strings.throwIfAborted].function!(this: this, arguments: []) + _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) } - @ClosureAttribute1Optional - public var onabort: EventHandler -} - -public class AbstractRange: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbstractRange].function! } + @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { + let this = jsObject + _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) + } - public let jsObject: JSObject + @inlinable public func readAsDataURL(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) + } - public required init(unsafelyWrapping jsObject: JSObject) { - _startContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.startContainer) - _startOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.startOffset) - _endContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.endContainer) - _endOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.endOffset) - _collapsed = ReadonlyAttribute(jsObject: jsObject, name: Strings.collapsed) - self.jsObject = jsObject + @inlinable public func abort() { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: []) } - @ReadonlyAttribute - public var startContainer: Node + public static let EMPTY: UInt16 = 0 - @ReadonlyAttribute - public var startOffset: UInt32 + public static let LOADING: UInt16 = 1 + + public static let DONE: UInt16 = 2 @ReadonlyAttribute - public var endContainer: Node + public var readyState: UInt16 @ReadonlyAttribute - public var endOffset: UInt32 + public var result: JSValue? @ReadonlyAttribute - public var collapsed: Bool -} + public var error: DOMException? -public protocol AbstractWorker: JSBridgedClass {} -public extension AbstractWorker { - @inlinable var onerror: EventHandler { - get { ClosureAttribute1Optional[Strings.onerror, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onerror, in: jsObject] = newValue } - } -} + @ReadWriteAttribute + public var onloadstart: EventHandler -public class AddEventListenerOptions: BridgedDictionary { - public convenience init(passive: Bool, once: Bool, signal: AbortSignal) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.passive] = passive.jsValue - object[Strings.once] = once.jsValue - object[Strings.signal] = signal.jsValue - self.init(unsafelyWrapping: object) - } + @ReadWriteAttribute + public var onprogress: EventHandler - public required init(unsafelyWrapping object: JSObject) { - _passive = ReadWriteAttribute(jsObject: object, name: Strings.passive) - _once = ReadWriteAttribute(jsObject: object, name: Strings.once) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - super.init(unsafelyWrapping: object) - } + @ReadWriteAttribute + public var onload: EventHandler @ReadWriteAttribute - public var passive: Bool + public var onabort: EventHandler @ReadWriteAttribute - public var once: Bool + public var onerror: EventHandler @ReadWriteAttribute - public var signal: AbortSignal + public var onloadend: EventHandler } -public protocol Animatable: JSBridgedClass {} -public extension Animatable { - @inlinable func animate(keyframes: JSObject?, options: JSValue? = nil) -> Animation { - let this = jsObject - return this[Strings.animate].function!(this: this, arguments: [keyframes.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } +public typealias DOMTimeStamp = UInt64 - @inlinable func getAnimations(options: GetAnimationsOptions? = nil) -> [Animation] { - let this = jsObject - return this[Strings.getAnimations].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } -} +public typealias VoidFunction = () -> Void +public class URL: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } -public class Animation: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Animation].function! } + public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) - _effect = ReadWriteAttribute(jsObject: jsObject, name: Strings.effect) - _timeline = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeline) - _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) - _playState = ReadonlyAttribute(jsObject: jsObject, name: Strings.playState) - _replaceState = ReadonlyAttribute(jsObject: jsObject, name: Strings.replaceState) - _pending = ReadonlyAttribute(jsObject: jsObject, name: Strings.pending) - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _finished = ReadonlyAttribute(jsObject: jsObject, name: Strings.finished) - _onfinish = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onfinish) - _oncancel = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncancel) - _onremove = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremove) - super.init(unsafelyWrapping: jsObject) + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) + _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) + self.jsObject = jsObject } - @inlinable public convenience init(effect: AnimationEffect? = nil, timeline: AnimationTimeline? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [effect?.jsValue ?? .undefined, timeline?.jsValue ?? .undefined])) + @inlinable public convenience init(url: String, base: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) } @ReadWriteAttribute - public var id: String + public var href: String - @ReadWriteAttribute - public var effect: AnimationEffect? + @ReadonlyAttribute + public var origin: String @ReadWriteAttribute - public var timeline: AnimationTimeline? + public var `protocol`: String @ReadWriteAttribute - public var playbackRate: Double + public var username: String - @ReadonlyAttribute - public var playState: AnimationPlayState + @ReadWriteAttribute + public var password: String - @ReadonlyAttribute - public var replaceState: AnimationReplaceState + @ReadWriteAttribute + public var host: String - @ReadonlyAttribute - public var pending: Bool + @ReadWriteAttribute + public var hostname: String - @ReadonlyAttribute - public var ready: JSPromise + @ReadWriteAttribute + public var port: String - @ReadonlyAttribute - public var finished: JSPromise + @ReadWriteAttribute + public var pathname: String - @ClosureAttribute1Optional - public var onfinish: EventHandler + @ReadWriteAttribute + public var search: String - @ClosureAttribute1Optional - public var oncancel: EventHandler + @ReadonlyAttribute + public var searchParams: URLSearchParams - @ClosureAttribute1Optional - public var onremove: EventHandler + @ReadWriteAttribute + public var hash: String - @inlinable public func cancel() { + @inlinable public func toJSON() -> String { let this = jsObject - _ = this[Strings.cancel].function!(this: this, arguments: []) + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public func finish() { - let this = jsObject - _ = this[Strings.finish].function!(this: this, arguments: []) + @inlinable public static func createObjectURL(obj: JSValue) -> String { + let this = constructor + return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! } - @inlinable public func play() { - let this = jsObject - _ = this[Strings.play].function!(this: this, arguments: []) + @inlinable public static func revokeObjectURL(url: String) { + let this = constructor + _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) } +} - @inlinable public func pause() { - let this = jsObject - _ = this[Strings.pause].function!(this: this, arguments: []) +public class URLSearchParams: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject } - @inlinable public func updatePlaybackRate(playbackRate: Double) { - let this = jsObject - _ = this[Strings.updatePlaybackRate].function!(this: this, arguments: [playbackRate.jsValue]) + @inlinable public convenience init(init: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) } - @inlinable public func reverse() { + @inlinable public func append(name: String, value: String) { let this = jsObject - _ = this[Strings.reverse].function!(this: this, arguments: []) + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) } - @inlinable public func persist() { + @inlinable public func delete(name: String) { let this = jsObject - _ = this[Strings.persist].function!(this: this, arguments: []) + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) } - @inlinable public func commitStyles() { + @inlinable public func get(name: String) -> String? { let this = jsObject - _ = this[Strings.commitStyles].function!(this: this, arguments: []) + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! } -} -public class AnimationEffect: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationEffect].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject + @inlinable public func getAll(name: String) -> [String] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! } - @inlinable public func getTiming() -> EffectTiming { + @inlinable public func has(name: String) -> Bool { let this = jsObject - return this[Strings.getTiming].function!(this: this, arguments: []).fromJSValue()! + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! } - @inlinable public func getComputedTiming() -> ComputedEffectTiming { + @inlinable public func set(name: String, value: String) { let this = jsObject - return this[Strings.getComputedTiming].function!(this: this, arguments: []).fromJSValue()! + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) } - @inlinable public func updateTiming(timing: OptionalEffectTiming? = nil) { + @inlinable public func sort() { let this = jsObject - _ = this[Strings.updateTiming].function!(this: this, arguments: [timing?.jsValue ?? .undefined]) + _ = this[Strings.sort].function!(this: this, arguments: []) } -} -public protocol AnimationFrameProvider: JSBridgedClass {} -public extension AnimationFrameProvider { - // XXX: method 'requestAnimationFrame' is ignored + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } - @inlinable func cancelAnimationFrame(handle: UInt32) { - let this = jsObject - _ = this[Strings.cancelAnimationFrame].function!(this: this, arguments: [handle.jsValue]) + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! } } -public enum AnimationPlayState: JSString, JSValueCompatible { - case idle = "idle" - case running = "running" - case paused = "paused" - case finished = "finished" +public enum console { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.console].object! + } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public static func clear() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.clear].function!(this: this, arguments: []) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum AnimationReplaceState: JSString, JSValueCompatible { - case active = "active" - case removed = "removed" - case persisted = "persisted" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class AnimationTimeline: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationTimeline].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _currentTime = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTime) - _phase = ReadonlyAttribute(jsObject: jsObject, name: Strings.phase) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var currentTime: Double? - - @ReadonlyAttribute - public var phase: TimelinePhase -} - -public class AssignedNodesOptions: BridgedDictionary { - public convenience init(flatten: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.flatten] = flatten.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _flatten = ReadWriteAttribute(jsObject: object, name: Strings.flatten) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var flatten: Bool -} - -public class Attr: Node { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Attr].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) - _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) - _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _ownerElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerElement) - _specified = ReadonlyAttribute(jsObject: jsObject, name: Strings.specified) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var namespaceURI: String? - - @ReadonlyAttribute - public var prefix: String? - - @ReadonlyAttribute - public var localName: String - - @ReadonlyAttribute - public var name: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var ownerElement: Element? - - @ReadonlyAttribute - public var specified: Bool -} - -public class AudioTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var enabled: Bool -} - -public class AudioTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AudioTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> AudioTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> AudioTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public class BarProp: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.BarProp].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _visible = ReadonlyAttribute(jsObject: jsObject, name: Strings.visible) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var visible: Bool -} - -public class BaseComputedKeyframe: BridgedDictionary { - public convenience init(offset: Double?, computedOffset: Double, easing: String, composite: CompositeOperationOrAuto) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.computedOffset] = computedOffset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _computedOffset = ReadWriteAttribute(jsObject: object, name: Strings.computedOffset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: Double? - - @ReadWriteAttribute - public var computedOffset: Double - - @ReadWriteAttribute - public var easing: String - - @ReadWriteAttribute - public var composite: CompositeOperationOrAuto -} - -public class BaseKeyframe: BridgedDictionary { - public convenience init(offset: Double?, easing: String, composite: CompositeOperationOrAuto) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: Double? - - @ReadWriteAttribute - public var easing: String - - @ReadWriteAttribute - public var composite: CompositeOperationOrAuto -} - -public class BasePropertyIndexedKeyframe: BridgedDictionary { - public convenience init(offset: JSValue, easing: JSValue, composite: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: JSValue - - @ReadWriteAttribute - public var easing: JSValue - - @ReadWriteAttribute - public var composite: JSValue -} - -public class BeforeUnloadEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BeforeUnloadEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - // XXX: member 'returnValue' is ignored -} - -public protocol Body: JSBridgedClass {} -public extension Body { - // XXX: attribute 'body' is ignored - - @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } - - @inlinable func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func blob() -> JSPromise { - let this = jsObject - return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func blob() async throws -> Blob { - let this = jsObject - let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func formData() -> JSPromise { - let this = jsObject - return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func formData() async throws -> FormData { - let this = jsObject - let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func json() -> JSPromise { - let this = jsObject - return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func json() async throws -> JSValue { - let this = jsObject - let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class BroadcastChannel: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(name: String) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) - } - - @ReadonlyAttribute - public var name: String - - @inlinable public func postMessage(message: JSValue) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue]) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public class ByteLengthQueuingStrategy: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ByteLengthQueuingStrategy].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: QueuingStrategyInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var highWaterMark: Double - - @ReadonlyAttribute - public var size: JSFunction -} - -public class CDATASection: Text { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CDATASection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class Cache: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { - let this = jsObject - let _promise: JSPromise = this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func add(request: RequestInfo) -> JSPromise { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func add(request: RequestInfo) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { - let this = jsObject - return this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addAll(requests: [RequestInfo]) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { - let this = jsObject - return this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func put(request: RequestInfo, response: Response) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { - let this = jsObject - let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class CacheQueryOptions: BridgedDictionary { - public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.ignoreSearch] = ignoreSearch.jsValue - object[Strings.ignoreMethod] = ignoreMethod.jsValue - object[Strings.ignoreVary] = ignoreVary.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _ignoreSearch = ReadWriteAttribute(jsObject: object, name: Strings.ignoreSearch) - _ignoreMethod = ReadWriteAttribute(jsObject: object, name: Strings.ignoreMethod) - _ignoreVary = ReadWriteAttribute(jsObject: object, name: Strings.ignoreVary) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var ignoreSearch: Bool - - @ReadWriteAttribute - public var ignoreMethod: Bool - - @ReadWriteAttribute - public var ignoreVary: Bool -} - -public class CacheStorage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CacheStorage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func has(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func has(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func open(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func open(cacheName: String) async throws -> Cache { - let this = jsObject - let _promise: JSPromise = this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func delete(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func keys() -> JSPromise { - let this = jsObject - return this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys() async throws -> [String] { - let this = jsObject - let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public enum CanPlayTypeResult: JSString, JSValueCompatible { - case _empty = "" - case maybe = "maybe" - case probably = "probably" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasCompositing: JSBridgedClass {} -public extension CanvasCompositing { - @inlinable var globalAlpha: Double { - get { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] = newValue } - } - - @inlinable var globalCompositeOperation: String { - get { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] = newValue } - } -} - -public enum CanvasDirection: JSString, JSValueCompatible { - case ltr = "ltr" - case rtl = "rtl" - case inherit = "inherit" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasDrawImage: JSBridgedClass {} -public extension CanvasDrawImage { - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) - } - - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) - } - - @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = dx.jsValue - let _arg6 = dy.jsValue - let _arg7 = dw.jsValue - let _arg8 = dh.jsValue - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } -} - -public protocol CanvasDrawPath: JSBridgedClass {} -public extension CanvasDrawPath { - @inlinable func beginPath() { - let this = jsObject - _ = this[Strings.beginPath].function!(this: this, arguments: []) - } - - @inlinable func fill(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } - - @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } - - @inlinable func stroke() { - let this = jsObject - _ = this[Strings.stroke].function!(this: this, arguments: []) - } - - @inlinable func stroke(path: Path2D) { - let this = jsObject - _ = this[Strings.stroke].function!(this: this, arguments: [path.jsValue]) - } - - @inlinable func clip(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } - - @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } - - @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { - let this = jsObject - return this[Strings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { - let this = jsObject - return this[Strings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { - let this = jsObject - return this[Strings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { - let this = jsObject - return this[Strings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! - } -} - -public enum CanvasFillRule: JSString, JSValueCompatible { - case nonzero = "nonzero" - case evenodd = "evenodd" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasFillStrokeStyles: JSBridgedClass {} -public extension CanvasFillStrokeStyles { - @inlinable var strokeStyle: JSValue { - get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } - } - - @inlinable var fillStyle: JSValue { - get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } - } - - @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { - let this = jsObject - return this[Strings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! - } - - @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { - let _arg0 = x0.jsValue - let _arg1 = y0.jsValue - let _arg2 = r0.jsValue - let _arg3 = x1.jsValue - let _arg4 = y1.jsValue - let _arg5 = r1.jsValue - let this = jsObject - return this[Strings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { - let this = jsObject - return this[Strings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { - let this = jsObject - return this[Strings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! - } -} - -public class CanvasFilter: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasFilter].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(filters: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) - } -} - -public protocol CanvasFilters: JSBridgedClass {} -public extension CanvasFilters { - @inlinable var filter: JSValue { - get { ReadWriteAttribute[Strings.filter, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } - } -} - -public enum CanvasFontKerning: JSString, JSValueCompatible { - case auto = "auto" - case normal = "normal" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasFontStretch: JSString, JSValueCompatible { - case ultraCondensed = "ultra-condensed" - case extraCondensed = "extra-condensed" - case condensed = "condensed" - case semiCondensed = "semi-condensed" - case normal = "normal" - case semiExpanded = "semi-expanded" - case expanded = "expanded" - case extraExpanded = "extra-expanded" - case ultraExpanded = "ultra-expanded" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasFontVariantCaps: JSString, JSValueCompatible { - case normal = "normal" - case smallCaps = "small-caps" - case allSmallCaps = "all-small-caps" - case petiteCaps = "petite-caps" - case allPetiteCaps = "all-petite-caps" - case unicase = "unicase" - case titlingCaps = "titling-caps" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class CanvasGradient: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasGradient].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func addColorStop(offset: Double, color: String) { - let this = jsObject - _ = this[Strings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) - } -} - -public protocol CanvasImageData: JSBridgedClass {} -public extension CanvasImageData { - @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { - let this = jsObject - return this[Strings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func createImageData(imagedata: ImageData) -> ImageData { - let this = jsObject - return this[Strings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! - } - - @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { - let this = jsObject - return this[Strings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { - let this = jsObject - _ = this[Strings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) - } - - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { - let _arg0 = imagedata.jsValue - let _arg1 = dx.jsValue - let _arg2 = dy.jsValue - let _arg3 = dirtyX.jsValue - let _arg4 = dirtyY.jsValue - let _arg5 = dirtyWidth.jsValue - let _arg6 = dirtyHeight.jsValue - let this = jsObject - _ = this[Strings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } -} - -public protocol CanvasImageSmoothing: JSBridgedClass {} -public extension CanvasImageSmoothing { - @inlinable var imageSmoothingEnabled: Bool { - get { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] = newValue } - } - - @inlinable var imageSmoothingQuality: ImageSmoothingQuality { - get { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] = newValue } - } -} - -public enum CanvasLineCap: JSString, JSValueCompatible { - case butt = "butt" - case round = "round" - case square = "square" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasLineJoin: JSString, JSValueCompatible { - case round = "round" - case bevel = "bevel" - case miter = "miter" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasPath: JSBridgedClass {} -public extension CanvasPath { - @inlinable func closePath() { - let this = jsObject - _ = this[Strings.closePath].function!(this: this, arguments: []) - } - - @inlinable func moveTo(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func lineTo(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { - let this = jsObject - _ = this[Strings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { - let _arg0 = cp1x.jsValue - let _arg1 = cp1y.jsValue - let _arg2 = cp2x.jsValue - let _arg3 = cp2y.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue - let this = jsObject - _ = this[Strings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { - let this = jsObject - _ = this[Strings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) - } - - @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: JSValue? = nil) { - let this = jsObject - _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) - } - - @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radius.jsValue - let _arg3 = startAngle.jsValue - let _arg4 = endAngle.jsValue - let _arg5 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radiusX.jsValue - let _arg3 = radiusY.jsValue - let _arg4 = rotation.jsValue - let _arg5 = startAngle.jsValue - let _arg6 = endAngle.jsValue - let _arg7 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public protocol CanvasPathDrawingStyles: JSBridgedClass {} -public extension CanvasPathDrawingStyles { - @inlinable var lineWidth: Double { - get { ReadWriteAttribute[Strings.lineWidth, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineWidth, in: jsObject] = newValue } - } - - @inlinable var lineCap: CanvasLineCap { - get { ReadWriteAttribute[Strings.lineCap, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineCap, in: jsObject] = newValue } - } - - @inlinable var lineJoin: CanvasLineJoin { - get { ReadWriteAttribute[Strings.lineJoin, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineJoin, in: jsObject] = newValue } - } - - @inlinable var miterLimit: Double { - get { ReadWriteAttribute[Strings.miterLimit, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.miterLimit, in: jsObject] = newValue } - } - - @inlinable func setLineDash(segments: [Double]) { - let this = jsObject - _ = this[Strings.setLineDash].function!(this: this, arguments: [segments.jsValue]) - } - - @inlinable func getLineDash() -> [Double] { - let this = jsObject - return this[Strings.getLineDash].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var lineDashOffset: Double { - get { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] = newValue } - } -} - -public class CanvasPattern: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasPattern].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } -} - -public protocol CanvasRect: JSBridgedClass {} -public extension CanvasRect { - @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } - - @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { - let this = jsObject - _ = this[Strings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) - } -} - -public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasRenderingContext2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var canvas: HTMLCanvasElement - - @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { - let this = jsObject - return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class CanvasRenderingContext2DSettings: BridgedDictionary { - public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - object[Strings.desynchronized] = desynchronized.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - object[Strings.willReadFrequently] = willReadFrequently.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - _willReadFrequently = ReadWriteAttribute(jsObject: object, name: Strings.willReadFrequently) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool - - @ReadWriteAttribute - public var desynchronized: Bool - - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace - - @ReadWriteAttribute - public var willReadFrequently: Bool -} - -public protocol CanvasShadowStyles: JSBridgedClass {} -public extension CanvasShadowStyles { - @inlinable var shadowOffsetX: Double { - get { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] = newValue } - } - - @inlinable var shadowOffsetY: Double { - get { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] = newValue } - } - - @inlinable var shadowBlur: Double { - get { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] = newValue } - } - - @inlinable var shadowColor: String { - get { ReadWriteAttribute[Strings.shadowColor, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowColor, in: jsObject] = newValue } - } -} - -public protocol CanvasState: JSBridgedClass {} -public extension CanvasState { - @inlinable func save() { - let this = jsObject - _ = this[Strings.save].function!(this: this, arguments: []) - } - - @inlinable func restore() { - let this = jsObject - _ = this[Strings.restore].function!(this: this, arguments: []) - } - - @inlinable func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable func isContextLost() -> Bool { - let this = jsObject - return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! - } -} - -public protocol CanvasText: JSBridgedClass {} -public extension CanvasText { - @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { - let this = jsObject - _ = this[Strings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) - } - - @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { - let this = jsObject - _ = this[Strings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) - } - - @inlinable func measureText(text: String) -> TextMetrics { - let this = jsObject - return this[Strings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! - } -} - -public enum CanvasTextAlign: JSString, JSValueCompatible { - case start = "start" - case end = "end" - case left = "left" - case right = "right" - case center = "center" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasTextBaseline: JSString, JSValueCompatible { - case top = "top" - case hanging = "hanging" - case middle = "middle" - case alphabetic = "alphabetic" - case ideographic = "ideographic" - case bottom = "bottom" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasTextDrawingStyles: JSBridgedClass {} -public extension CanvasTextDrawingStyles { - @inlinable var font: String { - get { ReadWriteAttribute[Strings.font, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.font, in: jsObject] = newValue } - } - - @inlinable var textAlign: CanvasTextAlign { - get { ReadWriteAttribute[Strings.textAlign, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textAlign, in: jsObject] = newValue } - } - - @inlinable var textBaseline: CanvasTextBaseline { - get { ReadWriteAttribute[Strings.textBaseline, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textBaseline, in: jsObject] = newValue } - } - - @inlinable var direction: CanvasDirection { - get { ReadWriteAttribute[Strings.direction, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.direction, in: jsObject] = newValue } - } - - @inlinable var letterSpacing: String { - get { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] = newValue } - } - - @inlinable var fontKerning: CanvasFontKerning { - get { ReadWriteAttribute[Strings.fontKerning, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontKerning, in: jsObject] = newValue } - } - - @inlinable var fontStretch: CanvasFontStretch { - get { ReadWriteAttribute[Strings.fontStretch, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontStretch, in: jsObject] = newValue } - } - - @inlinable var fontVariantCaps: CanvasFontVariantCaps { - get { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] = newValue } - } - - @inlinable var textRendering: CanvasTextRendering { - get { ReadWriteAttribute[Strings.textRendering, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textRendering, in: jsObject] = newValue } - } - - @inlinable var wordSpacing: String { - get { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] = newValue } - } -} - -public enum CanvasTextRendering: JSString, JSValueCompatible { - case auto = "auto" - case optimizeSpeed = "optimizeSpeed" - case optimizeLegibility = "optimizeLegibility" - case geometricPrecision = "geometricPrecision" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasTransform: JSBridgedClass {} -public extension CanvasTransform { - @inlinable func scale(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func rotate(angle: Double) { - let this = jsObject - _ = this[Strings.rotate].function!(this: this, arguments: [angle.jsValue]) - } - - @inlinable func translate(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[Strings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func getTransform() -> DOMMatrix { - let this = jsObject - return this[Strings.getTransform].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } - - @inlinable func resetTransform() { - let this = jsObject - _ = this[Strings.resetTransform].function!(this: this, arguments: []) - } -} - -public protocol CanvasUserInterface: JSBridgedClass {} -public extension CanvasUserInterface { - @inlinable func drawFocusIfNeeded(element: Element) { - let this = jsObject - _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) - } - - @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { - let this = jsObject - _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) - } - - @inlinable func scrollPathIntoView() { - let this = jsObject - _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: []) - } - - @inlinable func scrollPathIntoView(path: Path2D) { - let this = jsObject - _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) - } -} - -public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var data: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { - let this = jsObject - return this[Strings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! - } - - @inlinable public func appendData(data: String) { - let this = jsObject - _ = this[Strings.appendData].function!(this: this, arguments: [data.jsValue]) - } - - @inlinable public func insertData(offset: UInt32, data: String) { - let this = jsObject - _ = this[Strings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) - } - - @inlinable public func deleteData(offset: UInt32, count: UInt32) { - let this = jsObject - _ = this[Strings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) - } - - @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { - let this = jsObject - _ = this[Strings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) - } -} - -public protocol ChildNode: JSBridgedClass {} -public extension ChildNode { - @inlinable func before(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func after(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func replaceWith(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func remove() { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: []) - } -} - -public class ClientQueryOptions: BridgedDictionary { - public convenience init(includeUncontrolled: Bool, type: ClientType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.includeUncontrolled] = includeUncontrolled.jsValue - object[Strings.type] = type.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: Strings.includeUncontrolled) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var includeUncontrolled: Bool - - @ReadWriteAttribute - public var type: ClientType -} - -public enum ClientType: JSString, JSValueCompatible { - case window = "window" - case worker = "worker" - case sharedworker = "sharedworker" - case all = "all" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ColorSpaceConversion: JSString, JSValueCompatible { - case none = "none" - case `default` = "default" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Comment: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Comment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) - } -} - -public enum CompositeOperation: JSString, JSValueCompatible { - case replace = "replace" - case add = "add" - case accumulate = "accumulate" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CompositeOperationOrAuto: JSString, JSValueCompatible { - case replace = "replace" - case add = "add" - case accumulate = "accumulate" - case auto = "auto" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class CompositionEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CompositionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: CompositionEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: String - - @inlinable public func initCompositionEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: WindowProxy? = nil, dataArg: String? = nil) { - let this = jsObject - _ = this[Strings.initCompositionEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, dataArg?.jsValue ?? .undefined]) - } -} - -public class CompositionEventInit: BridgedDictionary { - public convenience init(data: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: String -} - -public class ComputedEffectTiming: BridgedDictionary { - public convenience init(progress: Double?, currentIteration: Double?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.progress] = progress.jsValue - object[Strings.currentIteration] = currentIteration.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _progress = ReadWriteAttribute(jsObject: object, name: Strings.progress) - _currentIteration = ReadWriteAttribute(jsObject: object, name: Strings.currentIteration) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var progress: Double? - - @ReadWriteAttribute - public var currentIteration: Double? -} - -public class CountQueuingStrategy: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: QueuingStrategyInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var highWaterMark: Double - - @ReadonlyAttribute - public var size: JSFunction -} - -public class CustomElementRegistry: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CustomElementRegistry].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { - let this = jsObject - _ = this[Strings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func get(name: String) -> CustomElementConstructor? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func whenDefined(name: String) -> JSPromise { - let this = jsObject - return this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { - let this = jsObject - let _promise: JSPromise = this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func upgrade(root: Node) { - let this = jsObject - _ = this[Strings.upgrade].function!(this: this, arguments: [root.jsValue]) - } -} - -public class CustomEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CustomEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var detail: JSValue - - @inlinable public func initCustomEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, detail: JSValue? = nil) { - let this = jsObject - _ = this[Strings.initCustomEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined, detail?.jsValue ?? .undefined]) - } -} - -public class CustomEventInit: BridgedDictionary { - public convenience init(detail: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.detail] = detail.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var detail: JSValue -} - -public class DOMImplementation: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMImplementation].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func createDocumentType(qualifiedName: String, publicId: String, systemId: String) -> DocumentType { - let this = jsObject - return this[Strings.createDocumentType].function!(this: this, arguments: [qualifiedName.jsValue, publicId.jsValue, systemId.jsValue]).fromJSValue()! - } - - @inlinable public func createDocument(namespace: String?, qualifiedName: String, doctype: DocumentType? = nil) -> XMLDocument { - let this = jsObject - return this[Strings.createDocument].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, doctype?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createHTMLDocument(title: String? = nil) -> Document { - let this = jsObject - return this[Strings.createHTMLDocument].function!(this: this, arguments: [title?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func hasFeature() -> Bool { - let this = jsObject - return this[Strings.hasFeature].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DOMMatrix: DOMMatrixReadOnly { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrix].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _a = ReadWriteAttribute(jsObject: jsObject, name: Strings.a) - _b = ReadWriteAttribute(jsObject: jsObject, name: Strings.b) - _c = ReadWriteAttribute(jsObject: jsObject, name: Strings.c) - _d = ReadWriteAttribute(jsObject: jsObject, name: Strings.d) - _e = ReadWriteAttribute(jsObject: jsObject, name: Strings.e) - _f = ReadWriteAttribute(jsObject: jsObject, name: Strings.f) - _m11 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m11) - _m12 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m12) - _m13 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m13) - _m14 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m14) - _m21 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m21) - _m22 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m22) - _m23 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m23) - _m24 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m24) - _m31 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m31) - _m32 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m32) - _m33 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m33) - _m34 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m34) - _m41 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m41) - _m42 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m42) - _m43 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m43) - _m44 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m44) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(init: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - // XXX: illegal static override - // override public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self - - // XXX: illegal static override - // override public static func fromFloat32Array(array32: Float32Array) -> Self - - // XXX: illegal static override - // override public static func fromFloat64Array(array64: Float64Array) -> Self - - @usableFromInline let _a: ReadWriteAttribute - @inlinable override public var a: Double { - get { _a.wrappedValue } - set { _a.wrappedValue = newValue } - } - - @usableFromInline let _b: ReadWriteAttribute - @inlinable override public var b: Double { - get { _b.wrappedValue } - set { _b.wrappedValue = newValue } - } - - @usableFromInline let _c: ReadWriteAttribute - @inlinable override public var c: Double { - get { _c.wrappedValue } - set { _c.wrappedValue = newValue } - } - - @usableFromInline let _d: ReadWriteAttribute - @inlinable override public var d: Double { - get { _d.wrappedValue } - set { _d.wrappedValue = newValue } - } - - @usableFromInline let _e: ReadWriteAttribute - @inlinable override public var e: Double { - get { _e.wrappedValue } - set { _e.wrappedValue = newValue } - } - - @usableFromInline let _f: ReadWriteAttribute - @inlinable override public var f: Double { - get { _f.wrappedValue } - set { _f.wrappedValue = newValue } - } - - @usableFromInline let _m11: ReadWriteAttribute - @inlinable override public var m11: Double { - get { _m11.wrappedValue } - set { _m11.wrappedValue = newValue } - } - - @usableFromInline let _m12: ReadWriteAttribute - @inlinable override public var m12: Double { - get { _m12.wrappedValue } - set { _m12.wrappedValue = newValue } - } - - @usableFromInline let _m13: ReadWriteAttribute - @inlinable override public var m13: Double { - get { _m13.wrappedValue } - set { _m13.wrappedValue = newValue } - } - - @usableFromInline let _m14: ReadWriteAttribute - @inlinable override public var m14: Double { - get { _m14.wrappedValue } - set { _m14.wrappedValue = newValue } - } - - @usableFromInline let _m21: ReadWriteAttribute - @inlinable override public var m21: Double { - get { _m21.wrappedValue } - set { _m21.wrappedValue = newValue } - } - - @usableFromInline let _m22: ReadWriteAttribute - @inlinable override public var m22: Double { - get { _m22.wrappedValue } - set { _m22.wrappedValue = newValue } - } - - @usableFromInline let _m23: ReadWriteAttribute - @inlinable override public var m23: Double { - get { _m23.wrappedValue } - set { _m23.wrappedValue = newValue } - } - - @usableFromInline let _m24: ReadWriteAttribute - @inlinable override public var m24: Double { - get { _m24.wrappedValue } - set { _m24.wrappedValue = newValue } - } - - @usableFromInline let _m31: ReadWriteAttribute - @inlinable override public var m31: Double { - get { _m31.wrappedValue } - set { _m31.wrappedValue = newValue } - } - - @usableFromInline let _m32: ReadWriteAttribute - @inlinable override public var m32: Double { - get { _m32.wrappedValue } - set { _m32.wrappedValue = newValue } - } - - @usableFromInline let _m33: ReadWriteAttribute - @inlinable override public var m33: Double { - get { _m33.wrappedValue } - set { _m33.wrappedValue = newValue } - } - - @usableFromInline let _m34: ReadWriteAttribute - @inlinable override public var m34: Double { - get { _m34.wrappedValue } - set { _m34.wrappedValue = newValue } - } - - @usableFromInline let _m41: ReadWriteAttribute - @inlinable override public var m41: Double { - get { _m41.wrappedValue } - set { _m41.wrappedValue = newValue } - } - - @usableFromInline let _m42: ReadWriteAttribute - @inlinable override public var m42: Double { - get { _m42.wrappedValue } - set { _m42.wrappedValue = newValue } - } - - @usableFromInline let _m43: ReadWriteAttribute - @inlinable override public var m43: Double { - get { _m43.wrappedValue } - set { _m43.wrappedValue = newValue } - } - - @usableFromInline let _m44: ReadWriteAttribute - @inlinable override public var m44: Double { - get { _m44.wrappedValue } - set { _m44.wrappedValue = newValue } - } - - @inlinable public func multiplySelf(other: DOMMatrixInit? = nil) -> Self { - let this = jsObject - return this[Strings.multiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func preMultiplySelf(other: DOMMatrixInit? = nil) -> Self { - let this = jsObject - return this[Strings.preMultiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func translateSelf(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> Self { - let this = jsObject - return this[Strings.translateSelf].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scaleSelf(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { - let _arg0 = scaleX?.jsValue ?? .undefined - let _arg1 = scaleY?.jsValue ?? .undefined - let _arg2 = scaleZ?.jsValue ?? .undefined - let _arg3 = originX?.jsValue ?? .undefined - let _arg4 = originY?.jsValue ?? .undefined - let _arg5 = originZ?.jsValue ?? .undefined - let this = jsObject - return this[Strings.scaleSelf].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable public func scale3dSelf(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { - let this = jsObject - return this[Strings.scale3dSelf].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateSelf(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> Self { - let this = jsObject - return this[Strings.rotateSelf].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateFromVectorSelf(x: Double? = nil, y: Double? = nil) -> Self { - let this = jsObject - return this[Strings.rotateFromVectorSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateAxisAngleSelf(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> Self { - let this = jsObject - return this[Strings.rotateAxisAngleSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewXSelf(sx: Double? = nil) -> Self { - let this = jsObject - return this[Strings.skewXSelf].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewYSelf(sy: Double? = nil) -> Self { - let this = jsObject - return this[Strings.skewYSelf].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func invertSelf() -> Self { - let this = jsObject - return this[Strings.invertSelf].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setMatrixValue(transformList: String) -> Self { - let this = jsObject - return this[Strings.setMatrixValue].function!(this: this, arguments: [transformList.jsValue]).fromJSValue()! - } -} - -public class DOMMatrix2DInit: BridgedDictionary { - public convenience init(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double, m11: Double, m12: Double, m21: Double, m22: Double, m41: Double, m42: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.a] = a.jsValue - object[Strings.b] = b.jsValue - object[Strings.c] = c.jsValue - object[Strings.d] = d.jsValue - object[Strings.e] = e.jsValue - object[Strings.f] = f.jsValue - object[Strings.m11] = m11.jsValue - object[Strings.m12] = m12.jsValue - object[Strings.m21] = m21.jsValue - object[Strings.m22] = m22.jsValue - object[Strings.m41] = m41.jsValue - object[Strings.m42] = m42.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _a = ReadWriteAttribute(jsObject: object, name: Strings.a) - _b = ReadWriteAttribute(jsObject: object, name: Strings.b) - _c = ReadWriteAttribute(jsObject: object, name: Strings.c) - _d = ReadWriteAttribute(jsObject: object, name: Strings.d) - _e = ReadWriteAttribute(jsObject: object, name: Strings.e) - _f = ReadWriteAttribute(jsObject: object, name: Strings.f) - _m11 = ReadWriteAttribute(jsObject: object, name: Strings.m11) - _m12 = ReadWriteAttribute(jsObject: object, name: Strings.m12) - _m21 = ReadWriteAttribute(jsObject: object, name: Strings.m21) - _m22 = ReadWriteAttribute(jsObject: object, name: Strings.m22) - _m41 = ReadWriteAttribute(jsObject: object, name: Strings.m41) - _m42 = ReadWriteAttribute(jsObject: object, name: Strings.m42) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var a: Double - - @ReadWriteAttribute - public var b: Double - - @ReadWriteAttribute - public var c: Double - - @ReadWriteAttribute - public var d: Double - - @ReadWriteAttribute - public var e: Double - - @ReadWriteAttribute - public var f: Double - - @ReadWriteAttribute - public var m11: Double - - @ReadWriteAttribute - public var m12: Double - - @ReadWriteAttribute - public var m21: Double - - @ReadWriteAttribute - public var m22: Double - - @ReadWriteAttribute - public var m41: Double - - @ReadWriteAttribute - public var m42: Double -} - -public class DOMMatrixInit: BridgedDictionary { - public convenience init(m13: Double, m14: Double, m23: Double, m24: Double, m31: Double, m32: Double, m33: Double, m34: Double, m43: Double, m44: Double, is2D: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.m13] = m13.jsValue - object[Strings.m14] = m14.jsValue - object[Strings.m23] = m23.jsValue - object[Strings.m24] = m24.jsValue - object[Strings.m31] = m31.jsValue - object[Strings.m32] = m32.jsValue - object[Strings.m33] = m33.jsValue - object[Strings.m34] = m34.jsValue - object[Strings.m43] = m43.jsValue - object[Strings.m44] = m44.jsValue - object[Strings.is2D] = is2D.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _m13 = ReadWriteAttribute(jsObject: object, name: Strings.m13) - _m14 = ReadWriteAttribute(jsObject: object, name: Strings.m14) - _m23 = ReadWriteAttribute(jsObject: object, name: Strings.m23) - _m24 = ReadWriteAttribute(jsObject: object, name: Strings.m24) - _m31 = ReadWriteAttribute(jsObject: object, name: Strings.m31) - _m32 = ReadWriteAttribute(jsObject: object, name: Strings.m32) - _m33 = ReadWriteAttribute(jsObject: object, name: Strings.m33) - _m34 = ReadWriteAttribute(jsObject: object, name: Strings.m34) - _m43 = ReadWriteAttribute(jsObject: object, name: Strings.m43) - _m44 = ReadWriteAttribute(jsObject: object, name: Strings.m44) - _is2D = ReadWriteAttribute(jsObject: object, name: Strings.is2D) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var m13: Double - - @ReadWriteAttribute - public var m14: Double - - @ReadWriteAttribute - public var m23: Double - - @ReadWriteAttribute - public var m24: Double - - @ReadWriteAttribute - public var m31: Double - - @ReadWriteAttribute - public var m32: Double - - @ReadWriteAttribute - public var m33: Double - - @ReadWriteAttribute - public var m34: Double - - @ReadWriteAttribute - public var m43: Double - - @ReadWriteAttribute - public var m44: Double - - @ReadWriteAttribute - public var is2D: Bool -} - -public class DOMMatrixReadOnly: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrixReadOnly].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _a = ReadonlyAttribute(jsObject: jsObject, name: Strings.a) - _b = ReadonlyAttribute(jsObject: jsObject, name: Strings.b) - _c = ReadonlyAttribute(jsObject: jsObject, name: Strings.c) - _d = ReadonlyAttribute(jsObject: jsObject, name: Strings.d) - _e = ReadonlyAttribute(jsObject: jsObject, name: Strings.e) - _f = ReadonlyAttribute(jsObject: jsObject, name: Strings.f) - _m11 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m11) - _m12 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m12) - _m13 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m13) - _m14 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m14) - _m21 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m21) - _m22 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m22) - _m23 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m23) - _m24 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m24) - _m31 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m31) - _m32 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m32) - _m33 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m33) - _m34 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m34) - _m41 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m41) - _m42 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m42) - _m43 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m43) - _m44 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m44) - _is2D = ReadonlyAttribute(jsObject: jsObject, name: Strings.is2D) - _isIdentity = ReadonlyAttribute(jsObject: jsObject, name: Strings.isIdentity) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self { - let this = constructor - return this[Strings.fromMatrix].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public static func fromFloat32Array(array32: Float32Array) -> Self { - let this = constructor - return this[Strings.fromFloat32Array].function!(this: this, arguments: [array32.jsValue]).fromJSValue()! - } - - @inlinable public static func fromFloat64Array(array64: Float64Array) -> Self { - let this = constructor - return this[Strings.fromFloat64Array].function!(this: this, arguments: [array64.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var a: Double - - @ReadonlyAttribute - public var b: Double - - @ReadonlyAttribute - public var c: Double - - @ReadonlyAttribute - public var d: Double - - @ReadonlyAttribute - public var e: Double - - @ReadonlyAttribute - public var f: Double - - @ReadonlyAttribute - public var m11: Double - - @ReadonlyAttribute - public var m12: Double - - @ReadonlyAttribute - public var m13: Double - - @ReadonlyAttribute - public var m14: Double - - @ReadonlyAttribute - public var m21: Double - - @ReadonlyAttribute - public var m22: Double - - @ReadonlyAttribute - public var m23: Double - - @ReadonlyAttribute - public var m24: Double - - @ReadonlyAttribute - public var m31: Double - - @ReadonlyAttribute - public var m32: Double - - @ReadonlyAttribute - public var m33: Double - - @ReadonlyAttribute - public var m34: Double - - @ReadonlyAttribute - public var m41: Double - - @ReadonlyAttribute - public var m42: Double - - @ReadonlyAttribute - public var m43: Double - - @ReadonlyAttribute - public var m44: Double - - @ReadonlyAttribute - public var is2D: Bool - - @ReadonlyAttribute - public var isIdentity: Bool - - @inlinable public func translate(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.translate].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scale(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { - let _arg0 = scaleX?.jsValue ?? .undefined - let _arg1 = scaleY?.jsValue ?? .undefined - let _arg2 = scaleZ?.jsValue ?? .undefined - let _arg3 = originX?.jsValue ?? .undefined - let _arg4 = originY?.jsValue ?? .undefined - let _arg5 = originZ?.jsValue ?? .undefined - let this = jsObject - return this[Strings.scale].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @inlinable public func scaleNonUniform(scaleX: Double? = nil, scaleY: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.scaleNonUniform].function!(this: this, arguments: [scaleX?.jsValue ?? .undefined, scaleY?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scale3d(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.scale3d].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotate(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.rotate].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateFromVector(x: Double? = nil, y: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.rotateFromVector].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func rotateAxisAngle(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.rotateAxisAngle].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewX(sx: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.skewX].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func skewY(sy: Double? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.skewY].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func multiply(other: DOMMatrixInit? = nil) -> DOMMatrix { - let this = jsObject - return this[Strings.multiply].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func flipX() -> DOMMatrix { - let this = jsObject - return this[Strings.flipX].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func flipY() -> DOMMatrix { - let this = jsObject - return this[Strings.flipY].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func inverse() -> DOMMatrix { - let this = jsObject - return this[Strings.inverse].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func transformPoint(point: DOMPointInit? = nil) -> DOMPoint { - let this = jsObject - return this[Strings.transformPoint].function!(this: this, arguments: [point?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toFloat32Array() -> Float32Array { - let this = jsObject - return this[Strings.toFloat32Array].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func toFloat64Array() -> Float64Array { - let this = jsObject - return this[Strings.toFloat64Array].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DOMParser: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMParser].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func parseFromString(string: String, type: DOMParserSupportedType) -> Document { - let this = jsObject - return this[Strings.parseFromString].function!(this: this, arguments: [string.jsValue, type.jsValue]).fromJSValue()! - } -} - -public enum DOMParserSupportedType: JSString, JSValueCompatible { - case textHtml = "text/html" - case textXml = "text/xml" - case applicationXml = "application/xml" - case applicationXhtmlXml = "application/xhtml+xml" - case imageSvgXml = "image/svg+xml" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class DOMPoint: DOMPointReadOnly { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMPoint].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) - _z = ReadWriteAttribute(jsObject: jsObject, name: Strings.z) - _w = ReadWriteAttribute(jsObject: jsObject, name: Strings.w) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) - } - - // XXX: illegal static override - // override public static func fromPoint(other: DOMPointInit? = nil) -> Self - - @usableFromInline let _x: ReadWriteAttribute - @inlinable override public var x: Double { - get { _x.wrappedValue } - set { _x.wrappedValue = newValue } - } - - @usableFromInline let _y: ReadWriteAttribute - @inlinable override public var y: Double { - get { _y.wrappedValue } - set { _y.wrappedValue = newValue } - } - - @usableFromInline let _z: ReadWriteAttribute - @inlinable override public var z: Double { - get { _z.wrappedValue } - set { _z.wrappedValue = newValue } - } - - @usableFromInline let _w: ReadWriteAttribute - @inlinable override public var w: Double { - get { _w.wrappedValue } - set { _w.wrappedValue = newValue } - } -} - -public class DOMPointInit: BridgedDictionary { - public convenience init(x: Double, y: Double, z: Double, w: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.x] = x.jsValue - object[Strings.y] = y.jsValue - object[Strings.z] = z.jsValue - object[Strings.w] = w.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _x = ReadWriteAttribute(jsObject: object, name: Strings.x) - _y = ReadWriteAttribute(jsObject: object, name: Strings.y) - _z = ReadWriteAttribute(jsObject: object, name: Strings.z) - _w = ReadWriteAttribute(jsObject: object, name: Strings.w) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var x: Double - - @ReadWriteAttribute - public var y: Double - - @ReadWriteAttribute - public var z: Double - - @ReadWriteAttribute - public var w: Double -} - -public class DOMPointReadOnly: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMPointReadOnly].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) - _z = ReadonlyAttribute(jsObject: jsObject, name: Strings.z) - _w = ReadonlyAttribute(jsObject: jsObject, name: Strings.w) - self.jsObject = jsObject - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) - } - - @inlinable public static func fromPoint(other: DOMPointInit? = nil) -> Self { - let this = constructor - return this[Strings.fromPoint].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var x: Double - - @ReadonlyAttribute - public var y: Double - - @ReadonlyAttribute - public var z: Double - - @ReadonlyAttribute - public var w: Double - - @inlinable public func matrixTransform(matrix: DOMMatrixInit? = nil) -> DOMPoint { - let this = jsObject - return this[Strings.matrixTransform].function!(this: this, arguments: [matrix?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DOMQuad: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMQuad].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _p1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p1) - _p2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p2) - _p3 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p3) - _p4 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p4) - self.jsObject = jsObject - } - - @inlinable public convenience init(p1: DOMPointInit? = nil, p2: DOMPointInit? = nil, p3: DOMPointInit? = nil, p4: DOMPointInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [p1?.jsValue ?? .undefined, p2?.jsValue ?? .undefined, p3?.jsValue ?? .undefined, p4?.jsValue ?? .undefined])) - } - - @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { - let this = constructor - return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public static func fromQuad(other: DOMQuadInit? = nil) -> Self { - let this = constructor - return this[Strings.fromQuad].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var p1: DOMPoint - - @ReadonlyAttribute - public var p2: DOMPoint - - @ReadonlyAttribute - public var p3: DOMPoint - - @ReadonlyAttribute - public var p4: DOMPoint - - @inlinable public func getBounds() -> DOMRect { - let this = jsObject - return this[Strings.getBounds].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DOMQuadInit: BridgedDictionary { - public convenience init(p1: DOMPointInit, p2: DOMPointInit, p3: DOMPointInit, p4: DOMPointInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.p1] = p1.jsValue - object[Strings.p2] = p2.jsValue - object[Strings.p3] = p3.jsValue - object[Strings.p4] = p4.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _p1 = ReadWriteAttribute(jsObject: object, name: Strings.p1) - _p2 = ReadWriteAttribute(jsObject: object, name: Strings.p2) - _p3 = ReadWriteAttribute(jsObject: object, name: Strings.p3) - _p4 = ReadWriteAttribute(jsObject: object, name: Strings.p4) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var p1: DOMPointInit - - @ReadWriteAttribute - public var p2: DOMPointInit - - @ReadWriteAttribute - public var p3: DOMPointInit - - @ReadWriteAttribute - public var p4: DOMPointInit -} - -public class DOMRect: DOMRectReadOnly { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMRect].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) - } - - // XXX: illegal static override - // override public static func fromRect(other: DOMRectInit? = nil) -> Self - - @usableFromInline let _x: ReadWriteAttribute - @inlinable override public var x: Double { - get { _x.wrappedValue } - set { _x.wrappedValue = newValue } - } - - @usableFromInline let _y: ReadWriteAttribute - @inlinable override public var y: Double { - get { _y.wrappedValue } - set { _y.wrappedValue = newValue } - } - - @usableFromInline let _width: ReadWriteAttribute - @inlinable override public var width: Double { - get { _width.wrappedValue } - set { _width.wrappedValue = newValue } - } - - @usableFromInline let _height: ReadWriteAttribute - @inlinable override public var height: Double { - get { _height.wrappedValue } - set { _height.wrappedValue = newValue } - } -} - -public class DOMRectInit: BridgedDictionary { - public convenience init(x: Double, y: Double, width: Double, height: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.x] = x.jsValue - object[Strings.y] = y.jsValue - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _x = ReadWriteAttribute(jsObject: object, name: Strings.x) - _y = ReadWriteAttribute(jsObject: object, name: Strings.y) - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var x: Double - - @ReadWriteAttribute - public var y: Double - - @ReadWriteAttribute - public var width: Double - - @ReadWriteAttribute - public var height: Double -} - -public class DOMRectList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> DOMRect? { - jsObject[key].fromJSValue() - } -} - -public class DOMRectReadOnly: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectReadOnly].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) - _right = ReadonlyAttribute(jsObject: jsObject, name: Strings.right) - _bottom = ReadonlyAttribute(jsObject: jsObject, name: Strings.bottom) - _left = ReadonlyAttribute(jsObject: jsObject, name: Strings.left) - self.jsObject = jsObject - } - - @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) - } - - @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { - let this = constructor - return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var x: Double - - @ReadonlyAttribute - public var y: Double - - @ReadonlyAttribute - public var width: Double - - @ReadonlyAttribute - public var height: Double - - @ReadonlyAttribute - public var top: Double - - @ReadonlyAttribute - public var right: Double - - @ReadonlyAttribute - public var bottom: Double - - @ReadonlyAttribute - public var left: Double - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DOMStringList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> String? { - jsObject[key].fromJSValue() - } - - @inlinable public func contains(string: String) -> Bool { - let this = jsObject - return this[Strings.contains].function!(this: this, arguments: [string.jsValue]).fromJSValue()! - } -} - -public class DOMStringMap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringMap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public subscript(key: String) -> String { - jsObject[key].fromJSValue()! - } - - // XXX: unsupported setter for keys of type String - - // XXX: unsupported deleter for keys of type String -} - -public class DOMTokenList: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMTokenList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> String? { - jsObject[key].fromJSValue() - } - - @inlinable public func contains(token: String) -> Bool { - let this = jsObject - return this[Strings.contains].function!(this: this, arguments: [token.jsValue]).fromJSValue()! - } - - @inlinable public func add(tokens: String...) { - let this = jsObject - _ = this[Strings.add].function!(this: this, arguments: tokens.map(\.jsValue)) - } - - @inlinable public func remove(tokens: String...) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: tokens.map(\.jsValue)) - } - - @inlinable public func toggle(token: String, force: Bool? = nil) -> Bool { - let this = jsObject - return this[Strings.toggle].function!(this: this, arguments: [token.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func replace(token: String, newToken: String) -> Bool { - let this = jsObject - return this[Strings.replace].function!(this: this, arguments: [token.jsValue, newToken.jsValue]).fromJSValue()! - } - - @inlinable public func supports(token: String) -> Bool { - let this = jsObject - return this[Strings.supports].function!(this: this, arguments: [token.jsValue]).fromJSValue()! - } - - @ReadWriteAttribute - public var value: String - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public class DataTransfer: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransfer].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _dropEffect = ReadWriteAttribute(jsObject: jsObject, name: Strings.dropEffect) - _effectAllowed = ReadWriteAttribute(jsObject: jsObject, name: Strings.effectAllowed) - _items = ReadonlyAttribute(jsObject: jsObject, name: Strings.items) - _types = ReadonlyAttribute(jsObject: jsObject, name: Strings.types) - _files = ReadonlyAttribute(jsObject: jsObject, name: Strings.files) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var dropEffect: String - - @ReadWriteAttribute - public var effectAllowed: String - - @ReadonlyAttribute - public var items: DataTransferItemList - - @inlinable public func setDragImage(image: Element, x: Int32, y: Int32) { - let this = jsObject - _ = this[Strings.setDragImage].function!(this: this, arguments: [image.jsValue, x.jsValue, y.jsValue]) - } - - @ReadonlyAttribute - public var types: [String] - - @inlinable public func getData(format: String) -> String { - let this = jsObject - return this[Strings.getData].function!(this: this, arguments: [format.jsValue]).fromJSValue()! - } - - @inlinable public func setData(format: String, data: String) { - let this = jsObject - _ = this[Strings.setData].function!(this: this, arguments: [format.jsValue, data.jsValue]) - } - - @inlinable public func clearData(format: String? = nil) { - let this = jsObject - _ = this[Strings.clearData].function!(this: this, arguments: [format?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var files: FileList -} - -public class DataTransferItem: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItem].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var type: String - - // XXX: member 'getAsString' is ignored - - @inlinable public func getAsFile() -> File? { - let this = jsObject - return this[Strings.getAsFile].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class DataTransferItemList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItemList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> DataTransferItem { - jsObject[key].fromJSValue()! - } - - @inlinable public func add(data: String, type: String) -> DataTransferItem? { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [data.jsValue, type.jsValue]).fromJSValue()! - } - - @inlinable public func add(data: File) -> DataTransferItem? { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func remove(index: UInt32) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable public func clear() { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: []) - } -} - -public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) - _implementation = ReadonlyAttribute(jsObject: jsObject, name: Strings.implementation) - _URL = ReadonlyAttribute(jsObject: jsObject, name: Strings.URL) - _documentURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentURI) - _compatMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.compatMode) - _characterSet = ReadonlyAttribute(jsObject: jsObject, name: Strings.characterSet) - _charset = ReadonlyAttribute(jsObject: jsObject, name: Strings.charset) - _inputEncoding = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputEncoding) - _contentType = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentType) - _doctype = ReadonlyAttribute(jsObject: jsObject, name: Strings.doctype) - _documentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentElement) - _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) - _domain = ReadWriteAttribute(jsObject: jsObject, name: Strings.domain) - _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) - _cookie = ReadWriteAttribute(jsObject: jsObject, name: Strings.cookie) - _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) - _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) - _body = ReadWriteAttribute(jsObject: jsObject, name: Strings.body) - _head = ReadonlyAttribute(jsObject: jsObject, name: Strings.head) - _images = ReadonlyAttribute(jsObject: jsObject, name: Strings.images) - _embeds = ReadonlyAttribute(jsObject: jsObject, name: Strings.embeds) - _plugins = ReadonlyAttribute(jsObject: jsObject, name: Strings.plugins) - _links = ReadonlyAttribute(jsObject: jsObject, name: Strings.links) - _forms = ReadonlyAttribute(jsObject: jsObject, name: Strings.forms) - _scripts = ReadonlyAttribute(jsObject: jsObject, name: Strings.scripts) - _currentScript = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentScript) - _defaultView = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultView) - _designMode = ReadWriteAttribute(jsObject: jsObject, name: Strings.designMode) - _hidden = ReadonlyAttribute(jsObject: jsObject, name: Strings.hidden) - _visibilityState = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibilityState) - _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) - _onvisibilitychange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onvisibilitychange) - _fgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.fgColor) - _linkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.linkColor) - _vlinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.vlinkColor) - _alinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.alinkColor) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _anchors = ReadonlyAttribute(jsObject: jsObject, name: Strings.anchors) - _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) - _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var timeline: DocumentTimeline - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var implementation: DOMImplementation - - @ReadonlyAttribute - public var URL: String - - @ReadonlyAttribute - public var documentURI: String - - @ReadonlyAttribute - public var compatMode: String - - @ReadonlyAttribute - public var characterSet: String - - @ReadonlyAttribute - public var charset: String - - @ReadonlyAttribute - public var inputEncoding: String - - @ReadonlyAttribute - public var contentType: String - - @ReadonlyAttribute - public var doctype: DocumentType? - - @ReadonlyAttribute - public var documentElement: Element? - - @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! - } - - @inlinable public func createElement(localName: String, options: JSValue? = nil) -> Element { - let this = jsObject - return this[Strings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: JSValue? = nil) -> Element { - let this = jsObject - return this[Strings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func createDocumentFragment() -> DocumentFragment { - let this = jsObject - return this[Strings.createDocumentFragment].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func createTextNode(data: String) -> Text { - let this = jsObject - return this[Strings.createTextNode].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createCDATASection(data: String) -> CDATASection { - let this = jsObject - return this[Strings.createCDATASection].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createComment(data: String) -> Comment { - let this = jsObject - return this[Strings.createComment].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable public func createProcessingInstruction(target: String, data: String) -> ProcessingInstruction { - let this = jsObject - return this[Strings.createProcessingInstruction].function!(this: this, arguments: [target.jsValue, data.jsValue]).fromJSValue()! - } - - @inlinable public func importNode(node: Node, deep: Bool? = nil) -> Node { - let this = jsObject - return this[Strings.importNode].function!(this: this, arguments: [node.jsValue, deep?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func adoptNode(node: Node) -> Node { - let this = jsObject - return this[Strings.adoptNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public func createAttribute(localName: String) -> Attr { - let this = jsObject - return this[Strings.createAttribute].function!(this: this, arguments: [localName.jsValue]).fromJSValue()! - } - - @inlinable public func createAttributeNS(namespace: String?, qualifiedName: String) -> Attr { - let this = jsObject - return this[Strings.createAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func createEvent(interface: String) -> Event { - let this = jsObject - return this[Strings.createEvent].function!(this: this, arguments: [interface.jsValue]).fromJSValue()! - } - - @inlinable public func createRange() -> Range { - let this = jsObject - return this[Strings.createRange].function!(this: this, arguments: []).fromJSValue()! - } - - // XXX: member 'createNodeIterator' is ignored - - // XXX: member 'createTreeWalker' is ignored - - @ReadonlyAttribute - public var location: Location? - - @ReadWriteAttribute - public var domain: String - - @ReadonlyAttribute - public var referrer: String - - @ReadWriteAttribute - public var cookie: String - - @ReadonlyAttribute - public var lastModified: String - - @ReadonlyAttribute - public var readyState: DocumentReadyState - - @inlinable public subscript(key: String) -> JSObject { - jsObject[key].fromJSValue()! - } - - @ReadWriteAttribute - public var title: String - - @ReadWriteAttribute - public var dir: String - - @ReadWriteAttribute - public var body: HTMLElement? - - @ReadonlyAttribute - public var head: HTMLHeadElement? - - @ReadonlyAttribute - public var images: HTMLCollection - - @ReadonlyAttribute - public var embeds: HTMLCollection - - @ReadonlyAttribute - public var plugins: HTMLCollection - - @ReadonlyAttribute - public var links: HTMLCollection - - @ReadonlyAttribute - public var forms: HTMLCollection - - @ReadonlyAttribute - public var scripts: HTMLCollection - - @inlinable public func getElementsByName(elementName: String) -> NodeList { - let this = jsObject - return this[Strings.getElementsByName].function!(this: this, arguments: [elementName.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var currentScript: HTMLOrSVGScriptElement? - - @inlinable public func open(unused1: String? = nil, unused2: String? = nil) -> Self { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [unused1?.jsValue ?? .undefined, unused2?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func open(url: String, name: String, features: String) -> WindowProxy? { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [url.jsValue, name.jsValue, features.jsValue]).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public func write(text: String...) { - let this = jsObject - _ = this[Strings.write].function!(this: this, arguments: text.map(\.jsValue)) - } - - @inlinable public func writeln(text: String...) { - let this = jsObject - _ = this[Strings.writeln].function!(this: this, arguments: text.map(\.jsValue)) - } - - @ReadonlyAttribute - public var defaultView: WindowProxy? - - @inlinable public func hasFocus() -> Bool { - let this = jsObject - return this[Strings.hasFocus].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var designMode: String - - @inlinable public func execCommand(commandId: String, showUI: Bool? = nil, value: String? = nil) -> Bool { - let this = jsObject - return this[Strings.execCommand].function!(this: this, arguments: [commandId.jsValue, showUI?.jsValue ?? .undefined, value?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func queryCommandEnabled(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandEnabled].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandIndeterm(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandIndeterm].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandState(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandState].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandSupported(commandId: String) -> Bool { - let this = jsObject - return this[Strings.queryCommandSupported].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @inlinable public func queryCommandValue(commandId: String) -> String { - let this = jsObject - return this[Strings.queryCommandValue].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var hidden: Bool - - @ReadonlyAttribute - public var visibilityState: DocumentVisibilityState - - @ClosureAttribute1Optional - public var onreadystatechange: EventHandler - - @ClosureAttribute1Optional - public var onvisibilitychange: EventHandler - - @ReadWriteAttribute - public var fgColor: String - - @ReadWriteAttribute - public var linkColor: String - - @ReadWriteAttribute - public var vlinkColor: String - - @ReadWriteAttribute - public var alinkColor: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadonlyAttribute - public var anchors: HTMLCollection - - @ReadonlyAttribute - public var applets: HTMLCollection - - @inlinable public func clear() { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public func captureEvents() { - let this = jsObject - _ = this[Strings.captureEvents].function!(this: this, arguments: []) - } - - @inlinable public func releaseEvents() { - let this = jsObject - _ = this[Strings.releaseEvents].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var all: HTMLAllCollection -} - -public protocol DocumentAndElementEventHandlers: JSBridgedClass {} -public extension DocumentAndElementEventHandlers { - @inlinable var oncopy: EventHandler { - get { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] = newValue } - } - - @inlinable var oncut: EventHandler { - get { ClosureAttribute1Optional[Strings.oncut, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncut, in: jsObject] = newValue } - } - - @inlinable var onpaste: EventHandler { - get { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] = newValue } - } -} - -public class DocumentFragment: Node, NonElementParentNode, ParentNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentFragment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public protocol DocumentOrShadowRoot: JSBridgedClass {} -public extension DocumentOrShadowRoot { - @inlinable func getAnimations() -> [Animation] { - let this = jsObject - return this[Strings.getAnimations].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var activeElement: Element? { ReadonlyAttribute[Strings.activeElement, in: jsObject] } -} - -public enum DocumentReadyState: JSString, JSValueCompatible { - case loading = "loading" - case interactive = "interactive" - case complete = "complete" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class DocumentTimeline: AnimationTimeline { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentTimeline].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(options: DocumentTimelineOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [options?.jsValue ?? .undefined])) - } -} - -public class DocumentTimelineOptions: BridgedDictionary { - public convenience init(originTime: DOMHighResTimeStamp) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.originTime] = originTime.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _originTime = ReadWriteAttribute(jsObject: object, name: Strings.originTime) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var originTime: DOMHighResTimeStamp -} - -public class DocumentType: Node, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentType].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _publicId = ReadonlyAttribute(jsObject: jsObject, name: Strings.publicId) - _systemId = ReadonlyAttribute(jsObject: jsObject, name: Strings.systemId) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var publicId: String - - @ReadonlyAttribute - public var systemId: String -} - -public enum DocumentVisibilityState: JSString, JSValueCompatible { - case visible = "visible" - case hidden = "hidden" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class DragEvent: MouseEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DragEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _dataTransfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.dataTransfer) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: DragEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var dataTransfer: DataTransfer? -} - -public class DragEventInit: BridgedDictionary { - public convenience init(dataTransfer: DataTransfer?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.dataTransfer] = dataTransfer.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _dataTransfer = ReadWriteAttribute(jsObject: object, name: Strings.dataTransfer) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var dataTransfer: DataTransfer? -} - -public class EffectTiming: BridgedDictionary { - public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, direction: PlaybackDirection, easing: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.delay] = delay.jsValue - object[Strings.endDelay] = endDelay.jsValue - object[Strings.fill] = fill.jsValue - object[Strings.iterationStart] = iterationStart.jsValue - object[Strings.iterations] = iterations.jsValue - object[Strings.direction] = direction.jsValue - object[Strings.easing] = easing.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) - _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) - _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) - _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) - _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) - _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var delay: Double - - @ReadWriteAttribute - public var endDelay: Double - - @ReadWriteAttribute - public var fill: FillMode - - @ReadWriteAttribute - public var iterationStart: Double - - @ReadWriteAttribute - public var iterations: Double - - @ReadWriteAttribute - public var direction: PlaybackDirection - - @ReadWriteAttribute - public var easing: String -} - -public class Element: Node, ARIAMixin, Animatable, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) - _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) - _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) - _tagName = ReadonlyAttribute(jsObject: jsObject, name: Strings.tagName) - _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) - _className = ReadWriteAttribute(jsObject: jsObject, name: Strings.className) - _classList = ReadonlyAttribute(jsObject: jsObject, name: Strings.classList) - _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) - _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var namespaceURI: String? - - @ReadonlyAttribute - public var prefix: String? - - @ReadonlyAttribute - public var localName: String - - @ReadonlyAttribute - public var tagName: String - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var className: String - - @ReadonlyAttribute - public var classList: DOMTokenList - - @ReadWriteAttribute - public var slot: String - - @inlinable public func hasAttributes() -> Bool { - let this = jsObject - return this[Strings.hasAttributes].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var attributes: NamedNodeMap - - @inlinable public func getAttributeNames() -> [String] { - let this = jsObject - return this[Strings.getAttributeNames].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getAttribute(qualifiedName: String) -> String? { - let this = jsObject - return this[Strings.getAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNS(namespace: String?, localName: String) -> String? { - let this = jsObject - return this[Strings.getAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setAttribute(qualifiedName: String, value: String) { - let this = jsObject - _ = this[Strings.setAttribute].function!(this: this, arguments: [qualifiedName.jsValue, value.jsValue]) - } - - @inlinable public func setAttributeNS(namespace: String?, qualifiedName: String, value: String) { - let this = jsObject - _ = this[Strings.setAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, value.jsValue]) - } - - @inlinable public func removeAttribute(qualifiedName: String) { - let this = jsObject - _ = this[Strings.removeAttribute].function!(this: this, arguments: [qualifiedName.jsValue]) - } - - @inlinable public func removeAttributeNS(namespace: String?, localName: String) { - let this = jsObject - _ = this[Strings.removeAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]) - } - - @inlinable public func toggleAttribute(qualifiedName: String, force: Bool? = nil) -> Bool { - let this = jsObject - return this[Strings.toggleAttribute].function!(this: this, arguments: [qualifiedName.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func hasAttribute(qualifiedName: String) -> Bool { - let this = jsObject - return this[Strings.hasAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func hasAttributeNS(namespace: String?, localName: String) -> Bool { - let this = jsObject - return this[Strings.hasAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNode(qualifiedName: String) -> Attr? { - let this = jsObject - return this[Strings.getAttributeNode].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getAttributeNodeNS(namespace: String?, localName: String) -> Attr? { - let this = jsObject - return this[Strings.getAttributeNodeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setAttributeNode(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func setAttributeNodeNS(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setAttributeNodeNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func removeAttributeNode(attr: Attr) -> Attr { - let this = jsObject - return this[Strings.removeAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func attachShadow(init: ShadowRootInit) -> ShadowRoot { - let this = jsObject - return this[Strings.attachShadow].function!(this: this, arguments: [`init`.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func closest(selectors: String) -> Element? { - let this = jsObject - return this[Strings.closest].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func matches(selectors: String) -> Bool { - let this = jsObject - return this[Strings.matches].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func webkitMatchesSelector(selectors: String) -> Bool { - let this = jsObject - return this[Strings.webkitMatchesSelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { - let this = jsObject - return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! - } - - @inlinable public func insertAdjacentElement(where: String, element: Element) -> Element? { - let this = jsObject - return this[Strings.insertAdjacentElement].function!(this: this, arguments: [`where`.jsValue, element.jsValue]).fromJSValue()! - } - - @inlinable public func insertAdjacentText(where: String, data: String) { - let this = jsObject - _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) - } -} - -public protocol ElementContentEditable: JSBridgedClass {} -public extension ElementContentEditable { - @inlinable var contentEditable: String { - get { ReadWriteAttribute[Strings.contentEditable, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.contentEditable, in: jsObject] = newValue } - } - - @inlinable var enterKeyHint: String { - get { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] = newValue } - } - - @inlinable var isContentEditable: Bool { ReadonlyAttribute[Strings.isContentEditable, in: jsObject] } - - @inlinable var inputMode: String { - get { ReadWriteAttribute[Strings.inputMode, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.inputMode, in: jsObject] = newValue } - } -} - -public class ElementCreationOptions: BridgedDictionary { - public convenience init(is: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.is] = `is`.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _is = ReadWriteAttribute(jsObject: object, name: Strings.is) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var `is`: String -} - -public class ElementDefinitionOptions: BridgedDictionary { - public convenience init(extends: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.extends] = extends.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _extends = ReadWriteAttribute(jsObject: object, name: Strings.extends) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var extends: String -} - -public class ElementInternals: JSBridgedClass, ARIAMixin { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ElementInternals].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func setFormValue(value: JSValue?, state: JSValue? = nil) { - let this = jsObject - _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { - let this = jsObject - _ = this[Strings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class ErrorEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ErrorEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) - _lineno = ReadonlyAttribute(jsObject: jsObject, name: Strings.lineno) - _colno = ReadonlyAttribute(jsObject: jsObject, name: Strings.colno) - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: ErrorEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var message: String - - @ReadonlyAttribute - public var filename: String - - @ReadonlyAttribute - public var lineno: UInt32 - - @ReadonlyAttribute - public var colno: UInt32 - - @ReadonlyAttribute - public var error: JSValue -} - -public class ErrorEventInit: BridgedDictionary { - public convenience init(message: String, filename: String, lineno: UInt32, colno: UInt32, error: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.message] = message.jsValue - object[Strings.filename] = filename.jsValue - object[Strings.lineno] = lineno.jsValue - object[Strings.colno] = colno.jsValue - object[Strings.error] = error.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _message = ReadWriteAttribute(jsObject: object, name: Strings.message) - _filename = ReadWriteAttribute(jsObject: object, name: Strings.filename) - _lineno = ReadWriteAttribute(jsObject: object, name: Strings.lineno) - _colno = ReadWriteAttribute(jsObject: object, name: Strings.colno) - _error = ReadWriteAttribute(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var message: String - - @ReadWriteAttribute - public var filename: String - - @ReadWriteAttribute - public var lineno: UInt32 - - @ReadWriteAttribute - public var colno: UInt32 - - @ReadWriteAttribute - public var error: JSValue -} - -public class Event: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Event].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) - _srcElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.srcElement) - _currentTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTarget) - _eventPhase = ReadonlyAttribute(jsObject: jsObject, name: Strings.eventPhase) - _cancelBubble = ReadWriteAttribute(jsObject: jsObject, name: Strings.cancelBubble) - _bubbles = ReadonlyAttribute(jsObject: jsObject, name: Strings.bubbles) - _cancelable = ReadonlyAttribute(jsObject: jsObject, name: Strings.cancelable) - _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) - _defaultPrevented = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultPrevented) - _composed = ReadonlyAttribute(jsObject: jsObject, name: Strings.composed) - _isTrusted = ReadonlyAttribute(jsObject: jsObject, name: Strings.isTrusted) - _timeStamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeStamp) - self.jsObject = jsObject - } - - @inlinable public convenience init(type: String, eventInitDict: EventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var target: EventTarget? - - @ReadonlyAttribute - public var srcElement: EventTarget? - - @ReadonlyAttribute - public var currentTarget: EventTarget? - - @inlinable public func composedPath() -> [EventTarget] { - let this = jsObject - return this[Strings.composedPath].function!(this: this, arguments: []).fromJSValue()! - } - - public static let NONE: UInt16 = 0 - - public static let CAPTURING_PHASE: UInt16 = 1 - - public static let AT_TARGET: UInt16 = 2 - - public static let BUBBLING_PHASE: UInt16 = 3 - - @ReadonlyAttribute - public var eventPhase: UInt16 - - @inlinable public func stopPropagation() { - let this = jsObject - _ = this[Strings.stopPropagation].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var cancelBubble: Bool - - @inlinable public func stopImmediatePropagation() { - let this = jsObject - _ = this[Strings.stopImmediatePropagation].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var bubbles: Bool - - @ReadonlyAttribute - public var cancelable: Bool - - @ReadWriteAttribute - public var returnValue: Bool - - @inlinable public func preventDefault() { - let this = jsObject - _ = this[Strings.preventDefault].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var defaultPrevented: Bool - - @ReadonlyAttribute - public var composed: Bool - - @ReadonlyAttribute - public var isTrusted: Bool - - @ReadonlyAttribute - public var timeStamp: DOMHighResTimeStamp - - @inlinable public func initEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil) { - let this = jsObject - _ = this[Strings.initEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined]) - } -} - -public class EventInit: BridgedDictionary { - public convenience init(bubbles: Bool, cancelable: Bool, composed: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.bubbles] = bubbles.jsValue - object[Strings.cancelable] = cancelable.jsValue - object[Strings.composed] = composed.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _bubbles = ReadWriteAttribute(jsObject: object, name: Strings.bubbles) - _cancelable = ReadWriteAttribute(jsObject: object, name: Strings.cancelable) - _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var bubbles: Bool - - @ReadWriteAttribute - public var cancelable: Bool - - @ReadWriteAttribute - public var composed: Bool -} - -public class EventListenerOptions: BridgedDictionary { - public convenience init(capture: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.capture] = capture.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _capture = ReadWriteAttribute(jsObject: object, name: Strings.capture) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var capture: Bool -} - -public class EventModifierInit: BridgedDictionary { - public convenience init(ctrlKey: Bool, shiftKey: Bool, altKey: Bool, metaKey: Bool, modifierAltGraph: Bool, modifierCapsLock: Bool, modifierFn: Bool, modifierFnLock: Bool, modifierHyper: Bool, modifierNumLock: Bool, modifierScrollLock: Bool, modifierSuper: Bool, modifierSymbol: Bool, modifierSymbolLock: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.ctrlKey] = ctrlKey.jsValue - object[Strings.shiftKey] = shiftKey.jsValue - object[Strings.altKey] = altKey.jsValue - object[Strings.metaKey] = metaKey.jsValue - object[Strings.modifierAltGraph] = modifierAltGraph.jsValue - object[Strings.modifierCapsLock] = modifierCapsLock.jsValue - object[Strings.modifierFn] = modifierFn.jsValue - object[Strings.modifierFnLock] = modifierFnLock.jsValue - object[Strings.modifierHyper] = modifierHyper.jsValue - object[Strings.modifierNumLock] = modifierNumLock.jsValue - object[Strings.modifierScrollLock] = modifierScrollLock.jsValue - object[Strings.modifierSuper] = modifierSuper.jsValue - object[Strings.modifierSymbol] = modifierSymbol.jsValue - object[Strings.modifierSymbolLock] = modifierSymbolLock.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _ctrlKey = ReadWriteAttribute(jsObject: object, name: Strings.ctrlKey) - _shiftKey = ReadWriteAttribute(jsObject: object, name: Strings.shiftKey) - _altKey = ReadWriteAttribute(jsObject: object, name: Strings.altKey) - _metaKey = ReadWriteAttribute(jsObject: object, name: Strings.metaKey) - _modifierAltGraph = ReadWriteAttribute(jsObject: object, name: Strings.modifierAltGraph) - _modifierCapsLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierCapsLock) - _modifierFn = ReadWriteAttribute(jsObject: object, name: Strings.modifierFn) - _modifierFnLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierFnLock) - _modifierHyper = ReadWriteAttribute(jsObject: object, name: Strings.modifierHyper) - _modifierNumLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierNumLock) - _modifierScrollLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierScrollLock) - _modifierSuper = ReadWriteAttribute(jsObject: object, name: Strings.modifierSuper) - _modifierSymbol = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbol) - _modifierSymbolLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbolLock) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var ctrlKey: Bool - - @ReadWriteAttribute - public var shiftKey: Bool - - @ReadWriteAttribute - public var altKey: Bool - - @ReadWriteAttribute - public var metaKey: Bool - - @ReadWriteAttribute - public var modifierAltGraph: Bool - - @ReadWriteAttribute - public var modifierCapsLock: Bool - - @ReadWriteAttribute - public var modifierFn: Bool - - @ReadWriteAttribute - public var modifierFnLock: Bool - - @ReadWriteAttribute - public var modifierHyper: Bool - - @ReadWriteAttribute - public var modifierNumLock: Bool - - @ReadWriteAttribute - public var modifierScrollLock: Bool - - @ReadWriteAttribute - public var modifierSuper: Bool - - @ReadWriteAttribute - public var modifierSymbol: Bool - - @ReadWriteAttribute - public var modifierSymbolLock: Bool -} - -public class EventSource: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.EventSource].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _withCredentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.withCredentials) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _onopen = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onopen) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, eventSourceInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var withCredentials: Bool - - public static let CONNECTING: UInt16 = 0 - - public static let OPEN: UInt16 = 1 - - public static let CLOSED: UInt16 = 2 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ClosureAttribute1Optional - public var onopen: EventHandler - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} - -public class EventSourceInit: BridgedDictionary { - public convenience init(withCredentials: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.withCredentials] = withCredentials.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _withCredentials = ReadWriteAttribute(jsObject: object, name: Strings.withCredentials) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var withCredentials: Bool -} - -public class EventTarget: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EventTarget].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - // XXX: member 'addEventListener' is ignored - - // XXX: member 'removeEventListener' is ignored - - @inlinable public func dispatchEvent(event: Event) -> Bool { - let this = jsObject - return this[Strings.dispatchEvent].function!(this: this, arguments: [event.jsValue]).fromJSValue()! - } -} - -public class ExtendableEventInit: BridgedDictionary { - public convenience init() { - let object = JSObject.global[Strings.Object].function!.new() - - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - super.init(unsafelyWrapping: object) - } -} - -public class External: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.External].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func AddSearchProvider() { - let this = jsObject - _ = this[Strings.AddSearchProvider].function!(this: this, arguments: []) - } - - @inlinable public func IsSearchProviderInstalled() { - let this = jsObject - _ = this[Strings.IsSearchProviderInstalled].function!(this: this, arguments: []) - } -} - -public class FetchEventInit: BridgedDictionary { - public convenience init(request: Request, preloadResponse: JSPromise, clientId: String, resultingClientId: String, replacesClientId: String, handled: JSPromise) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.request] = request.jsValue - object[Strings.preloadResponse] = preloadResponse.jsValue - object[Strings.clientId] = clientId.jsValue - object[Strings.resultingClientId] = resultingClientId.jsValue - object[Strings.replacesClientId] = replacesClientId.jsValue - object[Strings.handled] = handled.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _request = ReadWriteAttribute(jsObject: object, name: Strings.request) - _preloadResponse = ReadWriteAttribute(jsObject: object, name: Strings.preloadResponse) - _clientId = ReadWriteAttribute(jsObject: object, name: Strings.clientId) - _resultingClientId = ReadWriteAttribute(jsObject: object, name: Strings.resultingClientId) - _replacesClientId = ReadWriteAttribute(jsObject: object, name: Strings.replacesClientId) - _handled = ReadWriteAttribute(jsObject: object, name: Strings.handled) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var request: Request - - @ReadWriteAttribute - public var preloadResponse: JSPromise - - @ReadWriteAttribute - public var clientId: String - - @ReadWriteAttribute - public var resultingClientId: String - - @ReadWriteAttribute - public var replacesClientId: String - - @ReadWriteAttribute - public var handled: JSPromise -} - -public enum FillMode: JSString, JSValueCompatible { - case none = "none" - case forwards = "forwards" - case backwards = "backwards" - case both = "both" - case auto = "auto" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class FocusEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FocusEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: FocusEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var relatedTarget: EventTarget? -} - -public class FocusEventInit: BridgedDictionary { - public convenience init(relatedTarget: EventTarget?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.relatedTarget] = relatedTarget.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var relatedTarget: EventTarget? -} - -public class FocusOptions: BridgedDictionary { - public convenience init(preventScroll: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.preventScroll] = preventScroll.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventScroll = ReadWriteAttribute(jsObject: object, name: Strings.preventScroll) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventScroll: Bool -} - -public class FormData: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FormData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(form: HTMLFormElement? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [form?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func append(name: String, blobValue: Blob, filename: String? = nil) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> FormDataEntryValue? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAll(name: String) -> [FormDataEntryValue] { - let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func set(name: String, blobValue: Blob, filename: String? = nil) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public class FormDataEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FormDataEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _formData = ReadonlyAttribute(jsObject: jsObject, name: Strings.formData) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: FormDataEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var formData: FormData -} - -public class FormDataEventInit: BridgedDictionary { - public convenience init(formData: FormData) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.formData] = formData.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _formData = ReadWriteAttribute(jsObject: object, name: Strings.formData) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var formData: FormData -} - -public enum FrameType: JSString, JSValueCompatible { - case auxiliary = "auxiliary" - case topLevel = "top-level" - case nested = "nested" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol GenericTransformStream: JSBridgedClass {} -public extension GenericTransformStream { - @inlinable var readable: ReadableStream { ReadonlyAttribute[Strings.readable, in: jsObject] } - - @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } -} - -public class GetAnimationsOptions: BridgedDictionary { - public convenience init(subtree: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.subtree] = subtree.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var subtree: Bool -} - -public class GetRootNodeOptions: BridgedDictionary { - public convenience init(composed: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.composed] = composed.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var composed: Bool -} - -public protocol GlobalEventHandlers: JSBridgedClass {} -public extension GlobalEventHandlers { - @inlinable var onabort: EventHandler { - get { ClosureAttribute1Optional[Strings.onabort, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onabort, in: jsObject] = newValue } - } - - @inlinable var onauxclick: EventHandler { - get { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] = newValue } - } - - @inlinable var onblur: EventHandler { - get { ClosureAttribute1Optional[Strings.onblur, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onblur, in: jsObject] = newValue } - } - - @inlinable var oncancel: EventHandler { - get { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] = newValue } - } - - @inlinable var oncanplay: EventHandler { - get { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] = newValue } - } - - @inlinable var oncanplaythrough: EventHandler { - get { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] = newValue } - } - - @inlinable var onchange: EventHandler { - get { ClosureAttribute1Optional[Strings.onchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onchange, in: jsObject] = newValue } - } - - @inlinable var onclick: EventHandler { - get { ClosureAttribute1Optional[Strings.onclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onclick, in: jsObject] = newValue } - } - - @inlinable var onclose: EventHandler { - get { ClosureAttribute1Optional[Strings.onclose, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onclose, in: jsObject] = newValue } - } - - @inlinable var oncontextlost: EventHandler { - get { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] = newValue } - } - - @inlinable var oncontextmenu: EventHandler { - get { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] = newValue } - } - - @inlinable var oncontextrestored: EventHandler { - get { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] = newValue } - } - - @inlinable var oncuechange: EventHandler { - get { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] = newValue } - } - - @inlinable var ondblclick: EventHandler { - get { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] = newValue } - } - - @inlinable var ondrag: EventHandler { - get { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] = newValue } - } - - @inlinable var ondragend: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] = newValue } - } - - @inlinable var ondragenter: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] = newValue } - } - - @inlinable var ondragleave: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] = newValue } - } - - @inlinable var ondragover: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] = newValue } - } - - @inlinable var ondragstart: EventHandler { - get { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] = newValue } - } - - @inlinable var ondrop: EventHandler { - get { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] = newValue } - } - - @inlinable var ondurationchange: EventHandler { - get { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] = newValue } - } - - @inlinable var onemptied: EventHandler { - get { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] = newValue } - } - - @inlinable var onended: EventHandler { - get { ClosureAttribute1Optional[Strings.onended, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onended, in: jsObject] = newValue } - } - - @inlinable var onerror: OnErrorEventHandler { - get { ClosureAttribute5Optional[Strings.onerror, in: jsObject] } - nonmutating set { ClosureAttribute5Optional[Strings.onerror, in: jsObject] = newValue } - } - - @inlinable var onfocus: EventHandler { - get { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] = newValue } - } - - @inlinable var onformdata: EventHandler { - get { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] = newValue } - } - - @inlinable var oninput: EventHandler { - get { ClosureAttribute1Optional[Strings.oninput, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oninput, in: jsObject] = newValue } - } - - @inlinable var oninvalid: EventHandler { - get { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] = newValue } - } - - @inlinable var onkeydown: EventHandler { - get { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] = newValue } - } - - @inlinable var onkeypress: EventHandler { - get { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] = newValue } - } - - @inlinable var onkeyup: EventHandler { - get { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] = newValue } - } - - @inlinable var onload: EventHandler { - get { ClosureAttribute1Optional[Strings.onload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onload, in: jsObject] = newValue } - } - - @inlinable var onloadeddata: EventHandler { - get { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] = newValue } - } - - @inlinable var onloadedmetadata: EventHandler { - get { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] = newValue } - } - - @inlinable var onloadstart: EventHandler { - get { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] = newValue } - } - - @inlinable var onmousedown: EventHandler { - get { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] = newValue } - } - - @inlinable var onmouseenter: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] = newValue } - } - - @inlinable var onmouseleave: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] = newValue } - } - - @inlinable var onmousemove: EventHandler { - get { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] = newValue } - } - - @inlinable var onmouseout: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] = newValue } - } - - @inlinable var onmouseover: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] = newValue } - } - - @inlinable var onmouseup: EventHandler { - get { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] = newValue } - } - - @inlinable var onpause: EventHandler { - get { ClosureAttribute1Optional[Strings.onpause, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpause, in: jsObject] = newValue } - } - - @inlinable var onplay: EventHandler { - get { ClosureAttribute1Optional[Strings.onplay, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onplay, in: jsObject] = newValue } - } - - @inlinable var onplaying: EventHandler { - get { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] = newValue } - } - - @inlinable var onprogress: EventHandler { - get { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] = newValue } - } - - @inlinable var onratechange: EventHandler { - get { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] = newValue } - } - - @inlinable var onreset: EventHandler { - get { ClosureAttribute1Optional[Strings.onreset, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onreset, in: jsObject] = newValue } - } - - @inlinable var onresize: EventHandler { - get { ClosureAttribute1Optional[Strings.onresize, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onresize, in: jsObject] = newValue } - } - - @inlinable var onscroll: EventHandler { - get { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] = newValue } - } - - @inlinable var onsecuritypolicyviolation: EventHandler { - get { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] = newValue } - } - - @inlinable var onseeked: EventHandler { - get { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] = newValue } - } - - @inlinable var onseeking: EventHandler { - get { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] = newValue } - } - - @inlinable var onselect: EventHandler { - get { ClosureAttribute1Optional[Strings.onselect, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onselect, in: jsObject] = newValue } - } - - @inlinable var onslotchange: EventHandler { - get { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] = newValue } - } - - @inlinable var onstalled: EventHandler { - get { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] = newValue } - } - - @inlinable var onsubmit: EventHandler { - get { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] = newValue } - } - - @inlinable var onsuspend: EventHandler { - get { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] = newValue } - } - - @inlinable var ontimeupdate: EventHandler { - get { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] = newValue } - } - - @inlinable var ontoggle: EventHandler { - get { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] = newValue } - } - - @inlinable var onvolumechange: EventHandler { - get { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] = newValue } - } - - @inlinable var onwaiting: EventHandler { - get { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationend: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationiteration: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] = newValue } - } - - @inlinable var onwebkitanimationstart: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] = newValue } - } - - @inlinable var onwebkittransitionend: EventHandler { - get { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] = newValue } - } - - @inlinable var onwheel: EventHandler { - get { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] = newValue } - } -} - -public class HTMLAllCollection: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLAllCollection].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element { - jsObject[key].fromJSValue()! - } - - @inlinable public subscript(key: String) -> JSValue? { - jsObject[key].fromJSValue() - } - - @inlinable public func item(nameOrIndex: String? = nil) -> JSValue? { - let this = jsObject - return this[Strings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class HTMLAnchorElement: HTMLElement, HTMLHyperlinkElementUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAnchorElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) - _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) - _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) - _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var download: String - - @ReadWriteAttribute - public var ping: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var hreflang: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var coords: String - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var rev: String - - @ReadWriteAttribute - public var shape: String -} - -public class HTMLAreaElement: HTMLElement, HTMLHyperlinkElementUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAreaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) - _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) - _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) - _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _noHref = ReadWriteAttribute(jsObject: jsObject, name: Strings.noHref) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var coords: String - - @ReadWriteAttribute - public var shape: String - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var download: String - - @ReadWriteAttribute - public var ping: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var noHref: Bool -} - -public class HTMLAudioElement: HTMLMediaElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAudioElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLBRElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBRElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _clear = ReadWriteAttribute(jsObject: jsObject, name: Strings.clear) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var clear: String -} - -public class HTMLBaseElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBaseElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var href: String - - @ReadWriteAttribute - public var target: String -} - -public class HTMLBodyElement: HTMLElement, WindowEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBodyElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _link = ReadWriteAttribute(jsObject: jsObject, name: Strings.link) - _vLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.vLink) - _aLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.aLink) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _background = ReadWriteAttribute(jsObject: jsObject, name: Strings.background) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var link: String - - @ReadWriteAttribute - public var vLink: String - - @ReadWriteAttribute - public var aLink: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var background: String -} - -public class HTMLButtonElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLButtonElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) - _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) - _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) - _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) - _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var formAction: String - - @ReadWriteAttribute - public var formEnctype: String - - @ReadWriteAttribute - public var formMethod: String - - @ReadWriteAttribute - public var formNoValidate: Bool - - @ReadWriteAttribute - public var formTarget: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLCanvasElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLCanvasElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @inlinable public func getContext(contextId: String, options: JSValue? = nil) -> RenderingContext? { - let this = jsObject - return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func toDataURL(type: String? = nil, quality: JSValue? = nil) -> String { - let this = jsObject - return this[Strings.toDataURL].function!(this: this, arguments: [type?.jsValue ?? .undefined, quality?.jsValue ?? .undefined]).fromJSValue()! - } - - // XXX: member 'toBlob' is ignored - - @inlinable public func transferControlToOffscreen() -> OffscreenCanvas { - let this = jsObject - return this[Strings.transferControlToOffscreen].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class HTMLCollection: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLCollection].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Element? { - jsObject[key].fromJSValue() - } -} - -public class HTMLDListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLDataElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: String -} - -public class HTMLDataListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var options: HTMLCollection -} - -public class HTMLDetailsElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDetailsElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var open: Bool -} - -public class HTMLDialogElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDialogElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) - _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var open: Bool - - @ReadWriteAttribute - public var returnValue: String - - @inlinable public func show() { - let this = jsObject - _ = this[Strings.show].function!(this: this, arguments: []) - } - - @inlinable public func showModal() { - let this = jsObject - _ = this[Strings.showModal].function!(this: this, arguments: []) - } - - @inlinable public func close(returnValue: String? = nil) { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: [returnValue?.jsValue ?? .undefined]) - } -} - -public class HTMLDirectoryElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDirectoryElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLDivElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDivElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) - _lang = ReadWriteAttribute(jsObject: jsObject, name: Strings.lang) - _translate = ReadWriteAttribute(jsObject: jsObject, name: Strings.translate) - _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) - _hidden = ReadWriteAttribute(jsObject: jsObject, name: Strings.hidden) - _inert = ReadWriteAttribute(jsObject: jsObject, name: Strings.inert) - _accessKey = ReadWriteAttribute(jsObject: jsObject, name: Strings.accessKey) - _accessKeyLabel = ReadonlyAttribute(jsObject: jsObject, name: Strings.accessKeyLabel) - _draggable = ReadWriteAttribute(jsObject: jsObject, name: Strings.draggable) - _spellcheck = ReadWriteAttribute(jsObject: jsObject, name: Strings.spellcheck) - _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) - _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) - _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var title: String - - @ReadWriteAttribute - public var lang: String - - @ReadWriteAttribute - public var translate: Bool - - @ReadWriteAttribute - public var dir: String - - @ReadWriteAttribute - public var hidden: Bool - - @ReadWriteAttribute - public var inert: Bool - - @inlinable public func click() { - let this = jsObject - _ = this[Strings.click].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var accessKey: String - - @ReadonlyAttribute - public var accessKeyLabel: String - - @ReadWriteAttribute - public var draggable: Bool - - @ReadWriteAttribute - public var spellcheck: Bool - - @ReadWriteAttribute - public var autocapitalize: String - - @ReadWriteAttribute - public var innerText: String - - @ReadWriteAttribute - public var outerText: String - - @inlinable public func attachInternals() -> ElementInternals { - let this = jsObject - return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class HTMLEmbedElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLEmbedElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var name: String -} - -public class HTMLFieldSetElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFieldSetElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var elements: HTMLCollection - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } -} - -public class HTMLFontElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFontElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) - _face = ReadWriteAttribute(jsObject: jsObject, name: Strings.face) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var color: String - - @ReadWriteAttribute - public var face: String - - @ReadWriteAttribute - public var size: String -} - -public class HTMLFormControlsCollection: HTMLCollection { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormControlsCollection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public subscript(key: String) -> JSValue? { - jsObject[key].fromJSValue() - } -} - -public class HTMLFormElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _acceptCharset = ReadWriteAttribute(jsObject: jsObject, name: Strings.acceptCharset) - _action = ReadWriteAttribute(jsObject: jsObject, name: Strings.action) - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _enctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.enctype) - _encoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.encoding) - _method = ReadWriteAttribute(jsObject: jsObject, name: Strings.method) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _noValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.noValidate) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var acceptCharset: String - - @ReadWriteAttribute - public var action: String - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var enctype: String - - @ReadWriteAttribute - public var encoding: String - - @ReadWriteAttribute - public var method: String - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var noValidate: Bool - - @ReadWriteAttribute - public var target: String - - @ReadWriteAttribute - public var rel: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadonlyAttribute - public var elements: HTMLFormControlsCollection - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Element { - jsObject[key].fromJSValue()! - } - - @inlinable public subscript(key: String) -> JSValue { - jsObject[key].fromJSValue()! - } - - @inlinable public func submit() { - let this = jsObject - _ = this[Strings.submit].function!(this: this, arguments: []) - } - - @inlinable public func requestSubmit(submitter: HTMLElement? = nil) { - let this = jsObject - _ = this[Strings.requestSubmit].function!(this: this, arguments: [submitter?.jsValue ?? .undefined]) - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class HTMLFrameElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) - _noResize = ReadWriteAttribute(jsObject: jsObject, name: Strings.noResize) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) - _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) - _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var scrolling: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var frameBorder: String - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var noResize: Bool - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @ReadWriteAttribute - public var marginHeight: String - - @ReadWriteAttribute - public var marginWidth: String -} - -public class HTMLFrameSetElement: HTMLElement, WindowEventHandlers { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameSetElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) - _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cols: String - - @ReadWriteAttribute - public var rows: String -} - -public class HTMLHRElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHRElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) - _noShade = ReadWriteAttribute(jsObject: jsObject, name: Strings.noShade) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var color: String - - @ReadWriteAttribute - public var noShade: Bool - - @ReadWriteAttribute - public var size: String - - @ReadWriteAttribute - public var width: String -} - -public class HTMLHeadElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLHeadingElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadingElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLHtmlElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHtmlElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _version = ReadWriteAttribute(jsObject: jsObject, name: Strings.version) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var version: String -} - -public protocol HTMLHyperlinkElementUtils: JSBridgedClass {} -public extension HTMLHyperlinkElementUtils { - @inlinable var href: String { - get { ReadWriteAttribute[Strings.href, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.href, in: jsObject] = newValue } - } - - @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } - - @inlinable var `protocol`: String { - get { ReadWriteAttribute[Strings.protocol, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.protocol, in: jsObject] = newValue } - } - - @inlinable var username: String { - get { ReadWriteAttribute[Strings.username, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.username, in: jsObject] = newValue } - } - - @inlinable var password: String { - get { ReadWriteAttribute[Strings.password, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.password, in: jsObject] = newValue } - } - - @inlinable var host: String { - get { ReadWriteAttribute[Strings.host, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.host, in: jsObject] = newValue } - } - - @inlinable var hostname: String { - get { ReadWriteAttribute[Strings.hostname, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.hostname, in: jsObject] = newValue } - } - - @inlinable var port: String { - get { ReadWriteAttribute[Strings.port, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.port, in: jsObject] = newValue } - } - - @inlinable var pathname: String { - get { ReadWriteAttribute[Strings.pathname, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.pathname, in: jsObject] = newValue } - } - - @inlinable var search: String { - get { ReadWriteAttribute[Strings.search, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.search, in: jsObject] = newValue } - } - - @inlinable var hash: String { - get { ReadWriteAttribute[Strings.hash, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.hash, in: jsObject] = newValue } - } -} - -public class HTMLIFrameElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLIFrameElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _srcdoc = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcdoc) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _sandbox = ReadonlyAttribute(jsObject: jsObject, name: Strings.sandbox) - _allow = ReadWriteAttribute(jsObject: jsObject, name: Strings.allow) - _allowFullscreen = ReadWriteAttribute(jsObject: jsObject, name: Strings.allowFullscreen) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) - _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) - _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) - _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srcdoc: String - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var sandbox: DOMTokenList - - @ReadWriteAttribute - public var allow: String - - @ReadWriteAttribute - public var allowFullscreen: Bool - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var loading: String - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var scrolling: String - - @ReadWriteAttribute - public var frameBorder: String - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var marginHeight: String - - @ReadWriteAttribute - public var marginWidth: String -} - -public class HTMLImageElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLImageElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) - _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) - _isMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.isMap) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _naturalWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalWidth) - _naturalHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalHeight) - _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) - _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _decoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.decoding) - _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _lowsrc = ReadWriteAttribute(jsObject: jsObject, name: Strings.lowsrc) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) - _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) - _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srcset: String - - @ReadWriteAttribute - public var sizes: String - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var useMap: String - - @ReadWriteAttribute - public var isMap: Bool - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var naturalWidth: UInt32 - - @ReadonlyAttribute - public var naturalHeight: UInt32 - - @ReadonlyAttribute - public var complete: Bool - - @ReadonlyAttribute - public var currentSrc: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadWriteAttribute - public var decoding: String - - @ReadWriteAttribute - public var loading: String - - @inlinable public func decode() -> JSPromise { - let this = jsObject - return this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func decode() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var lowsrc: String - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var longDesc: String - - @ReadWriteAttribute - public var border: String -} - -public class HTMLInputElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLInputElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _accept = ReadWriteAttribute(jsObject: jsObject, name: Strings.accept) - _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _defaultChecked = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultChecked) - _checked = ReadWriteAttribute(jsObject: jsObject, name: Strings.checked) - _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _files = ReadWriteAttribute(jsObject: jsObject, name: Strings.files) - _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) - _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) - _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) - _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) - _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _indeterminate = ReadWriteAttribute(jsObject: jsObject, name: Strings.indeterminate) - _list = ReadonlyAttribute(jsObject: jsObject, name: Strings.list) - _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) - _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) - _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) - _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) - _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _pattern = ReadWriteAttribute(jsObject: jsObject, name: Strings.pattern) - _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) - _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) - _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _step = ReadWriteAttribute(jsObject: jsObject, name: Strings.step) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _valueAsDate = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsDate) - _valueAsNumber = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsNumber) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) - _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) - _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var accept: String - - @ReadWriteAttribute - public var alt: String - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var defaultChecked: Bool - - @ReadWriteAttribute - public var checked: Bool - - @ReadWriteAttribute - public var dirName: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var files: FileList? - - @ReadWriteAttribute - public var formAction: String - - @ReadWriteAttribute - public var formEnctype: String - - @ReadWriteAttribute - public var formMethod: String - - @ReadWriteAttribute - public var formNoValidate: Bool - - @ReadWriteAttribute - public var formTarget: String - - @ReadWriteAttribute - public var height: UInt32 - - @ReadWriteAttribute - public var indeterminate: Bool - - @ReadonlyAttribute - public var list: HTMLElement? - - @ReadWriteAttribute - public var max: String - - @ReadWriteAttribute - public var maxLength: Int32 - - @ReadWriteAttribute - public var min: String - - @ReadWriteAttribute - public var minLength: Int32 - - @ReadWriteAttribute - public var multiple: Bool - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var pattern: String - - @ReadWriteAttribute - public var placeholder: String - - @ReadWriteAttribute - public var readOnly: Bool - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var size: UInt32 - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var step: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var valueAsDate: JSObject? - - @ReadWriteAttribute - public var valueAsNumber: Double - - @ReadWriteAttribute - public var width: UInt32 - - @inlinable public func stepUp(n: Int32? = nil) { - let this = jsObject - _ = this[Strings.stepUp].function!(this: this, arguments: [n?.jsValue ?? .undefined]) - } - - @inlinable public func stepDown(n: Int32? = nil) { - let this = jsObject - _ = this[Strings.stepDown].function!(this: this, arguments: [n?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList? - - @inlinable public func select() { - let this = jsObject - _ = this[Strings.select].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var selectionStart: UInt32? - - @ReadWriteAttribute - public var selectionEnd: UInt32? - - @ReadWriteAttribute - public var selectionDirection: String? - - @inlinable public func setRangeText(replacement: String) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) - } - - @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) - } - - @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { - let this = jsObject - _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) - } - - @inlinable public func showPicker() { - let this = jsObject - _ = this[Strings.showPicker].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var useMap: String -} - -public class HTMLLIElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLIElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Int32 - - @ReadWriteAttribute - public var type: String -} - -public class HTMLLabelElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLabelElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) - _control = ReadonlyAttribute(jsObject: jsObject, name: Strings.control) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var htmlFor: String - - @ReadonlyAttribute - public var control: HTMLElement? -} - -public class HTMLLegendElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLegendElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var align: String -} - -public class HTMLLinkElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLinkElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) - _as = ReadWriteAttribute(jsObject: jsObject, name: Strings.as) - _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) - _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _sizes = ReadonlyAttribute(jsObject: jsObject, name: Strings.sizes) - _imageSrcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSrcset) - _imageSizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSizes) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) - _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var href: String - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var rel: String - - @ReadWriteAttribute - public var `as`: String - - @ReadonlyAttribute - public var relList: DOMTokenList - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var hreflang: String - - @ReadWriteAttribute - public var type: String - - @ReadonlyAttribute - public var sizes: DOMTokenList - - @ReadWriteAttribute - public var imageSrcset: String - - @ReadWriteAttribute - public var imageSizes: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @ReadWriteAttribute - public var disabled: Bool - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var rev: String - - @ReadWriteAttribute - public var target: String -} - -public class HTMLMapElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMapElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _areas = ReadonlyAttribute(jsObject: jsObject, name: Strings.areas) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var areas: HTMLCollection -} - -public class HTMLMarqueeElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMarqueeElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _behavior = ReadWriteAttribute(jsObject: jsObject, name: Strings.behavior) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _direction = ReadWriteAttribute(jsObject: jsObject, name: Strings.direction) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) - _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) - _scrollAmount = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollAmount) - _scrollDelay = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollDelay) - _trueSpeed = ReadWriteAttribute(jsObject: jsObject, name: Strings.trueSpeed) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var behavior: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var direction: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var loop: Int32 - - @ReadWriteAttribute - public var scrollAmount: UInt32 - - @ReadWriteAttribute - public var scrollDelay: UInt32 - - @ReadWriteAttribute - public var trueSpeed: Bool - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var width: String - - @inlinable public func start() { - let this = jsObject - _ = this[Strings.start].function!(this: this, arguments: []) - } - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } -} - -public class HTMLMediaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMediaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _networkState = ReadonlyAttribute(jsObject: jsObject, name: Strings.networkState) - _preload = ReadWriteAttribute(jsObject: jsObject, name: Strings.preload) - _buffered = ReadonlyAttribute(jsObject: jsObject, name: Strings.buffered) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _seeking = ReadonlyAttribute(jsObject: jsObject, name: Strings.seeking) - _currentTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentTime) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _paused = ReadonlyAttribute(jsObject: jsObject, name: Strings.paused) - _defaultPlaybackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultPlaybackRate) - _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) - _preservesPitch = ReadWriteAttribute(jsObject: jsObject, name: Strings.preservesPitch) - _played = ReadonlyAttribute(jsObject: jsObject, name: Strings.played) - _seekable = ReadonlyAttribute(jsObject: jsObject, name: Strings.seekable) - _ended = ReadonlyAttribute(jsObject: jsObject, name: Strings.ended) - _autoplay = ReadWriteAttribute(jsObject: jsObject, name: Strings.autoplay) - _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) - _controls = ReadWriteAttribute(jsObject: jsObject, name: Strings.controls) - _volume = ReadWriteAttribute(jsObject: jsObject, name: Strings.volume) - _muted = ReadWriteAttribute(jsObject: jsObject, name: Strings.muted) - _defaultMuted = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultMuted) - _audioTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioTracks) - _videoTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoTracks) - _textTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.textTracks) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var error: MediaError? - - @ReadWriteAttribute - public var src: String - - // XXX: member 'srcObject' is ignored - - @ReadonlyAttribute - public var currentSrc: String - - @ReadWriteAttribute - public var crossOrigin: String? - - public static let NETWORK_EMPTY: UInt16 = 0 - - public static let NETWORK_IDLE: UInt16 = 1 - - public static let NETWORK_LOADING: UInt16 = 2 - - public static let NETWORK_NO_SOURCE: UInt16 = 3 - - @ReadonlyAttribute - public var networkState: UInt16 - - @ReadWriteAttribute - public var preload: String - - @ReadonlyAttribute - public var buffered: TimeRanges - - @inlinable public func load() { - let this = jsObject - _ = this[Strings.load].function!(this: this, arguments: []) - } - - @inlinable public func canPlayType(type: String) -> CanPlayTypeResult { - let this = jsObject - return this[Strings.canPlayType].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - public static let HAVE_NOTHING: UInt16 = 0 - - public static let HAVE_METADATA: UInt16 = 1 - - public static let HAVE_CURRENT_DATA: UInt16 = 2 - - public static let HAVE_FUTURE_DATA: UInt16 = 3 - - public static let HAVE_ENOUGH_DATA: UInt16 = 4 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var seeking: Bool - - @ReadWriteAttribute - public var currentTime: Double - - @inlinable public func fastSeek(time: Double) { - let this = jsObject - _ = this[Strings.fastSeek].function!(this: this, arguments: [time.jsValue]) - } - - @ReadonlyAttribute - public var duration: Double - - @inlinable public func getStartDate() -> JSObject { - let this = jsObject - return this[Strings.getStartDate].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var paused: Bool - - @ReadWriteAttribute - public var defaultPlaybackRate: Double - - @ReadWriteAttribute - public var playbackRate: Double - - @ReadWriteAttribute - public var preservesPitch: Bool - - @ReadonlyAttribute - public var played: TimeRanges - - @ReadonlyAttribute - public var seekable: TimeRanges - - @ReadonlyAttribute - public var ended: Bool - - @ReadWriteAttribute - public var autoplay: Bool - - @ReadWriteAttribute - public var loop: Bool - - @inlinable public func play() -> JSPromise { - let this = jsObject - return this[Strings.play].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func play() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.play].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func pause() { - let this = jsObject - _ = this[Strings.pause].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var controls: Bool - - @ReadWriteAttribute - public var volume: Double - - @ReadWriteAttribute - public var muted: Bool - - @ReadWriteAttribute - public var defaultMuted: Bool - - @ReadonlyAttribute - public var audioTracks: AudioTrackList - - @ReadonlyAttribute - public var videoTracks: VideoTrackList - - @ReadonlyAttribute - public var textTracks: TextTrackList - - @inlinable public func addTextTrack(kind: TextTrackKind, label: String? = nil, language: String? = nil) -> TextTrack { - let this = jsObject - return this[Strings.addTextTrack].function!(this: this, arguments: [kind.jsValue, label?.jsValue ?? .undefined, language?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class HTMLMenuElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMenuElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLMetaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMetaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _httpEquiv = ReadWriteAttribute(jsObject: jsObject, name: Strings.httpEquiv) - _content = ReadWriteAttribute(jsObject: jsObject, name: Strings.content) - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _scheme = ReadWriteAttribute(jsObject: jsObject, name: Strings.scheme) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var httpEquiv: String - - @ReadWriteAttribute - public var content: String - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var scheme: String -} - -public class HTMLMeterElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMeterElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) - _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) - _low = ReadWriteAttribute(jsObject: jsObject, name: Strings.low) - _high = ReadWriteAttribute(jsObject: jsObject, name: Strings.high) - _optimum = ReadWriteAttribute(jsObject: jsObject, name: Strings.optimum) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Double - - @ReadWriteAttribute - public var min: Double - - @ReadWriteAttribute - public var max: Double - - @ReadWriteAttribute - public var low: Double - - @ReadWriteAttribute - public var high: Double - - @ReadWriteAttribute - public var optimum: Double - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLModElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLModElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) - _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cite: String - - @ReadWriteAttribute - public var dateTime: String -} - -public class HTMLOListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _reversed = ReadWriteAttribute(jsObject: jsObject, name: Strings.reversed) - _start = ReadWriteAttribute(jsObject: jsObject, name: Strings.start) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var reversed: Bool - - @ReadWriteAttribute - public var start: Int32 - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var compact: Bool -} - -public class HTMLObjectElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLObjectElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) - _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _archive = ReadWriteAttribute(jsObject: jsObject, name: Strings.archive) - _code = ReadWriteAttribute(jsObject: jsObject, name: Strings.code) - _declare = ReadWriteAttribute(jsObject: jsObject, name: Strings.declare) - _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) - _standby = ReadWriteAttribute(jsObject: jsObject, name: Strings.standby) - _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) - _codeBase = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeBase) - _codeType = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeType) - _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) - _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var data: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var height: String - - @ReadonlyAttribute - public var contentDocument: Document? - - @ReadonlyAttribute - public var contentWindow: WindowProxy? - - @inlinable public func getSVGDocument() -> Document? { - let this = jsObject - return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var archive: String - - @ReadWriteAttribute - public var code: String - - @ReadWriteAttribute - public var declare: Bool - - @ReadWriteAttribute - public var hspace: UInt32 - - @ReadWriteAttribute - public var standby: String - - @ReadWriteAttribute - public var vspace: UInt32 - - @ReadWriteAttribute - public var codeBase: String - - @ReadWriteAttribute - public var codeType: String - - @ReadWriteAttribute - public var useMap: String - - @ReadWriteAttribute - public var border: String -} - -public class HTMLOptGroupElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptGroupElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadWriteAttribute - public var label: String -} - -public class HTMLOptionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) - _defaultSelected = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultSelected) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _index = ReadonlyAttribute(jsObject: jsObject, name: Strings.index) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var label: String - - @ReadWriteAttribute - public var defaultSelected: Bool - - @ReadWriteAttribute - public var selected: Bool - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var text: String - - @ReadonlyAttribute - public var index: Int32 -} - -public class HTMLOptionsCollection: HTMLCollection { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionsCollection].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) - super.init(unsafelyWrapping: jsObject) - } - - @usableFromInline let _length: ReadWriteAttribute - @inlinable override public var length: UInt32 { - get { _length.wrappedValue } - set { _length.wrappedValue = newValue } - } - - // XXX: unsupported setter for keys of type UInt32 - - @inlinable public func add(element: JSValue, before: JSValue? = nil) { - let this = jsObject - _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) - } - - @inlinable public func remove(index: Int32) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var selectedIndex: Int32 -} - -public protocol HTMLOrSVGElement: JSBridgedClass {} -public extension HTMLOrSVGElement { - @inlinable var dataset: DOMStringMap { ReadonlyAttribute[Strings.dataset, in: jsObject] } - - @inlinable var nonce: String { - get { ReadWriteAttribute[Strings.nonce, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.nonce, in: jsObject] = newValue } - } - - @inlinable var autofocus: Bool { - get { ReadWriteAttribute[Strings.autofocus, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.autofocus, in: jsObject] = newValue } - } - - @inlinable var tabIndex: Int32 { - get { ReadWriteAttribute[Strings.tabIndex, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.tabIndex, in: jsObject] = newValue } - } - - @inlinable func focus(options: FocusOptions? = nil) { - let this = jsObject - _ = this[Strings.focus].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable func blur() { - let this = jsObject - _ = this[Strings.blur].function!(this: this, arguments: []) - } -} - -public class HTMLOutputElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOutputElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _htmlFor = ReadonlyAttribute(jsObject: jsObject, name: Strings.htmlFor) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var htmlFor: DOMTokenList - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLParagraphElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParagraphElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLParamElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParamElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _valueType = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueType) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var value: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var valueType: String -} - -public class HTMLPictureElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPictureElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLPreElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPreElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: Int32 -} - -public class HTMLProgressElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLProgressElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) - _position = ReadonlyAttribute(jsObject: jsObject, name: Strings.position) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var value: Double - - @ReadWriteAttribute - public var max: Double - - @ReadonlyAttribute - public var position: Double - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLQuoteElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLQuoteElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var cite: String -} - -public class HTMLScriptElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLScriptElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _noModule = ReadWriteAttribute(jsObject: jsObject, name: Strings.noModule) - _async = ReadWriteAttribute(jsObject: jsObject, name: Strings.async) - _defer = ReadWriteAttribute(jsObject: jsObject, name: Strings.defer) - _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) - _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) - _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) - _event = ReadWriteAttribute(jsObject: jsObject, name: Strings.event) - _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var noModule: Bool - - @ReadWriteAttribute - public var async: Bool - - @ReadWriteAttribute - public var `defer`: Bool - - @ReadWriteAttribute - public var crossOrigin: String? - - @ReadWriteAttribute - public var text: String - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var referrerPolicy: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @inlinable public static func supports(type: String) -> Bool { - let this = constructor - return this[Strings.supports].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @ReadWriteAttribute - public var charset: String - - @ReadWriteAttribute - public var event: String - - @ReadWriteAttribute - public var htmlFor: String -} - -public class HTMLSelectElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSelectElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) - _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) - _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) - _selectedOptions = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedOptions) - _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var multiple: Bool - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var size: UInt32 - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var options: HTMLOptionsCollection - - @ReadWriteAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> HTMLOptionElement? { - jsObject[key].fromJSValue() - } - - @inlinable public func namedItem(name: String) -> HTMLOptionElement? { - let this = jsObject - return this[Strings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func add(element: JSValue, before: JSValue? = nil) { - let this = jsObject - _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) - } - - @inlinable public func remove() { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: []) - } - - @inlinable public func remove(index: Int32) { - let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) - } - - // XXX: unsupported setter for keys of type UInt32 - - @ReadonlyAttribute - public var selectedOptions: HTMLCollection - - @ReadWriteAttribute - public var selectedIndex: Int32 - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList -} - -public class HTMLSlotElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSlotElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var name: String - - @inlinable public func assignedNodes(options: AssignedNodesOptions? = nil) -> [Node] { - let this = jsObject - return this[Strings.assignedNodes].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func assignedElements(options: AssignedNodesOptions? = nil) -> [Element] { - let this = jsObject - return this[Strings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func assign(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) - } -} - -public class HTMLSourceElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSourceElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) - _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var srcset: String - - @ReadWriteAttribute - public var sizes: String - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 -} - -public class HTMLSpanElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSpanElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public class HTMLStyleElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLStyleElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) - _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var media: String - - @ReadonlyAttribute - public var blocking: DOMTokenList - - @ReadWriteAttribute - public var type: String -} - -public class HTMLTableCaptionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCaptionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var align: String -} - -public class HTMLTableCellElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCellElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _colSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.colSpan) - _rowSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.rowSpan) - _headers = ReadWriteAttribute(jsObject: jsObject, name: Strings.headers) - _cellIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.cellIndex) - _scope = ReadWriteAttribute(jsObject: jsObject, name: Strings.scope) - _abbr = ReadWriteAttribute(jsObject: jsObject, name: Strings.abbr) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _axis = ReadWriteAttribute(jsObject: jsObject, name: Strings.axis) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _noWrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.noWrap) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var colSpan: UInt32 - - @ReadWriteAttribute - public var rowSpan: UInt32 - - @ReadWriteAttribute - public var headers: String - - @ReadonlyAttribute - public var cellIndex: Int32 - - @ReadWriteAttribute - public var scope: String - - @ReadWriteAttribute - public var abbr: String - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var axis: String - - @ReadWriteAttribute - public var height: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var noWrap: Bool - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var bgColor: String -} - -public class HTMLTableColElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableColElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _span = ReadWriteAttribute(jsObject: jsObject, name: Strings.span) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var span: UInt32 - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var width: String -} - -public class HTMLTableElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _caption = ReadWriteAttribute(jsObject: jsObject, name: Strings.caption) - _tHead = ReadWriteAttribute(jsObject: jsObject, name: Strings.tHead) - _tFoot = ReadWriteAttribute(jsObject: jsObject, name: Strings.tFoot) - _tBodies = ReadonlyAttribute(jsObject: jsObject, name: Strings.tBodies) - _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - _frame = ReadWriteAttribute(jsObject: jsObject, name: Strings.frame) - _rules = ReadWriteAttribute(jsObject: jsObject, name: Strings.rules) - _summary = ReadWriteAttribute(jsObject: jsObject, name: Strings.summary) - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - _cellPadding = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellPadding) - _cellSpacing = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellSpacing) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var caption: HTMLTableCaptionElement? - - @inlinable public func createCaption() -> HTMLTableCaptionElement { - let this = jsObject - return this[Strings.createCaption].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteCaption() { - let this = jsObject - _ = this[Strings.deleteCaption].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var tHead: HTMLTableSectionElement? - - @inlinable public func createTHead() -> HTMLTableSectionElement { - let this = jsObject - return this[Strings.createTHead].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteTHead() { - let this = jsObject - _ = this[Strings.deleteTHead].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var tFoot: HTMLTableSectionElement? - - @inlinable public func createTFoot() -> HTMLTableSectionElement { - let this = jsObject - return this[Strings.createTFoot].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func deleteTFoot() { - let this = jsObject - _ = this[Strings.deleteTFoot].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var tBodies: HTMLCollection - - @inlinable public func createTBody() -> HTMLTableSectionElement { - let this = jsObject - return this[Strings.createTBody].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var rows: HTMLCollection - - @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { - let this = jsObject - return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteRow(index: Int32) { - let this = jsObject - _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var border: String - - @ReadWriteAttribute - public var frame: String - - @ReadWriteAttribute - public var rules: String - - @ReadWriteAttribute - public var summary: String - - @ReadWriteAttribute - public var width: String - - @ReadWriteAttribute - public var bgColor: String - - @ReadWriteAttribute - public var cellPadding: String - - @ReadWriteAttribute - public var cellSpacing: String -} - -public class HTMLTableRowElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableRowElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _rowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.rowIndex) - _sectionRowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.sectionRowIndex) - _cells = ReadonlyAttribute(jsObject: jsObject, name: Strings.cells) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var rowIndex: Int32 - - @ReadonlyAttribute - public var sectionRowIndex: Int32 - - @ReadonlyAttribute - public var cells: HTMLCollection - - @inlinable public func insertCell(index: Int32? = nil) -> HTMLTableCellElement { - let this = jsObject - return this[Strings.insertCell].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteCell(index: Int32) { - let this = jsObject - _ = this[Strings.deleteCell].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String - - @ReadWriteAttribute - public var bgColor: String -} - -public class HTMLTableSectionElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableSectionElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) - _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) - _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) - _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) - _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var rows: HTMLCollection - - @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { - let this = jsObject - return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func deleteRow(index: Int32) { - let this = jsObject - _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) - } - - @ReadWriteAttribute - public var align: String - - @ReadWriteAttribute - public var ch: String - - @ReadWriteAttribute - public var chOff: String - - @ReadWriteAttribute - public var vAlign: String -} - -public class HTMLTemplateElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTemplateElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _content = ReadonlyAttribute(jsObject: jsObject, name: Strings.content) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var content: DocumentFragment -} - -public class HTMLTextAreaElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTextAreaElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) - _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) - _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) - _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) - _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) - _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) - _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) - _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) - _wrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.wrap) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - _textLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.textLength) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) - _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) - _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) - _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var autocomplete: String - - @ReadWriteAttribute - public var cols: UInt32 - - @ReadWriteAttribute - public var dirName: String - - @ReadWriteAttribute - public var disabled: Bool - - @ReadonlyAttribute - public var form: HTMLFormElement? - - @ReadWriteAttribute - public var maxLength: Int32 - - @ReadWriteAttribute - public var minLength: Int32 - - @ReadWriteAttribute - public var name: String - - @ReadWriteAttribute - public var placeholder: String - - @ReadWriteAttribute - public var readOnly: Bool - - @ReadWriteAttribute - public var required: Bool - - @ReadWriteAttribute - public var rows: UInt32 - - @ReadWriteAttribute - public var wrap: String - - @ReadonlyAttribute - public var type: String - - @ReadWriteAttribute - public var defaultValue: String - - @ReadWriteAttribute - public var value: String - - @ReadonlyAttribute - public var textLength: UInt32 - - @ReadonlyAttribute - public var willValidate: Bool - - @ReadonlyAttribute - public var validity: ValidityState - - @ReadonlyAttribute - public var validationMessage: String - - @inlinable public func checkValidity() -> Bool { - let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setCustomValidity(error: String) { - let this = jsObject - _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) - } - - @ReadonlyAttribute - public var labels: NodeList - - @inlinable public func select() { - let this = jsObject - _ = this[Strings.select].function!(this: this, arguments: []) - } - - @ReadWriteAttribute - public var selectionStart: UInt32 - - @ReadWriteAttribute - public var selectionEnd: UInt32 - - @ReadWriteAttribute - public var selectionDirection: String - - @inlinable public func setRangeText(replacement: String) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) - } - - @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { - let this = jsObject - _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) - } - - @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { - let this = jsObject - _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) - } -} - -public class HTMLTimeElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTimeElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var dateTime: String -} - -public class HTMLTitleElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTitleElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var text: String -} - -public class HTMLTrackElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTrackElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadWriteAttribute(jsObject: jsObject, name: Strings.kind) - _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) - _srclang = ReadWriteAttribute(jsObject: jsObject, name: Strings.srclang) - _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) - _default = ReadWriteAttribute(jsObject: jsObject, name: Strings.default) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var kind: String - - @ReadWriteAttribute - public var src: String - - @ReadWriteAttribute - public var srclang: String - - @ReadWriteAttribute - public var label: String - - @ReadWriteAttribute - public var `default`: Bool - - public static let NONE: UInt16 = 0 - - public static let LOADING: UInt16 = 1 - - public static let LOADED: UInt16 = 2 - - public static let ERROR: UInt16 = 3 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var track: TextTrack -} - -public class HTMLUListElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUListElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) - _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var compact: Bool - - @ReadWriteAttribute - public var type: String -} - -public class HTMLUnknownElement: HTMLElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUnknownElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class HTMLVideoElement: HTMLMediaElement { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLVideoElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _videoWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoWidth) - _videoHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoHeight) - _poster = ReadWriteAttribute(jsObject: jsObject, name: Strings.poster) - _playsInline = ReadWriteAttribute(jsObject: jsObject, name: Strings.playsInline) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var videoWidth: UInt32 - - @ReadonlyAttribute - public var videoHeight: UInt32 - - @ReadWriteAttribute - public var poster: String - - @ReadWriteAttribute - public var playsInline: Bool -} - -public class HashChangeEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HashChangeEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _oldURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldURL) - _newURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.newURL) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: HashChangeEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var oldURL: String - - @ReadonlyAttribute - public var newURL: String -} - -public class HashChangeEventInit: BridgedDictionary { - public convenience init(oldURL: String, newURL: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.oldURL] = oldURL.jsValue - object[Strings.newURL] = newURL.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _oldURL = ReadWriteAttribute(jsObject: object, name: Strings.oldURL) - _newURL = ReadWriteAttribute(jsObject: object, name: Strings.newURL) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var oldURL: String - - @ReadWriteAttribute - public var newURL: String -} - -public class Headers: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Headers].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(init: HeadersInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public class History: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.History].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _scrollRestoration = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollRestoration) - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @ReadWriteAttribute - public var scrollRestoration: ScrollRestoration - - @ReadonlyAttribute - public var state: JSValue - - @inlinable public func go(delta: Int32? = nil) { - let this = jsObject - _ = this[Strings.go].function!(this: this, arguments: [delta?.jsValue ?? .undefined]) - } - - @inlinable public func back() { - let this = jsObject - _ = this[Strings.back].function!(this: this, arguments: []) - } - - @inlinable public func forward() { - let this = jsObject - _ = this[Strings.forward].function!(this: this, arguments: []) - } - - @inlinable public func pushState(data: JSValue, unused: String, url: String? = nil) { - let this = jsObject - _ = this[Strings.pushState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) - } - - @inlinable public func replaceState(data: JSValue, unused: String, url: String? = nil) { - let this = jsObject - _ = this[Strings.replaceState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) - } -} - -public class ImageBitmap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var width: UInt32 - - @ReadonlyAttribute - public var height: UInt32 - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} - -public class ImageBitmapOptions: BridgedDictionary { - public convenience init(imageOrientation: ImageOrientation, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, resizeWidth: UInt32, resizeHeight: UInt32, resizeQuality: ResizeQuality) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.imageOrientation] = imageOrientation.jsValue - object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue - object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue - object[Strings.resizeWidth] = resizeWidth.jsValue - object[Strings.resizeHeight] = resizeHeight.jsValue - object[Strings.resizeQuality] = resizeQuality.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _imageOrientation = ReadWriteAttribute(jsObject: object, name: Strings.imageOrientation) - _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) - _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) - _resizeWidth = ReadWriteAttribute(jsObject: object, name: Strings.resizeWidth) - _resizeHeight = ReadWriteAttribute(jsObject: object, name: Strings.resizeHeight) - _resizeQuality = ReadWriteAttribute(jsObject: object, name: Strings.resizeQuality) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var imageOrientation: ImageOrientation - - @ReadWriteAttribute - public var premultiplyAlpha: PremultiplyAlpha - - @ReadWriteAttribute - public var colorSpaceConversion: ColorSpaceConversion - - @ReadWriteAttribute - public var resizeWidth: UInt32 - - @ReadWriteAttribute - public var resizeHeight: UInt32 - - @ReadWriteAttribute - public var resizeQuality: ResizeQuality -} - -public class ImageBitmapRenderingContext: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmapRenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var canvas: JSValue - - @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { - let this = jsObject - _ = this[Strings.transferFromImageBitmap].function!(this: this, arguments: [bitmap.jsValue]) - } -} - -public class ImageBitmapRenderingContextSettings: BridgedDictionary { - public convenience init(alpha: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool -} - -public class ImageData: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) - self.jsObject = jsObject - } - - @inlinable public convenience init(sw: UInt32, sh: UInt32, settings: ImageDataSettings? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(data: Uint8ClampedArray, sw: UInt32, sh: UInt32? = nil, settings: ImageDataSettings? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, sw.jsValue, sh?.jsValue ?? .undefined, settings?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var width: UInt32 - - @ReadonlyAttribute - public var height: UInt32 - - @ReadonlyAttribute - public var data: Uint8ClampedArray - - @ReadonlyAttribute - public var colorSpace: PredefinedColorSpace -} - -public class ImageDataSettings: BridgedDictionary { - public convenience init(colorSpace: PredefinedColorSpace) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.colorSpace] = colorSpace.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace -} - -public class ImageEncodeOptions: BridgedDictionary { - public convenience init(type: String, quality: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.quality] = quality.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _quality = ReadWriteAttribute(jsObject: object, name: Strings.quality) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var quality: Double -} - -public enum ImageOrientation: JSString, JSValueCompatible { - case none = "none" - case flipY = "flipY" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ImageSmoothingQuality: JSString, JSValueCompatible { - case low = "low" - case medium = "medium" - case high = "high" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class InputEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) - _inputType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputType) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: InputEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: String? - - @ReadonlyAttribute - public var isComposing: Bool - - @ReadonlyAttribute - public var inputType: String -} - -public class InputEventInit: BridgedDictionary { - public convenience init(data: String?, isComposing: Bool, inputType: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.isComposing] = isComposing.jsValue - object[Strings.inputType] = inputType.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) - _inputType = ReadWriteAttribute(jsObject: object, name: Strings.inputType) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: String? - - @ReadWriteAttribute - public var isComposing: Bool - - @ReadWriteAttribute - public var inputType: String -} - -public class KeyboardEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) - _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) - _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) - _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) - _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) - _repeat = ReadonlyAttribute(jsObject: jsObject, name: Strings.repeat) - _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) - _charCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.charCode) - _keyCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.keyCode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: KeyboardEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - public static let DOM_KEY_LOCATION_STANDARD: UInt32 = 0x00 - - public static let DOM_KEY_LOCATION_LEFT: UInt32 = 0x01 - - public static let DOM_KEY_LOCATION_RIGHT: UInt32 = 0x02 - - public static let DOM_KEY_LOCATION_NUMPAD: UInt32 = 0x03 - - @ReadonlyAttribute - public var key: String - - @ReadonlyAttribute - public var code: String - - @ReadonlyAttribute - public var location: UInt32 - - @ReadonlyAttribute - public var ctrlKey: Bool - - @ReadonlyAttribute - public var shiftKey: Bool - - @ReadonlyAttribute - public var altKey: Bool - - @ReadonlyAttribute - public var metaKey: Bool - - @ReadonlyAttribute - public var `repeat`: Bool - - @ReadonlyAttribute - public var isComposing: Bool - - @inlinable public func getModifierState(keyArg: String) -> Bool { - let this = jsObject - return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! - } - - @inlinable public func initKeyboardEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, keyArg: String? = nil, locationArg: UInt32? = nil, ctrlKey: Bool? = nil, altKey: Bool? = nil, shiftKey: Bool? = nil, metaKey: Bool? = nil) { - let _arg0 = typeArg.jsValue - let _arg1 = bubblesArg?.jsValue ?? .undefined - let _arg2 = cancelableArg?.jsValue ?? .undefined - let _arg3 = viewArg?.jsValue ?? .undefined - let _arg4 = keyArg?.jsValue ?? .undefined - let _arg5 = locationArg?.jsValue ?? .undefined - let _arg6 = ctrlKey?.jsValue ?? .undefined - let _arg7 = altKey?.jsValue ?? .undefined - let _arg8 = shiftKey?.jsValue ?? .undefined - let _arg9 = metaKey?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initKeyboardEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @ReadonlyAttribute - public var charCode: UInt32 - - @ReadonlyAttribute - public var keyCode: UInt32 -} - -public class KeyboardEventInit: BridgedDictionary { - public convenience init(key: String, code: String, location: UInt32, repeat: Bool, isComposing: Bool, charCode: UInt32, keyCode: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.key] = key.jsValue - object[Strings.code] = code.jsValue - object[Strings.location] = location.jsValue - object[Strings.repeat] = `repeat`.jsValue - object[Strings.isComposing] = isComposing.jsValue - object[Strings.charCode] = charCode.jsValue - object[Strings.keyCode] = keyCode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _key = ReadWriteAttribute(jsObject: object, name: Strings.key) - _code = ReadWriteAttribute(jsObject: object, name: Strings.code) - _location = ReadWriteAttribute(jsObject: object, name: Strings.location) - _repeat = ReadWriteAttribute(jsObject: object, name: Strings.repeat) - _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) - _charCode = ReadWriteAttribute(jsObject: object, name: Strings.charCode) - _keyCode = ReadWriteAttribute(jsObject: object, name: Strings.keyCode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var key: String - - @ReadWriteAttribute - public var code: String - - @ReadWriteAttribute - public var location: UInt32 - - @ReadWriteAttribute - public var `repeat`: Bool - - @ReadWriteAttribute - public var isComposing: Bool - - @ReadWriteAttribute - public var charCode: UInt32 - - @ReadWriteAttribute - public var keyCode: UInt32 -} - -public class KeyframeAnimationOptions: BridgedDictionary { - public convenience init(id: String, timeline: AnimationTimeline?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.id] = id.jsValue - object[Strings.timeline] = timeline.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _id = ReadWriteAttribute(jsObject: object, name: Strings.id) - _timeline = ReadWriteAttribute(jsObject: object, name: Strings.timeline) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var timeline: AnimationTimeline? -} - -public class KeyframeEffect: AnimationEffect { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyframeEffect].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) - _pseudoElement = ReadWriteAttribute(jsObject: jsObject, name: Strings.pseudoElement) - _composite = ReadWriteAttribute(jsObject: jsObject, name: Strings.composite) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(target: Element?, keyframes: JSObject?, options: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [target.jsValue, keyframes.jsValue, options?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(source: KeyframeEffect) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [source.jsValue])) - } - - @ReadWriteAttribute - public var target: Element? - - @ReadWriteAttribute - public var pseudoElement: String? - - @ReadWriteAttribute - public var composite: CompositeOperation - - @inlinable public func getKeyframes() -> [JSObject] { - let this = jsObject - return this[Strings.getKeyframes].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func setKeyframes(keyframes: JSObject?) { - let this = jsObject - _ = this[Strings.setKeyframes].function!(this: this, arguments: [keyframes.jsValue]) - } -} - -public class KeyframeEffectOptions: BridgedDictionary { - public convenience init(composite: CompositeOperation, pseudoElement: String?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.composite] = composite.jsValue - object[Strings.pseudoElement] = pseudoElement.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - _pseudoElement = ReadWriteAttribute(jsObject: object, name: Strings.pseudoElement) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var composite: CompositeOperation - - @ReadWriteAttribute - public var pseudoElement: String? -} - -public class Location: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Location].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) - _ancestorOrigins = ReadonlyAttribute(jsObject: jsObject, name: Strings.ancestorOrigins) - self.jsObject = jsObject - } - - @ReadWriteAttribute - public var href: String - - @ReadonlyAttribute - public var origin: String - - @ReadWriteAttribute - public var `protocol`: String - - @ReadWriteAttribute - public var host: String - - @ReadWriteAttribute - public var hostname: String - - @ReadWriteAttribute - public var port: String - - @ReadWriteAttribute - public var pathname: String - - @ReadWriteAttribute - public var search: String - - @ReadWriteAttribute - public var hash: String - - @inlinable public func assign(url: String) { - let this = jsObject - _ = this[Strings.assign].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public func replace(url: String) { - let this = jsObject - _ = this[Strings.replace].function!(this: this, arguments: [url.jsValue]) - } - - @inlinable public func reload() { - let this = jsObject - _ = this[Strings.reload].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var ancestorOrigins: DOMStringList -} - -public class MediaError: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaError].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - self.jsObject = jsObject - } - - public static let MEDIA_ERR_ABORTED: UInt16 = 1 - - public static let MEDIA_ERR_NETWORK: UInt16 = 2 - - public static let MEDIA_ERR_DECODE: UInt16 = 3 - - public static let MEDIA_ERR_SRC_NOT_SUPPORTED: UInt16 = 4 - - @ReadonlyAttribute - public var code: UInt16 - - @ReadonlyAttribute - public var message: String -} - -public class MessageChannel: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MessageChannel].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _port1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port1) - _port2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port2) - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var port1: MessagePort - - @ReadonlyAttribute - public var port2: MessagePort -} - -public class MessageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessageEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastEventId) - _source = ReadonlyAttribute(jsObject: jsObject, name: Strings.source) - _ports = ReadonlyAttribute(jsObject: jsObject, name: Strings.ports) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var data: JSValue - - @ReadonlyAttribute - public var origin: String - - @ReadonlyAttribute - public var lastEventId: String - - @ReadonlyAttribute - public var source: MessageEventSource? - - @ReadonlyAttribute - public var ports: [MessagePort] - - @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = data?.jsValue ?? .undefined - let _arg4 = origin?.jsValue ?? .undefined - let _arg5 = lastEventId?.jsValue ?? .undefined - let _arg6 = source?.jsValue ?? .undefined - let _arg7 = ports?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public class MessageEventInit: BridgedDictionary { - public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.origin] = origin.jsValue - object[Strings.lastEventId] = lastEventId.jsValue - object[Strings.source] = source.jsValue - object[Strings.ports] = ports.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) - _lastEventId = ReadWriteAttribute(jsObject: object, name: Strings.lastEventId) - _source = ReadWriteAttribute(jsObject: object, name: Strings.source) - _ports = ReadWriteAttribute(jsObject: object, name: Strings.ports) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: JSValue - - @ReadWriteAttribute - public var origin: String - - @ReadWriteAttribute - public var lastEventId: String - - @ReadWriteAttribute - public var source: MessageEventSource? - - @ReadWriteAttribute - public var ports: [MessagePort] -} - -public class MessagePort: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessagePort].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func start() { - let this = jsObject - _ = this[Strings.start].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public class MimeType: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeType].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) - _suffixes = ReadonlyAttribute(jsObject: jsObject, name: Strings.suffixes) - _enabledPlugin = ReadonlyAttribute(jsObject: jsObject, name: Strings.enabledPlugin) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var description: String - - @ReadonlyAttribute - public var suffixes: String - - @ReadonlyAttribute - public var enabledPlugin: Plugin -} - -public class MimeTypeArray: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeTypeArray].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> MimeType? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> MimeType? { - jsObject[key].fromJSValue() - } -} - -public class MouseEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MouseEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) - _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) - _clientX = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientX) - _clientY = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientY) - _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) - _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) - _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) - _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) - _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) - _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) - _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MouseEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var screenX: Int32 - - @ReadonlyAttribute - public var screenY: Int32 - - @ReadonlyAttribute - public var clientX: Int32 - - @ReadonlyAttribute - public var clientY: Int32 - - @ReadonlyAttribute - public var ctrlKey: Bool - - @ReadonlyAttribute - public var shiftKey: Bool - - @ReadonlyAttribute - public var altKey: Bool - - @ReadonlyAttribute - public var metaKey: Bool - - @ReadonlyAttribute - public var button: Int16 - - @ReadonlyAttribute - public var buttons: UInt16 - - @ReadonlyAttribute - public var relatedTarget: EventTarget? - - @inlinable public func getModifierState(keyArg: String) -> Bool { - let this = jsObject - return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! - } - - @inlinable public func initMouseEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil, screenXArg: Int32? = nil, screenYArg: Int32? = nil, clientXArg: Int32? = nil, clientYArg: Int32? = nil, ctrlKeyArg: Bool? = nil, altKeyArg: Bool? = nil, shiftKeyArg: Bool? = nil, metaKeyArg: Bool? = nil, buttonArg: Int16? = nil, relatedTargetArg: EventTarget? = nil) { - let _arg0 = typeArg.jsValue - let _arg1 = bubblesArg?.jsValue ?? .undefined - let _arg2 = cancelableArg?.jsValue ?? .undefined - let _arg3 = viewArg?.jsValue ?? .undefined - let _arg4 = detailArg?.jsValue ?? .undefined - let _arg5 = screenXArg?.jsValue ?? .undefined - let _arg6 = screenYArg?.jsValue ?? .undefined - let _arg7 = clientXArg?.jsValue ?? .undefined - let _arg8 = clientYArg?.jsValue ?? .undefined - let _arg9 = ctrlKeyArg?.jsValue ?? .undefined - let _arg10 = altKeyArg?.jsValue ?? .undefined - let _arg11 = shiftKeyArg?.jsValue ?? .undefined - let _arg12 = metaKeyArg?.jsValue ?? .undefined - let _arg13 = buttonArg?.jsValue ?? .undefined - let _arg14 = relatedTargetArg?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) - } -} - -public class MouseEventInit: BridgedDictionary { - public convenience init(screenX: Int32, screenY: Int32, clientX: Int32, clientY: Int32, button: Int16, buttons: UInt16, relatedTarget: EventTarget?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.screenX] = screenX.jsValue - object[Strings.screenY] = screenY.jsValue - object[Strings.clientX] = clientX.jsValue - object[Strings.clientY] = clientY.jsValue - object[Strings.button] = button.jsValue - object[Strings.buttons] = buttons.jsValue - object[Strings.relatedTarget] = relatedTarget.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _screenX = ReadWriteAttribute(jsObject: object, name: Strings.screenX) - _screenY = ReadWriteAttribute(jsObject: object, name: Strings.screenY) - _clientX = ReadWriteAttribute(jsObject: object, name: Strings.clientX) - _clientY = ReadWriteAttribute(jsObject: object, name: Strings.clientY) - _button = ReadWriteAttribute(jsObject: object, name: Strings.button) - _buttons = ReadWriteAttribute(jsObject: object, name: Strings.buttons) - _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var screenX: Int32 - - @ReadWriteAttribute - public var screenY: Int32 - - @ReadWriteAttribute - public var clientX: Int32 - - @ReadWriteAttribute - public var clientY: Int32 - - @ReadWriteAttribute - public var button: Int16 - - @ReadWriteAttribute - public var buttons: UInt16 - - @ReadWriteAttribute - public var relatedTarget: EventTarget? -} - -public class MultiCacheQueryOptions: BridgedDictionary { - public convenience init(cacheName: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.cacheName] = cacheName.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _cacheName = ReadWriteAttribute(jsObject: object, name: Strings.cacheName) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var cacheName: String -} - -public class MutationEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MutationEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _relatedNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedNode) - _prevValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.prevValue) - _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) - _attrName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrName) - _attrChange = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrChange) - super.init(unsafelyWrapping: jsObject) - } - - public static let MODIFICATION: UInt16 = 1 - - public static let ADDITION: UInt16 = 2 - - public static let REMOVAL: UInt16 = 3 - - @ReadonlyAttribute - public var relatedNode: Node? - - @ReadonlyAttribute - public var prevValue: String - - @ReadonlyAttribute - public var newValue: String - - @ReadonlyAttribute - public var attrName: String - - @ReadonlyAttribute - public var attrChange: UInt16 - - @inlinable public func initMutationEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, relatedNodeArg: Node? = nil, prevValueArg: String? = nil, newValueArg: String? = nil, attrNameArg: String? = nil, attrChangeArg: UInt16? = nil) { - let _arg0 = typeArg.jsValue - let _arg1 = bubblesArg?.jsValue ?? .undefined - let _arg2 = cancelableArg?.jsValue ?? .undefined - let _arg3 = relatedNodeArg?.jsValue ?? .undefined - let _arg4 = prevValueArg?.jsValue ?? .undefined - let _arg5 = newValueArg?.jsValue ?? .undefined - let _arg6 = attrNameArg?.jsValue ?? .undefined - let _arg7 = attrChangeArg?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMutationEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public class MutationObserver: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationObserver].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - // XXX: constructor is ignored - - @inlinable public func observe(target: Node, options: MutationObserverInit? = nil) { - let this = jsObject - _ = this[Strings.observe].function!(this: this, arguments: [target.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func disconnect() { - let this = jsObject - _ = this[Strings.disconnect].function!(this: this, arguments: []) - } - - @inlinable public func takeRecords() -> [MutationRecord] { - let this = jsObject - return this[Strings.takeRecords].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class MutationObserverInit: BridgedDictionary { - public convenience init(childList: Bool, attributes: Bool, characterData: Bool, subtree: Bool, attributeOldValue: Bool, characterDataOldValue: Bool, attributeFilter: [String]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.childList] = childList.jsValue - object[Strings.attributes] = attributes.jsValue - object[Strings.characterData] = characterData.jsValue - object[Strings.subtree] = subtree.jsValue - object[Strings.attributeOldValue] = attributeOldValue.jsValue - object[Strings.characterDataOldValue] = characterDataOldValue.jsValue - object[Strings.attributeFilter] = attributeFilter.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _childList = ReadWriteAttribute(jsObject: object, name: Strings.childList) - _attributes = ReadWriteAttribute(jsObject: object, name: Strings.attributes) - _characterData = ReadWriteAttribute(jsObject: object, name: Strings.characterData) - _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) - _attributeOldValue = ReadWriteAttribute(jsObject: object, name: Strings.attributeOldValue) - _characterDataOldValue = ReadWriteAttribute(jsObject: object, name: Strings.characterDataOldValue) - _attributeFilter = ReadWriteAttribute(jsObject: object, name: Strings.attributeFilter) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var childList: Bool - - @ReadWriteAttribute - public var attributes: Bool - - @ReadWriteAttribute - public var characterData: Bool - - @ReadWriteAttribute - public var subtree: Bool - - @ReadWriteAttribute - public var attributeOldValue: Bool - - @ReadWriteAttribute - public var characterDataOldValue: Bool - - @ReadWriteAttribute - public var attributeFilter: [String] -} - -public class MutationRecord: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationRecord].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) - _addedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.addedNodes) - _removedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.removedNodes) - _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) - _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) - _attributeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeName) - _attributeNamespace = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeNamespace) - _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var target: Node - - @ReadonlyAttribute - public var addedNodes: NodeList - - @ReadonlyAttribute - public var removedNodes: NodeList - - @ReadonlyAttribute - public var previousSibling: Node? - - @ReadonlyAttribute - public var nextSibling: Node? - - @ReadonlyAttribute - public var attributeName: String? - - @ReadonlyAttribute - public var attributeNamespace: String? - - @ReadonlyAttribute - public var oldValue: String? -} - -public class NamedNodeMap: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NamedNodeMap].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Attr? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Attr? { - jsObject[key].fromJSValue() - } - - @inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? { - let this = jsObject - return this[Strings.getNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func setNamedItem(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setNamedItem].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func setNamedItemNS(attr: Attr) -> Attr? { - let this = jsObject - return this[Strings.setNamedItemNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! - } - - @inlinable public func removeNamedItem(qualifiedName: String) -> Attr { - let this = jsObject - return this[Strings.removeNamedItem].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! - } - - @inlinable public func removeNamedItemNS(namespace: String?, localName: String) -> Attr { - let this = jsObject - return this[Strings.removeNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! - } -} - -public class NavigationPreloadManager: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NavigationPreloadManager].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func enable() -> JSPromise { - let this = jsObject - return this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func enable() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func disable() -> JSPromise { - let this = jsObject - return this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func disable() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func setHeaderValue(value: String) -> JSPromise { - let this = jsObject - return this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func setHeaderValue(value: String) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getState() -> JSPromise { - let this = jsObject - return this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getState() async throws -> NavigationPreloadState { - let this = jsObject - let _promise: JSPromise = this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class NavigationPreloadState: BridgedDictionary { - public convenience init(enabled: Bool, headerValue: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.enabled] = enabled.jsValue - object[Strings.headerValue] = headerValue.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _enabled = ReadWriteAttribute(jsObject: object, name: Strings.enabled) - _headerValue = ReadWriteAttribute(jsObject: object, name: Strings.headerValue) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var enabled: Bool - - @ReadWriteAttribute - public var headerValue: String -} - -public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Navigator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _serviceWorker = ReadonlyAttribute(jsObject: jsObject, name: Strings.serviceWorker) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var serviceWorker: ServiceWorkerContainer -} - -public protocol NavigatorConcurrentHardware: JSBridgedClass {} -public extension NavigatorConcurrentHardware { - @inlinable var hardwareConcurrency: UInt64 { ReadonlyAttribute[Strings.hardwareConcurrency, in: jsObject] } -} - -public protocol NavigatorContentUtils: JSBridgedClass {} -public extension NavigatorContentUtils { - @inlinable func registerProtocolHandler(scheme: String, url: String) { - let this = jsObject - _ = this[Strings.registerProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) - } - - @inlinable func unregisterProtocolHandler(scheme: String, url: String) { - let this = jsObject - _ = this[Strings.unregisterProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) - } -} - -public protocol NavigatorCookies: JSBridgedClass {} -public extension NavigatorCookies { - @inlinable var cookieEnabled: Bool { ReadonlyAttribute[Strings.cookieEnabled, in: jsObject] } -} - -public protocol NavigatorID: JSBridgedClass {} -public extension NavigatorID { - @inlinable var appCodeName: String { ReadonlyAttribute[Strings.appCodeName, in: jsObject] } - - @inlinable var appName: String { ReadonlyAttribute[Strings.appName, in: jsObject] } - - @inlinable var appVersion: String { ReadonlyAttribute[Strings.appVersion, in: jsObject] } - - @inlinable var platform: String { ReadonlyAttribute[Strings.platform, in: jsObject] } - - @inlinable var product: String { ReadonlyAttribute[Strings.product, in: jsObject] } - - @inlinable var productSub: String { ReadonlyAttribute[Strings.productSub, in: jsObject] } - - @inlinable var userAgent: String { ReadonlyAttribute[Strings.userAgent, in: jsObject] } - - @inlinable var vendor: String { ReadonlyAttribute[Strings.vendor, in: jsObject] } - - @inlinable var vendorSub: String { ReadonlyAttribute[Strings.vendorSub, in: jsObject] } - - @inlinable func taintEnabled() -> Bool { - let this = jsObject - return this[Strings.taintEnabled].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var oscpu: String { ReadonlyAttribute[Strings.oscpu, in: jsObject] } -} - -public protocol NavigatorLanguage: JSBridgedClass {} -public extension NavigatorLanguage { - @inlinable var language: String { ReadonlyAttribute[Strings.language, in: jsObject] } - - @inlinable var languages: [String] { ReadonlyAttribute[Strings.languages, in: jsObject] } -} - -public protocol NavigatorOnLine: JSBridgedClass {} -public extension NavigatorOnLine { - @inlinable var onLine: Bool { ReadonlyAttribute[Strings.onLine, in: jsObject] } -} - -public protocol NavigatorPlugins: JSBridgedClass {} -public extension NavigatorPlugins { - @inlinable var plugins: PluginArray { ReadonlyAttribute[Strings.plugins, in: jsObject] } - - @inlinable var mimeTypes: MimeTypeArray { ReadonlyAttribute[Strings.mimeTypes, in: jsObject] } - - @inlinable func javaEnabled() -> Bool { - let this = jsObject - return this[Strings.javaEnabled].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable var pdfViewerEnabled: Bool { ReadonlyAttribute[Strings.pdfViewerEnabled, in: jsObject] } -} - -public class Node: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Node].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _nodeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeType) - _nodeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeName) - _baseURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.baseURI) - _isConnected = ReadonlyAttribute(jsObject: jsObject, name: Strings.isConnected) - _ownerDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerDocument) - _parentNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentNode) - _parentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentElement) - _childNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.childNodes) - _firstChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.firstChild) - _lastChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastChild) - _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) - _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) - _nodeValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.nodeValue) - _textContent = ReadWriteAttribute(jsObject: jsObject, name: Strings.textContent) - super.init(unsafelyWrapping: jsObject) - } - - public static let ELEMENT_NODE: UInt16 = 1 - - public static let ATTRIBUTE_NODE: UInt16 = 2 - - public static let TEXT_NODE: UInt16 = 3 - - public static let CDATA_SECTION_NODE: UInt16 = 4 - - public static let ENTITY_REFERENCE_NODE: UInt16 = 5 - - public static let ENTITY_NODE: UInt16 = 6 - - public static let PROCESSING_INSTRUCTION_NODE: UInt16 = 7 - - public static let COMMENT_NODE: UInt16 = 8 - - public static let DOCUMENT_NODE: UInt16 = 9 - - public static let DOCUMENT_TYPE_NODE: UInt16 = 10 - - public static let DOCUMENT_FRAGMENT_NODE: UInt16 = 11 - - public static let NOTATION_NODE: UInt16 = 12 - - @ReadonlyAttribute - public var nodeType: UInt16 - - @ReadonlyAttribute - public var nodeName: String - - @ReadonlyAttribute - public var baseURI: String - - @ReadonlyAttribute - public var isConnected: Bool - - @ReadonlyAttribute - public var ownerDocument: Document? - - @inlinable public func getRootNode(options: GetRootNodeOptions? = nil) -> Self { - let this = jsObject - return this[Strings.getRootNode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var parentNode: Node? - - @ReadonlyAttribute - public var parentElement: Element? - - @inlinable public func hasChildNodes() -> Bool { - let this = jsObject - return this[Strings.hasChildNodes].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var childNodes: NodeList - - @ReadonlyAttribute - public var firstChild: Node? - - @ReadonlyAttribute - public var lastChild: Node? - - @ReadonlyAttribute - public var previousSibling: Node? - - @ReadonlyAttribute - public var nextSibling: Node? - - @ReadWriteAttribute - public var nodeValue: String? - - @ReadWriteAttribute - public var textContent: String? - - @inlinable public func normalize() { - let this = jsObject - _ = this[Strings.normalize].function!(this: this, arguments: []) - } - - @inlinable public func cloneNode(deep: Bool? = nil) -> Self { - let this = jsObject - return this[Strings.cloneNode].function!(this: this, arguments: [deep?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func isEqualNode(otherNode: Node?) -> Bool { - let this = jsObject - return this[Strings.isEqualNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! - } - - @inlinable public func isSameNode(otherNode: Node?) -> Bool { - let this = jsObject - return this[Strings.isSameNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! - } - - public static let DOCUMENT_POSITION_DISCONNECTED: UInt16 = 0x01 - - public static let DOCUMENT_POSITION_PRECEDING: UInt16 = 0x02 - - public static let DOCUMENT_POSITION_FOLLOWING: UInt16 = 0x04 - - public static let DOCUMENT_POSITION_CONTAINS: UInt16 = 0x08 - - public static let DOCUMENT_POSITION_CONTAINED_BY: UInt16 = 0x10 - - public static let DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: UInt16 = 0x20 - - @inlinable public func compareDocumentPosition(other: Node) -> UInt16 { - let this = jsObject - return this[Strings.compareDocumentPosition].function!(this: this, arguments: [other.jsValue]).fromJSValue()! - } - - @inlinable public func contains(other: Node?) -> Bool { - let this = jsObject - return this[Strings.contains].function!(this: this, arguments: [other.jsValue]).fromJSValue()! - } - - @inlinable public func lookupPrefix(namespace: String?) -> String? { - let this = jsObject - return this[Strings.lookupPrefix].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! - } - - @inlinable public func lookupNamespaceURI(prefix: String?) -> String? { - let this = jsObject - return this[Strings.lookupNamespaceURI].function!(this: this, arguments: [prefix.jsValue]).fromJSValue()! - } - - @inlinable public func isDefaultNamespace(namespace: String?) -> Bool { - let this = jsObject - return this[Strings.isDefaultNamespace].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! - } - - @inlinable public func insertBefore(node: Node, child: Node?) -> Self { - let this = jsObject - return this[Strings.insertBefore].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! - } - - @inlinable public func appendChild(node: Node) -> Self { - let this = jsObject - return this[Strings.appendChild].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public func replaceChild(node: Node, child: Node) -> Self { - let this = jsObject - return this[Strings.replaceChild].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! - } - - @inlinable public func removeChild(child: Node) -> Self { - let this = jsObject - return this[Strings.removeChild].function!(this: this, arguments: [child.jsValue]).fromJSValue()! - } -} - -public class NodeIterator: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeIterator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) - _referenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.referenceNode) - _pointerBeforeReferenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.pointerBeforeReferenceNode) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var root: Node - - @ReadonlyAttribute - public var referenceNode: Node - - @ReadonlyAttribute - public var pointerBeforeReferenceNode: Bool - - @ReadonlyAttribute - public var whatToShow: UInt32 - - // XXX: member 'filter' is ignored - - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func detach() { - let this = jsObject - _ = this[Strings.detach].function!(this: this, arguments: []) - } -} - -public class NodeList: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> Node? { - jsObject[key].fromJSValue() - } - - @ReadonlyAttribute - public var length: UInt32 - - public typealias Element = Node - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public protocol NonDocumentTypeChildNode: JSBridgedClass {} -public extension NonDocumentTypeChildNode { - @inlinable var previousElementSibling: Element? { ReadonlyAttribute[Strings.previousElementSibling, in: jsObject] } - - @inlinable var nextElementSibling: Element? { ReadonlyAttribute[Strings.nextElementSibling, in: jsObject] } -} - -public protocol NonElementParentNode: JSBridgedClass {} -public extension NonElementParentNode { - @inlinable func getElementById(elementId: String) -> Element? { - let this = jsObject - return this[Strings.getElementById].function!(this: this, arguments: [elementId.jsValue]).fromJSValue()! - } -} - -public class OffscreenCanvas: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvas].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) - _oncontextlost = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextlost) - _oncontextrestored = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextrestored) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(width: UInt64, height: UInt64) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [width.jsValue, height.jsValue])) - } - - @ReadWriteAttribute - public var width: UInt64 - - @ReadWriteAttribute - public var height: UInt64 - - @inlinable public func getContext(contextId: OffscreenRenderingContextId, options: JSValue? = nil) -> OffscreenRenderingContext? { - let this = jsObject - return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func transferToImageBitmap() -> ImageBitmap { - let this = jsObject - return this[Strings.transferToImageBitmap].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob { - let this = jsObject - let _promise: JSPromise = this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @ClosureAttribute1Optional - public var oncontextlost: EventHandler - - @ClosureAttribute1Optional - public var oncontextrestored: EventHandler -} - -public class OffscreenCanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvasRenderingContext2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject - } - - @inlinable public func commit() { - let this = jsObject - _ = this[Strings.commit].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var canvas: OffscreenCanvas -} - -public enum OffscreenRenderingContextId: JSString, JSValueCompatible { - case _2d = "2d" - case bitmaprenderer = "bitmaprenderer" - case webgl = "webgl" - case webgl2 = "webgl2" - case webgpu = "webgpu" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class OptionalEffectTiming: BridgedDictionary { - public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, duration: JSValue, direction: PlaybackDirection, easing: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.delay] = delay.jsValue - object[Strings.endDelay] = endDelay.jsValue - object[Strings.fill] = fill.jsValue - object[Strings.iterationStart] = iterationStart.jsValue - object[Strings.iterations] = iterations.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.direction] = direction.jsValue - object[Strings.easing] = easing.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) - _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) - _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) - _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) - _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var delay: Double - - @ReadWriteAttribute - public var endDelay: Double - - @ReadWriteAttribute - public var fill: FillMode - - @ReadWriteAttribute - public var iterationStart: Double - - @ReadWriteAttribute - public var iterations: Double - - @ReadWriteAttribute - public var duration: JSValue - - @ReadWriteAttribute - public var direction: PlaybackDirection - - @ReadWriteAttribute - public var easing: String -} - -public class PageTransitionEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PageTransitionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _persisted = ReadonlyAttribute(jsObject: jsObject, name: Strings.persisted) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PageTransitionEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var persisted: Bool -} - -public class PageTransitionEventInit: BridgedDictionary { - public convenience init(persisted: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.persisted] = persisted.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _persisted = ReadWriteAttribute(jsObject: object, name: Strings.persisted) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var persisted: Bool -} - -public protocol ParentNode: JSBridgedClass {} -public extension ParentNode { - @inlinable var children: HTMLCollection { ReadonlyAttribute[Strings.children, in: jsObject] } - - @inlinable var firstElementChild: Element? { ReadonlyAttribute[Strings.firstElementChild, in: jsObject] } - - @inlinable var lastElementChild: Element? { ReadonlyAttribute[Strings.lastElementChild, in: jsObject] } - - @inlinable var childElementCount: UInt32 { ReadonlyAttribute[Strings.childElementCount, in: jsObject] } - - @inlinable func prepend(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func append(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func replaceChildren(nodes: JSValue...) { - let this = jsObject - _ = this[Strings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) - } - - @inlinable func querySelector(selectors: String) -> Element? { - let this = jsObject - return this[Strings.querySelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } - - @inlinable func querySelectorAll(selectors: String) -> NodeList { - let this = jsObject - return this[Strings.querySelectorAll].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! - } -} - -public class Path2D: JSBridgedClass, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Path2D].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(path: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) - } - - @inlinable public func addPath(path: Path2D, transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.addPath].function!(this: this, arguments: [path.jsValue, transform?.jsValue ?? .undefined]) - } -} - -public class Performance: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Performance].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _timeOrigin = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeOrigin) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func now() -> DOMHighResTimeStamp { - let this = jsObject - return this[Strings.now].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var timeOrigin: DOMHighResTimeStamp - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public enum PlaybackDirection: JSString, JSValueCompatible { - case normal = "normal" - case reverse = "reverse" - case alternate = "alternate" - case alternateReverse = "alternate-reverse" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Plugin: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Plugin].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) - _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var description: String - - @ReadonlyAttribute - public var filename: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> MimeType? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> MimeType? { - jsObject[key].fromJSValue() - } -} - -public class PluginArray: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.PluginArray].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public func refresh() { - let this = jsObject - _ = this[Strings.refresh].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> Plugin? { - jsObject[key].fromJSValue() - } - - @inlinable public subscript(key: String) -> Plugin? { - jsObject[key].fromJSValue() - } -} - -public class PopStateEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PopStateEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PopStateEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var state: JSValue -} - -public class PopStateEventInit: BridgedDictionary { - public convenience init(state: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.state] = state.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _state = ReadWriteAttribute(jsObject: object, name: Strings.state) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var state: JSValue -} - -public enum PredefinedColorSpace: JSString, JSValueCompatible { - case srgb = "srgb" - case displayP3 = "display-p3" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum PremultiplyAlpha: JSString, JSValueCompatible { - case none = "none" - case premultiply = "premultiply" - case `default` = "default" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class ProcessingInstruction: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProcessingInstruction].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var target: String -} - -public class ProgressEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProgressEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _lengthComputable = ReadonlyAttribute(jsObject: jsObject, name: Strings.lengthComputable) - _loaded = ReadonlyAttribute(jsObject: jsObject, name: Strings.loaded) - _total = ReadonlyAttribute(jsObject: jsObject, name: Strings.total) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: ProgressEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var lengthComputable: Bool - - @ReadonlyAttribute - public var loaded: UInt64 - - @ReadonlyAttribute - public var total: UInt64 -} - -public class ProgressEventInit: BridgedDictionary { - public convenience init(lengthComputable: Bool, loaded: UInt64, total: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.lengthComputable] = lengthComputable.jsValue - object[Strings.loaded] = loaded.jsValue - object[Strings.total] = total.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _lengthComputable = ReadWriteAttribute(jsObject: object, name: Strings.lengthComputable) - _loaded = ReadWriteAttribute(jsObject: object, name: Strings.loaded) - _total = ReadWriteAttribute(jsObject: object, name: Strings.total) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var lengthComputable: Bool - - @ReadWriteAttribute - public var loaded: UInt64 - - @ReadWriteAttribute - public var total: UInt64 -} - -public class PromiseRejectionEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PromiseRejectionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _promise = ReadonlyAttribute(jsObject: jsObject, name: Strings.promise) - _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: PromiseRejectionEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var promise: JSPromise - - @ReadonlyAttribute - public var reason: JSValue -} - -public class PromiseRejectionEventInit: BridgedDictionary { - public convenience init(promise: JSPromise, reason: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.promise] = promise.jsValue - object[Strings.reason] = reason.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _promise = ReadWriteAttribute(jsObject: object, name: Strings.promise) - _reason = ReadWriteAttribute(jsObject: object, name: Strings.reason) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var promise: JSPromise - - @ReadWriteAttribute - public var reason: JSValue -} - -public class QueuingStrategy: BridgedDictionary { - public convenience init(highWaterMark: Double, size: @escaping QueuingStrategySize) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.highWaterMark] = highWaterMark.jsValue - ClosureAttribute1[Strings.size, in: object] = size - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) - _size = ClosureAttribute1(jsObject: object, name: Strings.size) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var highWaterMark: Double - - @ClosureAttribute1 - public var size: QueuingStrategySize -} - -public class QueuingStrategyInit: BridgedDictionary { - public convenience init(highWaterMark: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.highWaterMark] = highWaterMark.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var highWaterMark: Double -} - -public class RadioNodeList: NodeList { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.RadioNodeList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var value: String -} - -public class Range: AbstractRange { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Range].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _commonAncestorContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.commonAncestorContainer) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ReadonlyAttribute - public var commonAncestorContainer: Node - - @inlinable public func setStart(node: Node, offset: UInt32) { - let this = jsObject - _ = this[Strings.setStart].function!(this: this, arguments: [node.jsValue, offset.jsValue]) - } - - @inlinable public func setEnd(node: Node, offset: UInt32) { - let this = jsObject - _ = this[Strings.setEnd].function!(this: this, arguments: [node.jsValue, offset.jsValue]) - } - - @inlinable public func setStartBefore(node: Node) { - let this = jsObject - _ = this[Strings.setStartBefore].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setStartAfter(node: Node) { - let this = jsObject - _ = this[Strings.setStartAfter].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setEndBefore(node: Node) { - let this = jsObject - _ = this[Strings.setEndBefore].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func setEndAfter(node: Node) { - let this = jsObject - _ = this[Strings.setEndAfter].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func collapse(toStart: Bool? = nil) { - let this = jsObject - _ = this[Strings.collapse].function!(this: this, arguments: [toStart?.jsValue ?? .undefined]) - } - - @inlinable public func selectNode(node: Node) { - let this = jsObject - _ = this[Strings.selectNode].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func selectNodeContents(node: Node) { - let this = jsObject - _ = this[Strings.selectNodeContents].function!(this: this, arguments: [node.jsValue]) - } - - public static let START_TO_START: UInt16 = 0 - - public static let START_TO_END: UInt16 = 1 - - public static let END_TO_END: UInt16 = 2 - - public static let END_TO_START: UInt16 = 3 - - @inlinable public func compareBoundaryPoints(how: UInt16, sourceRange: Range) -> Int16 { - let this = jsObject - return this[Strings.compareBoundaryPoints].function!(this: this, arguments: [how.jsValue, sourceRange.jsValue]).fromJSValue()! - } - - @inlinable public func deleteContents() { - let this = jsObject - _ = this[Strings.deleteContents].function!(this: this, arguments: []) - } - - @inlinable public func extractContents() -> DocumentFragment { - let this = jsObject - return this[Strings.extractContents].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func cloneContents() -> DocumentFragment { - let this = jsObject - return this[Strings.cloneContents].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func insertNode(node: Node) { - let this = jsObject - _ = this[Strings.insertNode].function!(this: this, arguments: [node.jsValue]) - } - - @inlinable public func surroundContents(newParent: Node) { - let this = jsObject - _ = this[Strings.surroundContents].function!(this: this, arguments: [newParent.jsValue]) - } - - @inlinable public func cloneRange() -> Self { - let this = jsObject - return this[Strings.cloneRange].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func detach() { - let this = jsObject - _ = this[Strings.detach].function!(this: this, arguments: []) - } - - @inlinable public func isPointInRange(node: Node, offset: UInt32) -> Bool { - let this = jsObject - return this[Strings.isPointInRange].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! - } - - @inlinable public func comparePoint(node: Node, offset: UInt32) -> Int16 { - let this = jsObject - return this[Strings.comparePoint].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! - } - - @inlinable public func intersectsNode(node: Node) -> Bool { - let this = jsObject - return this[Strings.intersectsNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } -} - -public class ReadableByteStreamController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableByteStreamController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _byobRequest = ReadonlyAttribute(jsObject: jsObject, name: Strings.byobRequest) - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var byobRequest: ReadableStreamBYOBRequest? - - @ReadonlyAttribute - public var desiredSize: Double? - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public func enqueue(chunk: ArrayBufferView) { - let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func error(e: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) - } -} - -public class ReadableStream: JSBridgedClass, AsyncSequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStream].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) - self.jsObject = jsObject - } - - @inlinable public convenience init(underlyingSource: JSObject? = nil, strategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSource?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var locked: Bool - - @inlinable public func cancel(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func cancel(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getReader(options: ReadableStreamGetReaderOptions? = nil) -> ReadableStreamReader { - let this = jsObject - return this[Strings.getReader].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func pipeThrough(transform: ReadableWritablePair, options: StreamPipeOptions? = nil) -> Self { - let this = jsObject - return this[Strings.pipeThrough].function!(this: this, arguments: [transform.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func tee() -> [ReadableStream] { - let this = jsObject - return this[Strings.tee].function!(this: this, arguments: []).fromJSValue()! - } - - public typealias Element = JSValue - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - public func makeAsyncIterator() -> ValueIterableAsyncIterator { - ValueIterableAsyncIterator(sequence: self) - } -} - -public class ReadableStreamBYOBReadResult: BridgedDictionary { - public convenience init(value: ArrayBufferView?, done: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.value] = value.jsValue - object[Strings.done] = done.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _value = ReadWriteAttribute(jsObject: object, name: Strings.value) - _done = ReadWriteAttribute(jsObject: object, name: Strings.done) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var value: ArrayBufferView? - - @ReadWriteAttribute - public var done: Bool -} - -public class ReadableStreamBYOBReader: JSBridgedClass, ReadableStreamGenericReader { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBReader].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(stream: ReadableStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @inlinable public func read(view: ArrayBufferView) -> JSPromise { - let this = jsObject - return this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func read(view: ArrayBufferView) async throws -> ReadableStreamBYOBReadResult { - let this = jsObject - let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func releaseLock() { - let this = jsObject - _ = this[Strings.releaseLock].function!(this: this, arguments: []) - } -} - -public class ReadableStreamBYOBRequest: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBRequest].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var view: ArrayBufferView? - - @inlinable public func respond(bytesWritten: UInt64) { - let this = jsObject - _ = this[Strings.respond].function!(this: this, arguments: [bytesWritten.jsValue]) - } - - @inlinable public func respondWithNewView(view: ArrayBufferView) { - let this = jsObject - _ = this[Strings.respondWithNewView].function!(this: this, arguments: [view.jsValue]) - } -} - -public class ReadableStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var desiredSize: Double? - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public func enqueue(chunk: JSValue? = nil) { - let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) - } - - @inlinable public func error(e: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) - } -} - -public class ReadableStreamDefaultReadResult: BridgedDictionary { - public convenience init(value: JSValue, done: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.value] = value.jsValue - object[Strings.done] = done.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _value = ReadWriteAttribute(jsObject: object, name: Strings.value) - _done = ReadWriteAttribute(jsObject: object, name: Strings.done) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var value: JSValue - - @ReadWriteAttribute - public var done: Bool -} - -public class ReadableStreamDefaultReader: JSBridgedClass, ReadableStreamGenericReader { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultReader].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(stream: ReadableStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @inlinable public func read() -> JSPromise { - let this = jsObject - return this[Strings.read].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func read() async throws -> ReadableStreamDefaultReadResult { - let this = jsObject - let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func releaseLock() { - let this = jsObject - _ = this[Strings.releaseLock].function!(this: this, arguments: []) - } -} - -public protocol ReadableStreamGenericReader: JSBridgedClass {} -public extension ReadableStreamGenericReader { - @inlinable var closed: JSPromise { ReadonlyAttribute[Strings.closed, in: jsObject] } - - @inlinable func cancel(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func cancel(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} - -public class ReadableStreamGetReaderOptions: BridgedDictionary { - public convenience init(mode: ReadableStreamReaderMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.mode] = mode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mode: ReadableStreamReaderMode -} - -public class ReadableStreamIteratorOptions: BridgedDictionary { - public convenience init(preventCancel: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.preventCancel] = preventCancel.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventCancel: Bool -} - -public enum ReadableStreamReaderMode: JSString, JSValueCompatible { - case byob = "byob" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ReadableStreamType: JSString, JSValueCompatible { - case bytes = "bytes" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class ReadableWritablePair: BridgedDictionary { - public convenience init(readable: ReadableStream, writable: WritableStream) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.readable] = readable.jsValue - object[Strings.writable] = writable.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _readable = ReadWriteAttribute(jsObject: object, name: Strings.readable) - _writable = ReadWriteAttribute(jsObject: object, name: Strings.writable) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var readable: ReadableStream - - @ReadWriteAttribute - public var writable: WritableStream -} - -public enum ReferrerPolicy: JSString, JSValueCompatible { - case _empty = "" - case noReferrer = "no-referrer" - case noReferrerWhenDowngrade = "no-referrer-when-downgrade" - case sameOrigin = "same-origin" - case origin = "origin" - case strictOrigin = "strict-origin" - case originWhenCrossOrigin = "origin-when-cross-origin" - case strictOriginWhenCrossOrigin = "strict-origin-when-cross-origin" - case unsafeUrl = "unsafe-url" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class RegistrationOptions: BridgedDictionary { - public convenience init(scope: String, type: WorkerType, updateViaCache: ServiceWorkerUpdateViaCache) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.scope] = scope.jsValue - object[Strings.type] = type.jsValue - object[Strings.updateViaCache] = updateViaCache.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _scope = ReadWriteAttribute(jsObject: object, name: Strings.scope) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _updateViaCache = ReadWriteAttribute(jsObject: object, name: Strings.updateViaCache) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var scope: String - - @ReadWriteAttribute - public var type: WorkerType - - @ReadWriteAttribute - public var updateViaCache: ServiceWorkerUpdateViaCache -} - -public class Request: JSBridgedClass, Body { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Request].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _method = ReadonlyAttribute(jsObject: jsObject, name: Strings.method) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) - _destination = ReadonlyAttribute(jsObject: jsObject, name: Strings.destination) - _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) - _referrerPolicy = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) - _credentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.credentials) - _cache = ReadonlyAttribute(jsObject: jsObject, name: Strings.cache) - _redirect = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirect) - _integrity = ReadonlyAttribute(jsObject: jsObject, name: Strings.integrity) - _keepalive = ReadonlyAttribute(jsObject: jsObject, name: Strings.keepalive) - _isReloadNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isReloadNavigation) - _isHistoryNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isHistoryNavigation) - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) - self.jsObject = jsObject - } - - @inlinable public convenience init(input: RequestInfo, init: RequestInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [input.jsValue, `init`?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var method: String - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var headers: Headers - - @ReadonlyAttribute - public var destination: RequestDestination - - @ReadonlyAttribute - public var referrer: String - - @ReadonlyAttribute - public var referrerPolicy: ReferrerPolicy - - @ReadonlyAttribute - public var mode: RequestMode - - @ReadonlyAttribute - public var credentials: RequestCredentials - - @ReadonlyAttribute - public var cache: RequestCache - - @ReadonlyAttribute - public var redirect: RequestRedirect - - @ReadonlyAttribute - public var integrity: String - - @ReadonlyAttribute - public var keepalive: Bool - - @ReadonlyAttribute - public var isReloadNavigation: Bool - - @ReadonlyAttribute - public var isHistoryNavigation: Bool - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } -} - -public enum RequestCache: JSString, JSValueCompatible { - case `default` = "default" - case noStore = "no-store" - case reload = "reload" - case noCache = "no-cache" - case forceCache = "force-cache" - case onlyIfCached = "only-if-cached" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum RequestCredentials: JSString, JSValueCompatible { - case omit = "omit" - case sameOrigin = "same-origin" - case include = "include" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum RequestDestination: JSString, JSValueCompatible { - case _empty = "" - case audio = "audio" - case audioworklet = "audioworklet" - case document = "document" - case embed = "embed" - case font = "font" - case frame = "frame" - case iframe = "iframe" - case image = "image" - case manifest = "manifest" - case object = "object" - case paintworklet = "paintworklet" - case report = "report" - case script = "script" - case sharedworker = "sharedworker" - case style = "style" - case track = "track" - case video = "video" - case worker = "worker" - case xslt = "xslt" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class RequestInit: BridgedDictionary { - public convenience init(method: String, headers: HeadersInit, body: BodyInit?, referrer: String, referrerPolicy: ReferrerPolicy, mode: RequestMode, credentials: RequestCredentials, cache: RequestCache, redirect: RequestRedirect, integrity: String, keepalive: Bool, signal: AbortSignal?, window: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.method] = method.jsValue - object[Strings.headers] = headers.jsValue - object[Strings.body] = body.jsValue - object[Strings.referrer] = referrer.jsValue - object[Strings.referrerPolicy] = referrerPolicy.jsValue - object[Strings.mode] = mode.jsValue - object[Strings.credentials] = credentials.jsValue - object[Strings.cache] = cache.jsValue - object[Strings.redirect] = redirect.jsValue - object[Strings.integrity] = integrity.jsValue - object[Strings.keepalive] = keepalive.jsValue - object[Strings.signal] = signal.jsValue - object[Strings.window] = window.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _method = ReadWriteAttribute(jsObject: object, name: Strings.method) - _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) - _body = ReadWriteAttribute(jsObject: object, name: Strings.body) - _referrer = ReadWriteAttribute(jsObject: object, name: Strings.referrer) - _referrerPolicy = ReadWriteAttribute(jsObject: object, name: Strings.referrerPolicy) - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - _cache = ReadWriteAttribute(jsObject: object, name: Strings.cache) - _redirect = ReadWriteAttribute(jsObject: object, name: Strings.redirect) - _integrity = ReadWriteAttribute(jsObject: object, name: Strings.integrity) - _keepalive = ReadWriteAttribute(jsObject: object, name: Strings.keepalive) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - _window = ReadWriteAttribute(jsObject: object, name: Strings.window) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var method: String - - @ReadWriteAttribute - public var headers: HeadersInit - - @ReadWriteAttribute - public var body: BodyInit? - - @ReadWriteAttribute - public var referrer: String - - @ReadWriteAttribute - public var referrerPolicy: ReferrerPolicy - - @ReadWriteAttribute - public var mode: RequestMode - - @ReadWriteAttribute - public var credentials: RequestCredentials - - @ReadWriteAttribute - public var cache: RequestCache - - @ReadWriteAttribute - public var redirect: RequestRedirect - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var keepalive: Bool - - @ReadWriteAttribute - public var signal: AbortSignal? - - @ReadWriteAttribute - public var window: JSValue -} - -public enum RequestMode: JSString, JSValueCompatible { - case navigate = "navigate" - case sameOrigin = "same-origin" - case noCors = "no-cors" - case cors = "cors" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum RequestRedirect: JSString, JSValueCompatible { - case follow = "follow" - case error = "error" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ResizeQuality: JSString, JSValueCompatible { - case pixelated = "pixelated" - case low = "low" - case medium = "medium" - case high = "high" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Response: JSBridgedClass, Body { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Response].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _redirected = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirected) - _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) - _ok = ReadonlyAttribute(jsObject: jsObject, name: Strings.ok) - _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) - _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) - self.jsObject = jsObject - } - - @inlinable public convenience init(body: BodyInit? = nil, init: ResponseInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [body?.jsValue ?? .undefined, `init`?.jsValue ?? .undefined])) - } - - @inlinable public static func error() -> Self { - let this = constructor - return this[Strings.error].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public static func redirect(url: String, status: UInt16? = nil) -> Self { - let this = constructor - return this[Strings.redirect].function!(this: this, arguments: [url.jsValue, status?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var type: ResponseType - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var redirected: Bool - - @ReadonlyAttribute - public var status: UInt16 - - @ReadonlyAttribute - public var ok: Bool - - @ReadonlyAttribute - public var statusText: String - - @ReadonlyAttribute - public var headers: Headers - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class ResponseInit: BridgedDictionary { - public convenience init(status: UInt16, statusText: String, headers: HeadersInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.status] = status.jsValue - object[Strings.statusText] = statusText.jsValue - object[Strings.headers] = headers.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _status = ReadWriteAttribute(jsObject: object, name: Strings.status) - _statusText = ReadWriteAttribute(jsObject: object, name: Strings.statusText) - _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var status: UInt16 - - @ReadWriteAttribute - public var statusText: String - - @ReadWriteAttribute - public var headers: HeadersInit -} - -public enum ResponseType: JSString, JSValueCompatible { - case basic = "basic" - case cors = "cors" - case `default` = "default" - case error = "error" - case opaque = "opaque" - case opaqueredirect = "opaqueredirect" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ScrollRestoration: JSString, JSValueCompatible { - case auto = "auto" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum SelectionMode: JSString, JSValueCompatible { - case select = "select" - case start = "start" - case end = "end" - case preserve = "preserve" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class ServiceWorker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _scriptURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.scriptURL) - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _onstatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstatechange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var scriptURL: String - - @ReadonlyAttribute - public var state: ServiceWorkerState - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @ClosureAttribute1Optional - public var onstatechange: EventHandler -} - -public class ServiceWorkerContainer: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerContainer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _controller = ReadonlyAttribute(jsObject: jsObject, name: Strings.controller) - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _oncontrollerchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontrollerchange) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var controller: ServiceWorker? - - @ReadonlyAttribute - public var ready: JSPromise - - @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) async throws -> ServiceWorkerRegistration { - let this = jsObject - let _promise: JSPromise = this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getRegistration(clientURL: String? = nil) -> JSPromise { - let this = jsObject - return this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getRegistration(clientURL: String? = nil) async throws -> ServiceWorkerRegistration? { - let this = jsObject - let _promise: JSPromise = this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getRegistrations() -> JSPromise { - let this = jsObject - return this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getRegistrations() async throws -> [ServiceWorkerRegistration] { - let this = jsObject - let _promise: JSPromise = this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func startMessages() { - let this = jsObject - _ = this[Strings.startMessages].function!(this: this, arguments: []) - } - - @ClosureAttribute1Optional - public var oncontrollerchange: EventHandler - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public class ServiceWorkerRegistration: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerRegistration].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _installing = ReadonlyAttribute(jsObject: jsObject, name: Strings.installing) - _waiting = ReadonlyAttribute(jsObject: jsObject, name: Strings.waiting) - _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) - _navigationPreload = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigationPreload) - _scope = ReadonlyAttribute(jsObject: jsObject, name: Strings.scope) - _updateViaCache = ReadonlyAttribute(jsObject: jsObject, name: Strings.updateViaCache) - _onupdatefound = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onupdatefound) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var installing: ServiceWorker? - - @ReadonlyAttribute - public var waiting: ServiceWorker? - - @ReadonlyAttribute - public var active: ServiceWorker? - - @ReadonlyAttribute - public var navigationPreload: NavigationPreloadManager - - @ReadonlyAttribute - public var scope: String - - @ReadonlyAttribute - public var updateViaCache: ServiceWorkerUpdateViaCache - - @inlinable public func update() -> JSPromise { - let this = jsObject - return this[Strings.update].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func update() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.update].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func unregister() -> JSPromise { - let this = jsObject - return this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func unregister() async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @ClosureAttribute1Optional - public var onupdatefound: EventHandler -} - -public enum ServiceWorkerState: JSString, JSValueCompatible { - case parsed = "parsed" - case installing = "installing" - case installed = "installed" - case activating = "activating" - case activated = "activated" - case redundant = "redundant" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum ServiceWorkerUpdateViaCache: JSString, JSValueCompatible { - case imports = "imports" - case all = "all" - case none = "none" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class ShadowRoot: DocumentFragment, DocumentOrShadowRoot { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ShadowRoot].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) - _delegatesFocus = ReadonlyAttribute(jsObject: jsObject, name: Strings.delegatesFocus) - _slotAssignment = ReadonlyAttribute(jsObject: jsObject, name: Strings.slotAssignment) - _host = ReadonlyAttribute(jsObject: jsObject, name: Strings.host) - _onslotchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onslotchange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var mode: ShadowRootMode - - @ReadonlyAttribute - public var delegatesFocus: Bool - - @ReadonlyAttribute - public var slotAssignment: SlotAssignmentMode - - @ReadonlyAttribute - public var host: Element - - @ClosureAttribute1Optional - public var onslotchange: EventHandler -} - -public class ShadowRootInit: BridgedDictionary { - public convenience init(mode: ShadowRootMode, delegatesFocus: Bool, slotAssignment: SlotAssignmentMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.mode] = mode.jsValue - object[Strings.delegatesFocus] = delegatesFocus.jsValue - object[Strings.slotAssignment] = slotAssignment.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - _delegatesFocus = ReadWriteAttribute(jsObject: object, name: Strings.delegatesFocus) - _slotAssignment = ReadWriteAttribute(jsObject: object, name: Strings.slotAssignment) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mode: ShadowRootMode - - @ReadWriteAttribute - public var delegatesFocus: Bool - - @ReadWriteAttribute - public var slotAssignment: SlotAssignmentMode -} - -public enum ShadowRootMode: JSString, JSValueCompatible { - case open = "open" - case closed = "closed" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class SharedWorker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SharedWorker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _port = ReadonlyAttribute(jsObject: jsObject, name: Strings.port) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(scriptURL: String, options: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var port: MessagePort -} - -public enum SlotAssignmentMode: JSString, JSValueCompatible { - case manual = "manual" - case named = "named" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol Slottable: JSBridgedClass {} -public extension Slottable { - @inlinable var assignedSlot: HTMLSlotElement? { ReadonlyAttribute[Strings.assignedSlot, in: jsObject] } -} - -public class StaticRange: AbstractRange { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StaticRange].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(init: StaticRangeInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } -} - -public class StaticRangeInit: BridgedDictionary { - public convenience init(startContainer: Node, startOffset: UInt32, endContainer: Node, endOffset: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.startContainer] = startContainer.jsValue - object[Strings.startOffset] = startOffset.jsValue - object[Strings.endContainer] = endContainer.jsValue - object[Strings.endOffset] = endOffset.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _startContainer = ReadWriteAttribute(jsObject: object, name: Strings.startContainer) - _startOffset = ReadWriteAttribute(jsObject: object, name: Strings.startOffset) - _endContainer = ReadWriteAttribute(jsObject: object, name: Strings.endContainer) - _endOffset = ReadWriteAttribute(jsObject: object, name: Strings.endOffset) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var startContainer: Node - - @ReadWriteAttribute - public var startOffset: UInt32 - - @ReadWriteAttribute - public var endContainer: Node - - @ReadWriteAttribute - public var endOffset: UInt32 -} - -public class Storage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Storage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func key(index: UInt32) -> String? { - let this = jsObject - return this[Strings.key].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } - - @inlinable public subscript(key: String) -> String? { - jsObject[key].fromJSValue() - } - - // XXX: unsupported setter for keys of type String - - // XXX: unsupported deleter for keys of type String - - @inlinable public func clear() { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: []) - } -} - -public class StorageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StorageEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) - _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) - _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _storageArea = ReadonlyAttribute(jsObject: jsObject, name: Strings.storageArea) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: StorageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var key: String? - - @ReadonlyAttribute - public var oldValue: String? - - @ReadonlyAttribute - public var newValue: String? - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var storageArea: Storage? - - @inlinable public func initStorageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, key: String? = nil, oldValue: String? = nil, newValue: String? = nil, url: String? = nil, storageArea: Storage? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = key?.jsValue ?? .undefined - let _arg4 = oldValue?.jsValue ?? .undefined - let _arg5 = newValue?.jsValue ?? .undefined - let _arg6 = url?.jsValue ?? .undefined - let _arg7 = storageArea?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initStorageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} - -public class StorageEventInit: BridgedDictionary { - public convenience init(key: String?, oldValue: String?, newValue: String?, url: String, storageArea: Storage?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.key] = key.jsValue - object[Strings.oldValue] = oldValue.jsValue - object[Strings.newValue] = newValue.jsValue - object[Strings.url] = url.jsValue - object[Strings.storageArea] = storageArea.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _key = ReadWriteAttribute(jsObject: object, name: Strings.key) - _oldValue = ReadWriteAttribute(jsObject: object, name: Strings.oldValue) - _newValue = ReadWriteAttribute(jsObject: object, name: Strings.newValue) - _url = ReadWriteAttribute(jsObject: object, name: Strings.url) - _storageArea = ReadWriteAttribute(jsObject: object, name: Strings.storageArea) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var key: String? - - @ReadWriteAttribute - public var oldValue: String? - - @ReadWriteAttribute - public var newValue: String? - - @ReadWriteAttribute - public var url: String - - @ReadWriteAttribute - public var storageArea: Storage? -} - -public class StreamPipeOptions: BridgedDictionary { - public convenience init(preventClose: Bool, preventAbort: Bool, preventCancel: Bool, signal: AbortSignal) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.preventClose] = preventClose.jsValue - object[Strings.preventAbort] = preventAbort.jsValue - object[Strings.preventCancel] = preventCancel.jsValue - object[Strings.signal] = signal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _preventClose = ReadWriteAttribute(jsObject: object, name: Strings.preventClose) - _preventAbort = ReadWriteAttribute(jsObject: object, name: Strings.preventAbort) - _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var preventClose: Bool - - @ReadWriteAttribute - public var preventAbort: Bool - - @ReadWriteAttribute - public var preventCancel: Bool - - @ReadWriteAttribute - public var signal: AbortSignal -} - -public class StructuredSerializeOptions: BridgedDictionary { - public convenience init(transfer: [JSObject]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.transfer] = transfer.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var transfer: [JSObject] -} - -public class SubmitEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SubmitEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _submitter = ReadonlyAttribute(jsObject: jsObject, name: Strings.submitter) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: SubmitEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var submitter: HTMLElement? -} - -public class SubmitEventInit: BridgedDictionary { - public convenience init(submitter: HTMLElement?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.submitter] = submitter.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _submitter = ReadWriteAttribute(jsObject: object, name: Strings.submitter) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var submitter: HTMLElement? -} - -public class Text: CharacterData, Slottable { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _wholeText = ReadonlyAttribute(jsObject: jsObject, name: Strings.wholeText) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) - } - - @inlinable public func splitText(offset: UInt32) -> Self { - let this = jsObject - return this[Strings.splitText].function!(this: this, arguments: [offset.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var wholeText: String -} - -public class TextMetrics: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextMetrics].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _actualBoundingBoxLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxLeft) - _actualBoundingBoxRight = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxRight) - _fontBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxAscent) - _fontBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxDescent) - _actualBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxAscent) - _actualBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxDescent) - _emHeightAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightAscent) - _emHeightDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightDescent) - _hangingBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.hangingBaseline) - _alphabeticBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.alphabeticBaseline) - _ideographicBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.ideographicBaseline) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var width: Double - - @ReadonlyAttribute - public var actualBoundingBoxLeft: Double - - @ReadonlyAttribute - public var actualBoundingBoxRight: Double - - @ReadonlyAttribute - public var fontBoundingBoxAscent: Double - - @ReadonlyAttribute - public var fontBoundingBoxDescent: Double - - @ReadonlyAttribute - public var actualBoundingBoxAscent: Double - - @ReadonlyAttribute - public var actualBoundingBoxDescent: Double - - @ReadonlyAttribute - public var emHeightAscent: Double - - @ReadonlyAttribute - public var emHeightDescent: Double - - @ReadonlyAttribute - public var hangingBaseline: Double - - @ReadonlyAttribute - public var alphabeticBaseline: Double - - @ReadonlyAttribute - public var ideographicBaseline: Double -} - -public class TextTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _inBandMetadataTrackDispatchType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inBandMetadataTrackDispatchType) - _mode = ReadWriteAttribute(jsObject: jsObject, name: Strings.mode) - _cues = ReadonlyAttribute(jsObject: jsObject, name: Strings.cues) - _activeCues = ReadonlyAttribute(jsObject: jsObject, name: Strings.activeCues) - _oncuechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncuechange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var kind: TextTrackKind - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var inBandMetadataTrackDispatchType: String - - @ReadWriteAttribute - public var mode: TextTrackMode - - @ReadonlyAttribute - public var cues: TextTrackCueList? - - @ReadonlyAttribute - public var activeCues: TextTrackCueList? - - @inlinable public func addCue(cue: TextTrackCue) { - let this = jsObject - _ = this[Strings.addCue].function!(this: this, arguments: [cue.jsValue]) - } - - @inlinable public func removeCue(cue: TextTrackCue) { - let this = jsObject - _ = this[Strings.removeCue].function!(this: this, arguments: [cue.jsValue]) - } - - @ClosureAttribute1Optional - public var oncuechange: EventHandler -} - -public class TextTrackCue: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCue].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) - _startTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.startTime) - _endTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.endTime) - _pauseOnExit = ReadWriteAttribute(jsObject: jsObject, name: Strings.pauseOnExit) - _onenter = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onenter) - _onexit = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onexit) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var track: TextTrack? - - @ReadWriteAttribute - public var id: String - - @ReadWriteAttribute - public var startTime: Double - - @ReadWriteAttribute - public var endTime: Double - - @ReadWriteAttribute - public var pauseOnExit: Bool - - @ClosureAttribute1Optional - public var onenter: EventHandler - - @ClosureAttribute1Optional - public var onexit: EventHandler -} - -public class TextTrackCueList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCueList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> TextTrackCue { - jsObject[key].fromJSValue()! - } - - @inlinable public func getCueById(id: String) -> TextTrackCue? { - let this = jsObject - return this[Strings.getCueById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } -} - -public enum TextTrackKind: JSString, JSValueCompatible { - case subtitles = "subtitles" - case captions = "captions" - case descriptions = "descriptions" - case chapters = "chapters" - case metadata = "metadata" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class TextTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> TextTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> TextTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public enum TextTrackMode: JSString, JSValueCompatible { - case disabled = "disabled" - case hidden = "hidden" - case showing = "showing" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class TimeRanges: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TimeRanges].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func start(index: UInt32) -> Double { - let this = jsObject - return this[Strings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } - - @inlinable public func end(index: UInt32) -> Double { - let this = jsObject - return this[Strings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } -} - -public enum TimelinePhase: JSString, JSValueCompatible { - case inactive = "inactive" - case before = "before" - case active = "active" - case after = "after" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class TrackEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TrackEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var track: JSValue? -} - -public class TrackEventInit: BridgedDictionary { - public convenience init(track: JSValue?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.track] = track.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _track = ReadWriteAttribute(jsObject: object, name: Strings.track) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var track: JSValue? -} - -public class TransformStream: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStream].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _readable = ReadonlyAttribute(jsObject: jsObject, name: Strings.readable) - _writable = ReadonlyAttribute(jsObject: jsObject, name: Strings.writable) - self.jsObject = jsObject - } - - @inlinable public convenience init(transformer: JSObject? = nil, writableStrategy: QueuingStrategy? = nil, readableStrategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [transformer?.jsValue ?? .undefined, writableStrategy?.jsValue ?? .undefined, readableStrategy?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var readable: ReadableStream - - @ReadonlyAttribute - public var writable: WritableStream -} - -public class TransformStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStreamDefaultController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var desiredSize: Double? - - @inlinable public func enqueue(chunk: JSValue? = nil) { - let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) - } - - @inlinable public func error(reason: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) - } - - @inlinable public func terminate() { - let this = jsObject - _ = this[Strings.terminate].function!(this: this, arguments: []) - } -} - -public class Transformer: BridgedDictionary { - public convenience init(start: @escaping TransformerStartCallback, transform: @escaping TransformerTransformCallback, flush: @escaping TransformerFlushCallback, readableType: JSValue, writableType: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute2[Strings.transform, in: object] = transform - ClosureAttribute1[Strings.flush, in: object] = flush - object[Strings.readableType] = readableType.jsValue - object[Strings.writableType] = writableType.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _transform = ClosureAttribute2(jsObject: object, name: Strings.transform) - _flush = ClosureAttribute1(jsObject: object, name: Strings.flush) - _readableType = ReadWriteAttribute(jsObject: object, name: Strings.readableType) - _writableType = ReadWriteAttribute(jsObject: object, name: Strings.writableType) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1 - public var start: TransformerStartCallback - - @ClosureAttribute2 - public var transform: TransformerTransformCallback - - @ClosureAttribute1 - public var flush: TransformerFlushCallback - - @ReadWriteAttribute - public var readableType: JSValue - - @ReadWriteAttribute - public var writableType: JSValue -} - -public class TreeWalker: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TreeWalker].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) - _currentNode = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentNode) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var root: Node - - @ReadonlyAttribute - public var whatToShow: UInt32 - - // XXX: member 'filter' is ignored - - @ReadWriteAttribute - public var currentNode: Node - - @inlinable public func parentNode() -> Node? { - let this = jsObject - return this[Strings.parentNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func firstChild() -> Node? { - let this = jsObject - return this[Strings.firstChild].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func lastChild() -> Node? { - let this = jsObject - return this[Strings.lastChild].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousSibling() -> Node? { - let this = jsObject - return this[Strings.previousSibling].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func nextSibling() -> Node? { - let this = jsObject - return this[Strings.nextSibling].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! - } -} - -public typealias DOMHighResTimeStamp = Double -public typealias EpochTimeStamp = UInt64 - -public typealias CanvasFilterInput = [String: JSValue] - -public typealias EventHandler = EventHandlerNonNull? -public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? -public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? - -public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue -public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise -public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise -public typealias UnderlyingSinkStartCallback = (WritableStreamDefaultController) -> JSValue -public typealias UnderlyingSinkWriteCallback = (JSValue, WritableStreamDefaultController) -> JSPromise -public typealias UnderlyingSinkCloseCallback = () -> JSPromise -public typealias UnderlyingSinkAbortCallback = (JSValue) -> JSPromise -public typealias TransformerStartCallback = (TransformStreamDefaultController) -> JSValue -public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise -public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise -public typealias QueuingStrategySize = (JSValue) -> Double -public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void -public typealias BlobCallback = (Blob?) -> Void -public typealias FunctionStringCallback = (String) -> Void -public typealias EventHandlerNonNull = (Event) -> JSValue -public typealias OnErrorEventHandlerNonNull = (JSValue, String, UInt32, UInt32, JSValue) -> JSValue -public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? -public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void -public class UIEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) - _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) - _which = ReadonlyAttribute(jsObject: jsObject, name: Strings.which) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: UIEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var view: Window? - - @ReadonlyAttribute - public var detail: Int32 - - @inlinable public func initUIEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil) { - let this = jsObject - _ = this[Strings.initUIEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, detailArg?.jsValue ?? .undefined]) - } - - @ReadonlyAttribute - public var which: UInt32 -} - -public class UIEventInit: BridgedDictionary { - public convenience init(view: Window?, detail: Int32, which: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.view] = view.jsValue - object[Strings.detail] = detail.jsValue - object[Strings.which] = which.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _view = ReadWriteAttribute(jsObject: object, name: Strings.view) - _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) - _which = ReadWriteAttribute(jsObject: object, name: Strings.which) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var view: Window? - - @ReadWriteAttribute - public var detail: Int32 - - @ReadWriteAttribute - public var which: UInt32 -} - -public class UnderlyingSink: BridgedDictionary { - public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute2[Strings.write, in: object] = write - ClosureAttribute0[Strings.close, in: object] = close - ClosureAttribute1[Strings.abort, in: object] = abort - object[Strings.type] = type.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _write = ClosureAttribute2(jsObject: object, name: Strings.write) - _close = ClosureAttribute0(jsObject: object, name: Strings.close) - _abort = ClosureAttribute1(jsObject: object, name: Strings.abort) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1 - public var start: UnderlyingSinkStartCallback - - @ClosureAttribute2 - public var write: UnderlyingSinkWriteCallback - - @ClosureAttribute0 - public var close: UnderlyingSinkCloseCallback - - @ClosureAttribute1 - public var abort: UnderlyingSinkAbortCallback - - @ReadWriteAttribute - public var type: JSValue -} - -public class UnderlyingSource: BridgedDictionary { - public convenience init(start: @escaping UnderlyingSourceStartCallback, pull: @escaping UnderlyingSourcePullCallback, cancel: @escaping UnderlyingSourceCancelCallback, type: ReadableStreamType, autoAllocateChunkSize: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute1[Strings.pull, in: object] = pull - ClosureAttribute1[Strings.cancel, in: object] = cancel - object[Strings.type] = type.jsValue - object[Strings.autoAllocateChunkSize] = autoAllocateChunkSize.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _pull = ClosureAttribute1(jsObject: object, name: Strings.pull) - _cancel = ClosureAttribute1(jsObject: object, name: Strings.cancel) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _autoAllocateChunkSize = ReadWriteAttribute(jsObject: object, name: Strings.autoAllocateChunkSize) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1 - public var start: UnderlyingSourceStartCallback - - @ClosureAttribute1 - public var pull: UnderlyingSourcePullCallback - - @ClosureAttribute1 - public var cancel: UnderlyingSourceCancelCallback - - @ReadWriteAttribute - public var type: ReadableStreamType - - @ReadWriteAttribute - public var autoAllocateChunkSize: UInt64 -} - -public class ValidityState: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ValidityState].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: Strings.valueMissing) - _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.typeMismatch) - _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.patternMismatch) - _tooLong = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooLong) - _tooShort = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooShort) - _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeUnderflow) - _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeOverflow) - _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.stepMismatch) - _badInput = ReadonlyAttribute(jsObject: jsObject, name: Strings.badInput) - _customError = ReadonlyAttribute(jsObject: jsObject, name: Strings.customError) - _valid = ReadonlyAttribute(jsObject: jsObject, name: Strings.valid) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var valueMissing: Bool - - @ReadonlyAttribute - public var typeMismatch: Bool - - @ReadonlyAttribute - public var patternMismatch: Bool - - @ReadonlyAttribute - public var tooLong: Bool - - @ReadonlyAttribute - public var tooShort: Bool - - @ReadonlyAttribute - public var rangeUnderflow: Bool - - @ReadonlyAttribute - public var rangeOverflow: Bool - - @ReadonlyAttribute - public var stepMismatch: Bool - - @ReadonlyAttribute - public var badInput: Bool - - @ReadonlyAttribute - public var customError: Bool - - @ReadonlyAttribute - public var valid: Bool -} - -public class ValidityStateFlags: BridgedDictionary { - public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.valueMissing] = valueMissing.jsValue - object[Strings.typeMismatch] = typeMismatch.jsValue - object[Strings.patternMismatch] = patternMismatch.jsValue - object[Strings.tooLong] = tooLong.jsValue - object[Strings.tooShort] = tooShort.jsValue - object[Strings.rangeUnderflow] = rangeUnderflow.jsValue - object[Strings.rangeOverflow] = rangeOverflow.jsValue - object[Strings.stepMismatch] = stepMismatch.jsValue - object[Strings.badInput] = badInput.jsValue - object[Strings.customError] = customError.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _valueMissing = ReadWriteAttribute(jsObject: object, name: Strings.valueMissing) - _typeMismatch = ReadWriteAttribute(jsObject: object, name: Strings.typeMismatch) - _patternMismatch = ReadWriteAttribute(jsObject: object, name: Strings.patternMismatch) - _tooLong = ReadWriteAttribute(jsObject: object, name: Strings.tooLong) - _tooShort = ReadWriteAttribute(jsObject: object, name: Strings.tooShort) - _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeUnderflow) - _rangeOverflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeOverflow) - _stepMismatch = ReadWriteAttribute(jsObject: object, name: Strings.stepMismatch) - _badInput = ReadWriteAttribute(jsObject: object, name: Strings.badInput) - _customError = ReadWriteAttribute(jsObject: object, name: Strings.customError) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var valueMissing: Bool - - @ReadWriteAttribute - public var typeMismatch: Bool - - @ReadWriteAttribute - public var patternMismatch: Bool - - @ReadWriteAttribute - public var tooLong: Bool - - @ReadWriteAttribute - public var tooShort: Bool - - @ReadWriteAttribute - public var rangeUnderflow: Bool - - @ReadWriteAttribute - public var rangeOverflow: Bool - - @ReadWriteAttribute - public var stepMismatch: Bool - - @ReadWriteAttribute - public var badInput: Bool - - @ReadWriteAttribute - public var customError: Bool -} - -public class VideoTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var selected: Bool -} - -public class VideoTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> VideoTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> VideoTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public class WheelEvent: MouseEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _deltaX = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaX) - _deltaY = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaY) - _deltaZ = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaZ) - _deltaMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaMode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: WheelEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - public static let DOM_DELTA_PIXEL: UInt32 = 0x00 - - public static let DOM_DELTA_LINE: UInt32 = 0x01 - - public static let DOM_DELTA_PAGE: UInt32 = 0x02 - - @ReadonlyAttribute - public var deltaX: Double - - @ReadonlyAttribute - public var deltaY: Double - - @ReadonlyAttribute - public var deltaZ: Double - - @ReadonlyAttribute - public var deltaMode: UInt32 -} - -public class WheelEventInit: BridgedDictionary { - public convenience init(deltaX: Double, deltaY: Double, deltaZ: Double, deltaMode: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.deltaX] = deltaX.jsValue - object[Strings.deltaY] = deltaY.jsValue - object[Strings.deltaZ] = deltaZ.jsValue - object[Strings.deltaMode] = deltaMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _deltaX = ReadWriteAttribute(jsObject: object, name: Strings.deltaX) - _deltaY = ReadWriteAttribute(jsObject: object, name: Strings.deltaY) - _deltaZ = ReadWriteAttribute(jsObject: object, name: Strings.deltaZ) - _deltaMode = ReadWriteAttribute(jsObject: object, name: Strings.deltaMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var deltaX: Double - - @ReadWriteAttribute - public var deltaY: Double - - @ReadWriteAttribute - public var deltaZ: Double - - @ReadWriteAttribute - public var deltaMode: UInt32 -} - -public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Window].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _event = ReadonlyAttribute(jsObject: jsObject, name: Strings.event) - _window = ReadonlyAttribute(jsObject: jsObject, name: Strings.window) - _self = ReadonlyAttribute(jsObject: jsObject, name: Strings._self) - _document = ReadonlyAttribute(jsObject: jsObject, name: Strings.document) - _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) - _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) - _history = ReadonlyAttribute(jsObject: jsObject, name: Strings.history) - _customElements = ReadonlyAttribute(jsObject: jsObject, name: Strings.customElements) - _locationbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.locationbar) - _menubar = ReadonlyAttribute(jsObject: jsObject, name: Strings.menubar) - _personalbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.personalbar) - _scrollbars = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollbars) - _statusbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusbar) - _toolbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.toolbar) - _status = ReadWriteAttribute(jsObject: jsObject, name: Strings.status) - _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) - _frames = ReadonlyAttribute(jsObject: jsObject, name: Strings.frames) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) - _opener = ReadWriteAttribute(jsObject: jsObject, name: Strings.opener) - _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) - _frameElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameElement) - _navigator = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigator) - _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) - _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) - _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var event: Event? - - @ReadonlyAttribute - public var window: WindowProxy - - @ReadonlyAttribute - public var `self`: WindowProxy - - @ReadonlyAttribute - public var document: Document - - @ReadWriteAttribute - public var name: String - - @ReadonlyAttribute - public var location: Location - - @ReadonlyAttribute - public var history: History - - @ReadonlyAttribute - public var customElements: CustomElementRegistry - - @ReadonlyAttribute - public var locationbar: BarProp - - @ReadonlyAttribute - public var menubar: BarProp - - @ReadonlyAttribute - public var personalbar: BarProp - - @ReadonlyAttribute - public var scrollbars: BarProp - - @ReadonlyAttribute - public var statusbar: BarProp - - @ReadonlyAttribute - public var toolbar: BarProp - - @ReadWriteAttribute - public var status: String - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var closed: Bool - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } - - @inlinable public func focus() { - let this = jsObject - _ = this[Strings.focus].function!(this: this, arguments: []) - } - - @inlinable public func blur() { - let this = jsObject - _ = this[Strings.blur].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var frames: WindowProxy - - @ReadonlyAttribute - public var length: UInt32 - - @ReadonlyAttribute - public var top: WindowProxy? - - @ReadWriteAttribute - public var opener: JSValue - - @ReadonlyAttribute - public var parent: WindowProxy? - - @ReadonlyAttribute - public var frameElement: Element? - - @inlinable public func open(url: String? = nil, target: String? = nil, features: String? = nil) -> WindowProxy? { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [url?.jsValue ?? .undefined, target?.jsValue ?? .undefined, features?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public subscript(key: String) -> JSObject { - jsObject[key].fromJSValue()! - } - - @ReadonlyAttribute - public var navigator: Navigator - - @ReadonlyAttribute - public var clientInformation: Navigator - - @ReadonlyAttribute - public var originAgentCluster: Bool - - @inlinable public func alert() { - let this = jsObject - _ = this[Strings.alert].function!(this: this, arguments: []) - } - - @inlinable public func alert(message: String) { - let this = jsObject - _ = this[Strings.alert].function!(this: this, arguments: [message.jsValue]) - } - - @inlinable public func confirm(message: String? = nil) -> Bool { - let this = jsObject - return this[Strings.confirm].function!(this: this, arguments: [message?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func prompt(message: String? = nil, default: String? = nil) -> String? { - let this = jsObject - return this[Strings.prompt].function!(this: this, arguments: [message?.jsValue ?? .undefined, `default`?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func print() { - let this = jsObject - _ = this[Strings.print].function!(this: this, arguments: []) - } - - @inlinable public func postMessage(message: JSValue, targetOrigin: String, transfer: [JSObject]? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, targetOrigin.jsValue, transfer?.jsValue ?? .undefined]) - } - - @inlinable public func postMessage(message: JSValue, options: WindowPostMessageOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func captureEvents() { - let this = jsObject - _ = this[Strings.captureEvents].function!(this: this, arguments: []) - } - - @inlinable public func releaseEvents() { - let this = jsObject - _ = this[Strings.releaseEvents].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var external: External -} - -public protocol WindowEventHandlers: JSBridgedClass {} -public extension WindowEventHandlers { - @inlinable var onafterprint: EventHandler { - get { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] = newValue } - } - - @inlinable var onbeforeprint: EventHandler { - get { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] = newValue } - } - - @inlinable var onbeforeunload: OnBeforeUnloadEventHandler { - get { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] = newValue } - } - - @inlinable var onhashchange: EventHandler { - get { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] = newValue } - } - - @inlinable var onlanguagechange: EventHandler { - get { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] = newValue } - } - - @inlinable var onmessage: EventHandler { - get { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] = newValue } - } - - @inlinable var onmessageerror: EventHandler { - get { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] = newValue } - } - - @inlinable var onoffline: EventHandler { - get { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] = newValue } - } - - @inlinable var ononline: EventHandler { - get { ClosureAttribute1Optional[Strings.ononline, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.ononline, in: jsObject] = newValue } - } - - @inlinable var onpagehide: EventHandler { - get { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] = newValue } - } - - @inlinable var onpageshow: EventHandler { - get { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] = newValue } - } - - @inlinable var onpopstate: EventHandler { - get { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] = newValue } - } - - @inlinable var onrejectionhandled: EventHandler { - get { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] = newValue } - } - - @inlinable var onstorage: EventHandler { - get { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] = newValue } - } - - @inlinable var onunhandledrejection: EventHandler { - get { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] = newValue } - } - - @inlinable var onunload: EventHandler { - get { ClosureAttribute1Optional[Strings.onunload, in: jsObject] } - nonmutating set { ClosureAttribute1Optional[Strings.onunload, in: jsObject] = newValue } - } -} - -public protocol WindowLocalStorage: JSBridgedClass {} -public extension WindowLocalStorage { - @inlinable var localStorage: Storage { ReadonlyAttribute[Strings.localStorage, in: jsObject] } -} - -public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} -public extension WindowOrWorkerGlobalScope { - @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) -> JSPromise { - let this = jsObject - return this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) async throws -> Response { - let this = jsObject - let _promise: JSPromise = this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable var performance: Performance { ReadonlyAttribute[Strings.performance, in: jsObject] } - - @inlinable var caches: CacheStorage { ReadonlyAttribute[Strings.caches, in: jsObject] } - - @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } - - @inlinable var isSecureContext: Bool { ReadonlyAttribute[Strings.isSecureContext, in: jsObject] } - - @inlinable var crossOriginIsolated: Bool { ReadonlyAttribute[Strings.crossOriginIsolated, in: jsObject] } - - @inlinable func reportError(e: JSValue) { - let this = jsObject - _ = this[Strings.reportError].function!(this: this, arguments: [e.jsValue]) - } - - @inlinable func btoa(data: String) -> String { - let this = jsObject - return this[Strings.btoa].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable func atob(data: String) -> String { - let this = jsObject - return this[Strings.atob].function!(this: this, arguments: [data.jsValue]).fromJSValue()! - } - - @inlinable func setTimeout(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { - let this = jsObject - return this[Strings.setTimeout].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! - } - - @inlinable func clearTimeout(id: Int32? = nil) { - let this = jsObject - _ = this[Strings.clearTimeout].function!(this: this, arguments: [id?.jsValue ?? .undefined]) - } - - @inlinable func setInterval(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { - let this = jsObject - return this[Strings.setInterval].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! - } - - @inlinable func clearInterval(id: Int32? = nil) { - let this = jsObject - _ = this[Strings.clearInterval].function!(this: this, arguments: [id?.jsValue ?? .undefined]) - } - - // XXX: method 'queueMicrotask' is ignored - - @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { - let this = jsObject - let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) -> JSPromise { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = options?.jsValue ?? .undefined - let this = jsObject - return this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = options?.jsValue ?? .undefined - let this = jsObject - let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func structuredClone(value: JSValue, options: StructuredSerializeOptions? = nil) -> JSValue { - let this = jsObject - return this[Strings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class WindowPostMessageOptions: BridgedDictionary { - public convenience init(targetOrigin: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.targetOrigin] = targetOrigin.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _targetOrigin = ReadWriteAttribute(jsObject: object, name: Strings.targetOrigin) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var targetOrigin: String -} - -public protocol WindowSessionStorage: JSBridgedClass {} -public extension WindowSessionStorage { - @inlinable var sessionStorage: Storage { ReadonlyAttribute[Strings.sessionStorage, in: jsObject] } -} - -public class Worker: EventTarget, AbstractWorker { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Worker].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(scriptURL: String, options: WorkerOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) - } - - @inlinable public func terminate() { - let this = jsObject - _ = this[Strings.terminate].function!(this: this, arguments: []) - } - - @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) - } - - @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) - } - - @ClosureAttribute1Optional - public var onmessage: EventHandler - - @ClosureAttribute1Optional - public var onmessageerror: EventHandler -} - -public class WorkerOptions: BridgedDictionary { - public convenience init(type: WorkerType, credentials: RequestCredentials, name: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.credentials] = credentials.jsValue - object[Strings.name] = name.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - _name = ReadWriteAttribute(jsObject: object, name: Strings.name) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: WorkerType - - @ReadWriteAttribute - public var credentials: RequestCredentials - - @ReadWriteAttribute - public var name: String -} - -public enum WorkerType: JSString, JSValueCompatible { - case classic = "classic" - case module = "module" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Worklet: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Worklet].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} - -public class WorkletOptions: BridgedDictionary { - public convenience init(credentials: RequestCredentials) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.credentials] = credentials.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var credentials: RequestCredentials -} - -public class WritableStream: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStream].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) - self.jsObject = jsObject - } - - @inlinable public convenience init(underlyingSink: JSObject? = nil, strategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSink?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var locked: Bool - - @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func abort(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func close() -> JSPromise { - let this = jsObject - return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func close() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func getWriter() -> WritableStreamDefaultWriter { - let this = jsObject - return this[Strings.getWriter].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class WritableStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultController].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func error(e: JSValue? = nil) { - let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) - } -} - -public class WritableStreamDefaultWriter: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultWriter].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - self.jsObject = jsObject - } - - @inlinable public convenience init(stream: WritableStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @ReadonlyAttribute - public var closed: JSPromise - - @ReadonlyAttribute - public var desiredSize: Double? - - @ReadonlyAttribute - public var ready: JSPromise - - @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func abort(reason: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func close() -> JSPromise { - let this = jsObject - return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func close() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func releaseLock() { - let this = jsObject - _ = this[Strings.releaseLock].function!(this: this, arguments: []) - } - - @inlinable public func write(chunk: JSValue? = nil) -> JSPromise { - let this = jsObject - return this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func write(chunk: JSValue? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} - -public class XMLDocument: Document { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLDocument].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class XMLHttpRequest: XMLHttpRequestEventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequest].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _timeout = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeout) - _withCredentials = ReadWriteAttribute(jsObject: jsObject, name: Strings.withCredentials) - _upload = ReadonlyAttribute(jsObject: jsObject, name: Strings.upload) - _responseURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseURL) - _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) - _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) - _responseType = ReadWriteAttribute(jsObject: jsObject, name: Strings.responseType) - _response = ReadonlyAttribute(jsObject: jsObject, name: Strings.response) - _responseText = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseText) - _responseXML = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseXML) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @ClosureAttribute1Optional - public var onreadystatechange: EventHandler - - public static let UNSENT: UInt16 = 0 - - public static let OPENED: UInt16 = 1 - - public static let HEADERS_RECEIVED: UInt16 = 2 - - public static let LOADING: UInt16 = 3 - - public static let DONE: UInt16 = 4 - - @ReadonlyAttribute - public var readyState: UInt16 - - @inlinable public func open(method: String, url: String) { - let this = jsObject - _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue]) - } - - @inlinable public func open(method: String, url: String, async: Bool, username: String? = nil, password: String? = nil) { - let this = jsObject - _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue, async.jsValue, username?.jsValue ?? .undefined, password?.jsValue ?? .undefined]) - } - - @inlinable public func setRequestHeader(name: String, value: String) { - let this = jsObject - _ = this[Strings.setRequestHeader].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @ReadWriteAttribute - public var timeout: UInt32 - - @ReadWriteAttribute - public var withCredentials: Bool - - @ReadonlyAttribute - public var upload: XMLHttpRequestUpload - - @inlinable public func send(body: JSValue? = nil) { - let this = jsObject - _ = this[Strings.send].function!(this: this, arguments: [body?.jsValue ?? .undefined]) - } - - @inlinable public func abort() { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: []) - } - - @ReadonlyAttribute - public var responseURL: String - - @ReadonlyAttribute - public var status: UInt16 - - @ReadonlyAttribute - public var statusText: String - - @inlinable public func getResponseHeader(name: String) -> String? { - let this = jsObject - return this[Strings.getResponseHeader].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAllResponseHeaders() -> String { - let this = jsObject - return this[Strings.getAllResponseHeaders].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func overrideMimeType(mime: String) { - let this = jsObject - _ = this[Strings.overrideMimeType].function!(this: this, arguments: [mime.jsValue]) - } - - @ReadWriteAttribute - public var responseType: XMLHttpRequestResponseType - - @ReadonlyAttribute - public var response: JSValue - - @ReadonlyAttribute - public var responseText: String - - @ReadonlyAttribute - public var responseXML: Document? -} - -public class XMLHttpRequestEventTarget: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestEventTarget].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) - _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) - _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) - _ontimeout = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ontimeout) - _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) - super.init(unsafelyWrapping: jsObject) - } - - @ClosureAttribute1Optional - public var onloadstart: EventHandler - - @ClosureAttribute1Optional - public var onprogress: EventHandler - - @ClosureAttribute1Optional - public var onabort: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @ClosureAttribute1Optional - public var onload: EventHandler - - @ClosureAttribute1Optional - public var ontimeout: EventHandler - - @ClosureAttribute1Optional - public var onloadend: EventHandler -} - -public enum XMLHttpRequestResponseType: JSString, JSValueCompatible { - case _empty = "" - case arraybuffer = "arraybuffer" - case blob = "blob" - case document = "document" - case json = "json" - case text = "text" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class XMLHttpRequestUpload: XMLHttpRequestEventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestUpload].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} - -public class XPathEvaluator: JSBridgedClass, XPathEvaluatorBase { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathEvaluator].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } -} - -public protocol XPathEvaluatorBase: JSBridgedClass {} -public extension XPathEvaluatorBase { - // XXX: method 'createExpression' is ignored - - // XXX: method 'createNSResolver' is ignored - - // XXX: method 'evaluate' is ignored -} - -public class XPathExpression: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathExpression].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func evaluate(contextNode: Node, type: UInt16? = nil, result: XPathResult? = nil) -> XPathResult { - let this = jsObject - return this[Strings.evaluate].function!(this: this, arguments: [contextNode.jsValue, type?.jsValue ?? .undefined, result?.jsValue ?? .undefined]).fromJSValue()! - } -} - -public class XPathResult: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathResult].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _resultType = ReadonlyAttribute(jsObject: jsObject, name: Strings.resultType) - _numberValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberValue) - _stringValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.stringValue) - _booleanValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.booleanValue) - _singleNodeValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.singleNodeValue) - _invalidIteratorState = ReadonlyAttribute(jsObject: jsObject, name: Strings.invalidIteratorState) - _snapshotLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.snapshotLength) - self.jsObject = jsObject - } - - public static let ANY_TYPE: UInt16 = 0 - - public static let NUMBER_TYPE: UInt16 = 1 - - public static let STRING_TYPE: UInt16 = 2 - - public static let BOOLEAN_TYPE: UInt16 = 3 - - public static let UNORDERED_NODE_ITERATOR_TYPE: UInt16 = 4 - - public static let ORDERED_NODE_ITERATOR_TYPE: UInt16 = 5 - - public static let UNORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 6 - - public static let ORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 7 - - public static let ANY_UNORDERED_NODE_TYPE: UInt16 = 8 - - public static let FIRST_ORDERED_NODE_TYPE: UInt16 = 9 - - @ReadonlyAttribute - public var resultType: UInt16 - - @ReadonlyAttribute - public var numberValue: Double - - @ReadonlyAttribute - public var stringValue: String - - @ReadonlyAttribute - public var booleanValue: Bool - - @ReadonlyAttribute - public var singleNodeValue: Node? - - @ReadonlyAttribute - public var invalidIteratorState: Bool - - @ReadonlyAttribute - public var snapshotLength: UInt32 - - @inlinable public func iterateNext() -> Node? { - let this = jsObject - return this[Strings.iterateNext].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func snapshotItem(index: UInt32) -> Node? { - let this = jsObject - return this[Strings.snapshotItem].function!(this: this, arguments: [index.jsValue]).fromJSValue()! - } -} - -public class XSLTProcessor: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XSLTProcessor].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func importStylesheet(style: Node) { - let this = jsObject - _ = this[Strings.importStylesheet].function!(this: this, arguments: [style.jsValue]) - } - - @inlinable public func transformToFragment(source: Node, output: Document) -> DocumentFragment { - let this = jsObject - return this[Strings.transformToFragment].function!(this: this, arguments: [source.jsValue, output.jsValue]).fromJSValue()! - } - - @inlinable public func transformToDocument(source: Node) -> Document { - let this = jsObject - return this[Strings.transformToDocument].function!(this: this, arguments: [source.jsValue]).fromJSValue()! - } - - @inlinable public func setParameter(namespaceURI: String, localName: String, value: JSValue) { - let this = jsObject - _ = this[Strings.setParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue, value.jsValue]) - } - - @inlinable public func getParameter(namespaceURI: String, localName: String) -> JSValue { - let this = jsObject - return this[Strings.getParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]).fromJSValue()! - } - - @inlinable public func removeParameter(namespaceURI: String, localName: String) { - let this = jsObject - _ = this[Strings.removeParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]) - } - - @inlinable public func clearParameters() { - let this = jsObject - _ = this[Strings.clearParameters].function!(this: this, arguments: []) - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } -} - -/* variadic generics please */ -@propertyWrapper public final class ClosureAttribute0 - where ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: () -> ReturnType { - get { ClosureAttribute0[name, in: jsObject] } - set { ClosureAttribute0[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> ReturnType { - get { - let function = jsObject[name].function! - return { function().fromJSValue()! } - } - set { - jsObject[name] = JSClosure { _ in - newValue().jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute0Optional - where ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (() -> ReturnType)? { - get { ClosureAttribute0Optional[name, in: jsObject] } - set { ClosureAttribute0Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function().fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { _ in - newValue().jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute1 - where A0: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name + @inlinable public static func debug(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public var wrappedValue: (A0) -> ReturnType { - get { ClosureAttribute1[name, in: jsObject] } - set { ClosureAttribute1[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!).jsValue - }.jsValue - } + @inlinable public static func error(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) } -} - -@propertyWrapper public final class ClosureAttribute1Optional - where A0: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name + @inlinable public static func info(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public var wrappedValue: ((A0) -> ReturnType)? { - get { ClosureAttribute1Optional[name, in: jsObject] } - set { ClosureAttribute1Optional[name, in: jsObject] = newValue } + @inlinable public static func log(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } + @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) } -} -@propertyWrapper public final class ClosureAttribute1OptionalVoid - where A0: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name + @inlinable public static func trace(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public var wrappedValue: ((A0) -> Void)? { - get { ClosureAttribute1OptionalVoid[name, in: jsObject] } - set { ClosureAttribute1OptionalVoid[name, in: jsObject] = newValue } + @inlinable public static func warn(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue) } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!) - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } + @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) } -} -@propertyWrapper public final class ClosureAttribute1Void - where A0: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name + @inlinable public static func dirxml(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public var wrappedValue: (A0) -> Void { - get { ClosureAttribute1Void[name, in: jsObject] } - set { ClosureAttribute1Void[name, in: jsObject] = newValue } + @inlinable public static func count(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> Void { - get { - let function = jsObject[name].function! - return { function($0.jsValue) } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!) - return .undefined - }.jsValue - } + @inlinable public static func countReset(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) } -} - -@propertyWrapper public final class ClosureAttribute2 - where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name + @inlinable public static func group(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public var wrappedValue: (A0, A1) -> ReturnType { - get { ClosureAttribute2[name, in: jsObject] } - set { ClosureAttribute2[name, in: jsObject] = newValue } + @inlinable public static func groupCollapsed(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue - }.jsValue - } + @inlinable public static func groupEnd() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupEnd].function!(this: this, arguments: []) } -} - -@propertyWrapper public final class ClosureAttribute2Optional - where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name + @inlinable public static func time(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) } - @inlinable public var wrappedValue: ((A0, A1) -> ReturnType)? { - get { ClosureAttribute2Optional[name, in: jsObject] } - set { ClosureAttribute2Optional[name, in: jsObject] = newValue } + @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } + @inlinable public static func timeEnd(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) } } -@propertyWrapper public final class ClosureAttribute2OptionalVoid - where A0: JSValueCompatible, A1: JSValueCompatible -{ +/* variadic generics please */ +@propertyWrapper public final class ClosureAttribute0OptionalVoid { @usableFromInline let jsObject: JSObject @usableFromInline let name: JSString @@ -14568,22 +554,22 @@ public class XSLTProcessor: JSBridgedClass { self.name = name } - @inlinable public var wrappedValue: ((A0, A1) -> Void)? { - get { ClosureAttribute2OptionalVoid[name, in: jsObject] } - set { ClosureAttribute2OptionalVoid[name, in: jsObject] = newValue } + @inlinable public var wrappedValue: (() -> Void)? { + get { ClosureAttribute0OptionalVoid[name, in: jsObject] } + set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> Void)? { + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { get { guard let function = jsObject[name].function else { return nil } - return { function($0.jsValue, $1.jsValue) } + return { function() } } set { if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) + jsObject[name] = JSClosure { _ in + newValue() return .undefined }.jsValue } else { @@ -14593,9 +579,7 @@ public class XSLTProcessor: JSBridgedClass { } } -@propertyWrapper public final class ClosureAttribute2Void - where A0: JSValueCompatible, A1: JSValueCompatible -{ +@propertyWrapper public final class ClosureAttribute0Void { @usableFromInline let jsObject: JSObject @usableFromInline let name: JSString @@ -14604,1484 +588,100 @@ public class XSLTProcessor: JSBridgedClass { self.name = name } - @inlinable public var wrappedValue: (A0, A1) -> Void { - get { ClosureAttribute2Void[name, in: jsObject] } - set { ClosureAttribute2Void[name, in: jsObject] = newValue } + @inlinable public var wrappedValue: () -> Void { + get { ClosureAttribute0Void[name, in: jsObject] } + set { ClosureAttribute0Void[name, in: jsObject] = newValue } } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> Void { + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { get { let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue) } + return { function() } } set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) + jsObject[name] = JSClosure { _ in + newValue() return .undefined }.jsValue } } } -@propertyWrapper public final class ClosureAttribute5 - where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (A0, A1, A2, A3, A4) -> ReturnType { - get { ClosureAttribute5[name, in: jsObject] } - set { ClosureAttribute5[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1, A2, A3, A4) -> ReturnType { - get { - let function = jsObject[name].function! - return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } - } - set { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue - }.jsValue - } - } -} - -@propertyWrapper public final class ClosureAttribute5Optional - where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible -{ - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: ((A0, A1, A2, A3, A4) -> ReturnType)? { - get { ClosureAttribute5Optional[name, in: jsObject] } - set { ClosureAttribute5Optional[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1, A2, A3, A4) -> ReturnType)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { - newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - @usableFromInline enum Strings { static let _self: JSString = "self" - @usableFromInline static let AbortController: JSString = "AbortController" - @usableFromInline static let AbortSignal: JSString = "AbortSignal" - @usableFromInline static let AbstractRange: JSString = "AbstractRange" - @usableFromInline static let AddSearchProvider: JSString = "AddSearchProvider" - @usableFromInline static let Animation: JSString = "Animation" - @usableFromInline static let AnimationEffect: JSString = "AnimationEffect" - @usableFromInline static let AnimationTimeline: JSString = "AnimationTimeline" - @usableFromInline static let Attr: JSString = "Attr" - @usableFromInline static let AudioTrack: JSString = "AudioTrack" - @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" - @usableFromInline static let BarProp: JSString = "BarProp" - @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" - @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" - @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" - @usableFromInline static let CDATASection: JSString = "CDATASection" - @usableFromInline static let Cache: JSString = "Cache" - @usableFromInline static let CacheStorage: JSString = "CacheStorage" - @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" - @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" - @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" - @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" - @usableFromInline static let CharacterData: JSString = "CharacterData" - @usableFromInline static let Comment: JSString = "Comment" - @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" - @usableFromInline static let CountQueuingStrategy: JSString = "CountQueuingStrategy" - @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" - @usableFromInline static let CustomEvent: JSString = "CustomEvent" - @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" - @usableFromInline static let DOMMatrix: JSString = "DOMMatrix" - @usableFromInline static let DOMMatrixReadOnly: JSString = "DOMMatrixReadOnly" - @usableFromInline static let DOMParser: JSString = "DOMParser" - @usableFromInline static let DOMPoint: JSString = "DOMPoint" - @usableFromInline static let DOMPointReadOnly: JSString = "DOMPointReadOnly" - @usableFromInline static let DOMQuad: JSString = "DOMQuad" - @usableFromInline static let DOMRect: JSString = "DOMRect" - @usableFromInline static let DOMRectList: JSString = "DOMRectList" - @usableFromInline static let DOMRectReadOnly: JSString = "DOMRectReadOnly" - @usableFromInline static let DOMStringList: JSString = "DOMStringList" - @usableFromInline static let DOMStringMap: JSString = "DOMStringMap" - @usableFromInline static let DOMTokenList: JSString = "DOMTokenList" - @usableFromInline static let DataTransfer: JSString = "DataTransfer" - @usableFromInline static let DataTransferItem: JSString = "DataTransferItem" - @usableFromInline static let DataTransferItemList: JSString = "DataTransferItemList" - @usableFromInline static let Document: JSString = "Document" - @usableFromInline static let DocumentFragment: JSString = "DocumentFragment" - @usableFromInline static let DocumentTimeline: JSString = "DocumentTimeline" - @usableFromInline static let DocumentType: JSString = "DocumentType" - @usableFromInline static let DragEvent: JSString = "DragEvent" - @usableFromInline static let Element: JSString = "Element" - @usableFromInline static let ElementInternals: JSString = "ElementInternals" - @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" - @usableFromInline static let Event: JSString = "Event" - @usableFromInline static let EventSource: JSString = "EventSource" - @usableFromInline static let EventTarget: JSString = "EventTarget" - @usableFromInline static let External: JSString = "External" - @usableFromInline static let FocusEvent: JSString = "FocusEvent" - @usableFromInline static let FormData: JSString = "FormData" - @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" - @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" - @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" - @usableFromInline static let HTMLAreaElement: JSString = "HTMLAreaElement" - @usableFromInline static let HTMLAudioElement: JSString = "HTMLAudioElement" - @usableFromInline static let HTMLBRElement: JSString = "HTMLBRElement" - @usableFromInline static let HTMLBaseElement: JSString = "HTMLBaseElement" - @usableFromInline static let HTMLBodyElement: JSString = "HTMLBodyElement" - @usableFromInline static let HTMLButtonElement: JSString = "HTMLButtonElement" - @usableFromInline static let HTMLCanvasElement: JSString = "HTMLCanvasElement" - @usableFromInline static let HTMLCollection: JSString = "HTMLCollection" - @usableFromInline static let HTMLDListElement: JSString = "HTMLDListElement" - @usableFromInline static let HTMLDataElement: JSString = "HTMLDataElement" - @usableFromInline static let HTMLDataListElement: JSString = "HTMLDataListElement" - @usableFromInline static let HTMLDetailsElement: JSString = "HTMLDetailsElement" - @usableFromInline static let HTMLDialogElement: JSString = "HTMLDialogElement" - @usableFromInline static let HTMLDirectoryElement: JSString = "HTMLDirectoryElement" - @usableFromInline static let HTMLDivElement: JSString = "HTMLDivElement" - @usableFromInline static let HTMLElement: JSString = "HTMLElement" - @usableFromInline static let HTMLEmbedElement: JSString = "HTMLEmbedElement" - @usableFromInline static let HTMLFieldSetElement: JSString = "HTMLFieldSetElement" - @usableFromInline static let HTMLFontElement: JSString = "HTMLFontElement" - @usableFromInline static let HTMLFormControlsCollection: JSString = "HTMLFormControlsCollection" - @usableFromInline static let HTMLFormElement: JSString = "HTMLFormElement" - @usableFromInline static let HTMLFrameElement: JSString = "HTMLFrameElement" - @usableFromInline static let HTMLFrameSetElement: JSString = "HTMLFrameSetElement" - @usableFromInline static let HTMLHRElement: JSString = "HTMLHRElement" - @usableFromInline static let HTMLHeadElement: JSString = "HTMLHeadElement" - @usableFromInline static let HTMLHeadingElement: JSString = "HTMLHeadingElement" - @usableFromInline static let HTMLHtmlElement: JSString = "HTMLHtmlElement" - @usableFromInline static let HTMLIFrameElement: JSString = "HTMLIFrameElement" - @usableFromInline static let HTMLImageElement: JSString = "HTMLImageElement" - @usableFromInline static let HTMLInputElement: JSString = "HTMLInputElement" - @usableFromInline static let HTMLLIElement: JSString = "HTMLLIElement" - @usableFromInline static let HTMLLabelElement: JSString = "HTMLLabelElement" - @usableFromInline static let HTMLLegendElement: JSString = "HTMLLegendElement" - @usableFromInline static let HTMLLinkElement: JSString = "HTMLLinkElement" - @usableFromInline static let HTMLMapElement: JSString = "HTMLMapElement" - @usableFromInline static let HTMLMarqueeElement: JSString = "HTMLMarqueeElement" - @usableFromInline static let HTMLMediaElement: JSString = "HTMLMediaElement" - @usableFromInline static let HTMLMenuElement: JSString = "HTMLMenuElement" - @usableFromInline static let HTMLMetaElement: JSString = "HTMLMetaElement" - @usableFromInline static let HTMLMeterElement: JSString = "HTMLMeterElement" - @usableFromInline static let HTMLModElement: JSString = "HTMLModElement" - @usableFromInline static let HTMLOListElement: JSString = "HTMLOListElement" - @usableFromInline static let HTMLObjectElement: JSString = "HTMLObjectElement" - @usableFromInline static let HTMLOptGroupElement: JSString = "HTMLOptGroupElement" - @usableFromInline static let HTMLOptionElement: JSString = "HTMLOptionElement" - @usableFromInline static let HTMLOptionsCollection: JSString = "HTMLOptionsCollection" - @usableFromInline static let HTMLOutputElement: JSString = "HTMLOutputElement" - @usableFromInline static let HTMLParagraphElement: JSString = "HTMLParagraphElement" - @usableFromInline static let HTMLParamElement: JSString = "HTMLParamElement" - @usableFromInline static let HTMLPictureElement: JSString = "HTMLPictureElement" - @usableFromInline static let HTMLPreElement: JSString = "HTMLPreElement" - @usableFromInline static let HTMLProgressElement: JSString = "HTMLProgressElement" - @usableFromInline static let HTMLQuoteElement: JSString = "HTMLQuoteElement" - @usableFromInline static let HTMLScriptElement: JSString = "HTMLScriptElement" - @usableFromInline static let HTMLSelectElement: JSString = "HTMLSelectElement" - @usableFromInline static let HTMLSlotElement: JSString = "HTMLSlotElement" - @usableFromInline static let HTMLSourceElement: JSString = "HTMLSourceElement" - @usableFromInline static let HTMLSpanElement: JSString = "HTMLSpanElement" - @usableFromInline static let HTMLStyleElement: JSString = "HTMLStyleElement" - @usableFromInline static let HTMLTableCaptionElement: JSString = "HTMLTableCaptionElement" - @usableFromInline static let HTMLTableCellElement: JSString = "HTMLTableCellElement" - @usableFromInline static let HTMLTableColElement: JSString = "HTMLTableColElement" - @usableFromInline static let HTMLTableElement: JSString = "HTMLTableElement" - @usableFromInline static let HTMLTableRowElement: JSString = "HTMLTableRowElement" - @usableFromInline static let HTMLTableSectionElement: JSString = "HTMLTableSectionElement" - @usableFromInline static let HTMLTemplateElement: JSString = "HTMLTemplateElement" - @usableFromInline static let HTMLTextAreaElement: JSString = "HTMLTextAreaElement" - @usableFromInline static let HTMLTimeElement: JSString = "HTMLTimeElement" - @usableFromInline static let HTMLTitleElement: JSString = "HTMLTitleElement" - @usableFromInline static let HTMLTrackElement: JSString = "HTMLTrackElement" - @usableFromInline static let HTMLUListElement: JSString = "HTMLUListElement" - @usableFromInline static let HTMLUnknownElement: JSString = "HTMLUnknownElement" - @usableFromInline static let HTMLVideoElement: JSString = "HTMLVideoElement" - @usableFromInline static let HashChangeEvent: JSString = "HashChangeEvent" - @usableFromInline static let Headers: JSString = "Headers" - @usableFromInline static let History: JSString = "History" - @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" - @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" - @usableFromInline static let ImageData: JSString = "ImageData" - @usableFromInline static let InputEvent: JSString = "InputEvent" - @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" - @usableFromInline static let KeyboardEvent: JSString = "KeyboardEvent" - @usableFromInline static let KeyframeEffect: JSString = "KeyframeEffect" - @usableFromInline static let Location: JSString = "Location" - @usableFromInline static let MediaError: JSString = "MediaError" - @usableFromInline static let MessageChannel: JSString = "MessageChannel" - @usableFromInline static let MessageEvent: JSString = "MessageEvent" - @usableFromInline static let MessagePort: JSString = "MessagePort" - @usableFromInline static let MimeType: JSString = "MimeType" - @usableFromInline static let MimeTypeArray: JSString = "MimeTypeArray" - @usableFromInline static let MouseEvent: JSString = "MouseEvent" - @usableFromInline static let MutationEvent: JSString = "MutationEvent" - @usableFromInline static let MutationObserver: JSString = "MutationObserver" - @usableFromInline static let MutationRecord: JSString = "MutationRecord" - @usableFromInline static let NamedNodeMap: JSString = "NamedNodeMap" - @usableFromInline static let NavigationPreloadManager: JSString = "NavigationPreloadManager" - @usableFromInline static let Navigator: JSString = "Navigator" - @usableFromInline static let Node: JSString = "Node" - @usableFromInline static let NodeIterator: JSString = "NodeIterator" - @usableFromInline static let NodeList: JSString = "NodeList" + @usableFromInline static let Blob: JSString = "Blob" + @usableFromInline static let DOMException: JSString = "DOMException" + @usableFromInline static let File: JSString = "File" + @usableFromInline static let FileList: JSString = "FileList" + @usableFromInline static let FileReader: JSString = "FileReader" @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" - @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" - @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" - @usableFromInline static let Path2D: JSString = "Path2D" - @usableFromInline static let Performance: JSString = "Performance" - @usableFromInline static let Plugin: JSString = "Plugin" - @usableFromInline static let PluginArray: JSString = "PluginArray" - @usableFromInline static let PopStateEvent: JSString = "PopStateEvent" - @usableFromInline static let ProcessingInstruction: JSString = "ProcessingInstruction" - @usableFromInline static let ProgressEvent: JSString = "ProgressEvent" - @usableFromInline static let PromiseRejectionEvent: JSString = "PromiseRejectionEvent" - @usableFromInline static let RadioNodeList: JSString = "RadioNodeList" - @usableFromInline static let Range: JSString = "Range" - @usableFromInline static let ReadableByteStreamController: JSString = "ReadableByteStreamController" - @usableFromInline static let ReadableStream: JSString = "ReadableStream" - @usableFromInline static let ReadableStreamBYOBReader: JSString = "ReadableStreamBYOBReader" - @usableFromInline static let ReadableStreamBYOBRequest: JSString = "ReadableStreamBYOBRequest" - @usableFromInline static let ReadableStreamDefaultController: JSString = "ReadableStreamDefaultController" - @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" - @usableFromInline static let Request: JSString = "Request" - @usableFromInline static let Response: JSString = "Response" - @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" - @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" - @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" - @usableFromInline static let ShadowRoot: JSString = "ShadowRoot" - @usableFromInline static let SharedWorker: JSString = "SharedWorker" - @usableFromInline static let StaticRange: JSString = "StaticRange" - @usableFromInline static let Storage: JSString = "Storage" - @usableFromInline static let StorageEvent: JSString = "StorageEvent" - @usableFromInline static let SubmitEvent: JSString = "SubmitEvent" - @usableFromInline static let Text: JSString = "Text" - @usableFromInline static let TextMetrics: JSString = "TextMetrics" - @usableFromInline static let TextTrack: JSString = "TextTrack" - @usableFromInline static let TextTrackCue: JSString = "TextTrackCue" - @usableFromInline static let TextTrackCueList: JSString = "TextTrackCueList" - @usableFromInline static let TextTrackList: JSString = "TextTrackList" - @usableFromInline static let TimeRanges: JSString = "TimeRanges" - @usableFromInline static let TrackEvent: JSString = "TrackEvent" - @usableFromInline static let TransformStream: JSString = "TransformStream" - @usableFromInline static let TransformStreamDefaultController: JSString = "TransformStreamDefaultController" - @usableFromInline static let TreeWalker: JSString = "TreeWalker" - @usableFromInline static let UIEvent: JSString = "UIEvent" @usableFromInline static let URL: JSString = "URL" - @usableFromInline static let ValidityState: JSString = "ValidityState" - @usableFromInline static let VideoTrack: JSString = "VideoTrack" - @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" - @usableFromInline static let WheelEvent: JSString = "WheelEvent" - @usableFromInline static let Window: JSString = "Window" - @usableFromInline static let Worker: JSString = "Worker" - @usableFromInline static let Worklet: JSString = "Worklet" - @usableFromInline static let WritableStream: JSString = "WritableStream" - @usableFromInline static let WritableStreamDefaultController: JSString = "WritableStreamDefaultController" - @usableFromInline static let WritableStreamDefaultWriter: JSString = "WritableStreamDefaultWriter" - @usableFromInline static let XMLDocument: JSString = "XMLDocument" - @usableFromInline static let XMLHttpRequest: JSString = "XMLHttpRequest" - @usableFromInline static let XMLHttpRequestEventTarget: JSString = "XMLHttpRequestEventTarget" - @usableFromInline static let XMLHttpRequestUpload: JSString = "XMLHttpRequestUpload" - @usableFromInline static let XPathEvaluator: JSString = "XPathEvaluator" - @usableFromInline static let XPathExpression: JSString = "XPathExpression" - @usableFromInline static let XPathResult: JSString = "XPathResult" - @usableFromInline static let XSLTProcessor: JSString = "XSLTProcessor" - @usableFromInline static let a: JSString = "a" - @usableFromInline static let aLink: JSString = "aLink" - @usableFromInline static let abbr: JSString = "abbr" + @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" @usableFromInline static let abort: JSString = "abort" - @usableFromInline static let aborted: JSString = "aborted" - @usableFromInline static let accept: JSString = "accept" - @usableFromInline static let acceptCharset: JSString = "acceptCharset" - @usableFromInline static let accessKey: JSString = "accessKey" - @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" - @usableFromInline static let action: JSString = "action" - @usableFromInline static let active: JSString = "active" - @usableFromInline static let activeCues: JSString = "activeCues" - @usableFromInline static let activeElement: JSString = "activeElement" - @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" - @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" - @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" - @usableFromInline static let actualBoundingBoxRight: JSString = "actualBoundingBoxRight" - @usableFromInline static let add: JSString = "add" - @usableFromInline static let addAll: JSString = "addAll" - @usableFromInline static let addColorStop: JSString = "addColorStop" - @usableFromInline static let addCue: JSString = "addCue" - @usableFromInline static let addModule: JSString = "addModule" - @usableFromInline static let addPath: JSString = "addPath" - @usableFromInline static let addTextTrack: JSString = "addTextTrack" - @usableFromInline static let addedNodes: JSString = "addedNodes" - @usableFromInline static let adoptNode: JSString = "adoptNode" - @usableFromInline static let after: JSString = "after" - @usableFromInline static let alert: JSString = "alert" - @usableFromInline static let align: JSString = "align" - @usableFromInline static let alinkColor: JSString = "alinkColor" - @usableFromInline static let all: JSString = "all" - @usableFromInline static let allow: JSString = "allow" - @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" - @usableFromInline static let alpha: JSString = "alpha" - @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" - @usableFromInline static let alt: JSString = "alt" - @usableFromInline static let altKey: JSString = "altKey" - @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" - @usableFromInline static let anchors: JSString = "anchors" - @usableFromInline static let animate: JSString = "animate" - @usableFromInline static let appCodeName: JSString = "appCodeName" - @usableFromInline static let appName: JSString = "appName" - @usableFromInline static let appVersion: JSString = "appVersion" @usableFromInline static let append: JSString = "append" - @usableFromInline static let appendChild: JSString = "appendChild" - @usableFromInline static let appendData: JSString = "appendData" - @usableFromInline static let applets: JSString = "applets" - @usableFromInline static let arc: JSString = "arc" - @usableFromInline static let arcTo: JSString = "arcTo" - @usableFromInline static let archive: JSString = "archive" - @usableFromInline static let areas: JSString = "areas" - @usableFromInline static let ariaAtomic: JSString = "ariaAtomic" - @usableFromInline static let ariaAutoComplete: JSString = "ariaAutoComplete" - @usableFromInline static let ariaBusy: JSString = "ariaBusy" - @usableFromInline static let ariaChecked: JSString = "ariaChecked" - @usableFromInline static let ariaColCount: JSString = "ariaColCount" - @usableFromInline static let ariaColIndex: JSString = "ariaColIndex" - @usableFromInline static let ariaColIndexText: JSString = "ariaColIndexText" - @usableFromInline static let ariaColSpan: JSString = "ariaColSpan" - @usableFromInline static let ariaCurrent: JSString = "ariaCurrent" - @usableFromInline static let ariaDescription: JSString = "ariaDescription" - @usableFromInline static let ariaDisabled: JSString = "ariaDisabled" - @usableFromInline static let ariaExpanded: JSString = "ariaExpanded" - @usableFromInline static let ariaHasPopup: JSString = "ariaHasPopup" - @usableFromInline static let ariaHidden: JSString = "ariaHidden" - @usableFromInline static let ariaInvalid: JSString = "ariaInvalid" - @usableFromInline static let ariaKeyShortcuts: JSString = "ariaKeyShortcuts" - @usableFromInline static let ariaLabel: JSString = "ariaLabel" - @usableFromInline static let ariaLevel: JSString = "ariaLevel" - @usableFromInline static let ariaLive: JSString = "ariaLive" - @usableFromInline static let ariaModal: JSString = "ariaModal" - @usableFromInline static let ariaMultiLine: JSString = "ariaMultiLine" - @usableFromInline static let ariaMultiSelectable: JSString = "ariaMultiSelectable" - @usableFromInline static let ariaOrientation: JSString = "ariaOrientation" - @usableFromInline static let ariaPlaceholder: JSString = "ariaPlaceholder" - @usableFromInline static let ariaPosInSet: JSString = "ariaPosInSet" - @usableFromInline static let ariaPressed: JSString = "ariaPressed" - @usableFromInline static let ariaReadOnly: JSString = "ariaReadOnly" - @usableFromInline static let ariaRequired: JSString = "ariaRequired" - @usableFromInline static let ariaRoleDescription: JSString = "ariaRoleDescription" - @usableFromInline static let ariaRowCount: JSString = "ariaRowCount" - @usableFromInline static let ariaRowIndex: JSString = "ariaRowIndex" - @usableFromInline static let ariaRowIndexText: JSString = "ariaRowIndexText" - @usableFromInline static let ariaRowSpan: JSString = "ariaRowSpan" - @usableFromInline static let ariaSelected: JSString = "ariaSelected" - @usableFromInline static let ariaSetSize: JSString = "ariaSetSize" - @usableFromInline static let ariaSort: JSString = "ariaSort" - @usableFromInline static let ariaValueMax: JSString = "ariaValueMax" - @usableFromInline static let ariaValueMin: JSString = "ariaValueMin" - @usableFromInline static let ariaValueNow: JSString = "ariaValueNow" - @usableFromInline static let ariaValueText: JSString = "ariaValueText" @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" - @usableFromInline static let `as`: JSString = "as" - @usableFromInline static let assign: JSString = "assign" - @usableFromInline static let assignedElements: JSString = "assignedElements" - @usableFromInline static let assignedNodes: JSString = "assignedNodes" - @usableFromInline static let assignedSlot: JSString = "assignedSlot" - @usableFromInline static let async: JSString = "async" - @usableFromInline static let atob: JSString = "atob" - @usableFromInline static let attachInternals: JSString = "attachInternals" - @usableFromInline static let attachShadow: JSString = "attachShadow" - @usableFromInline static let attrChange: JSString = "attrChange" - @usableFromInline static let attrName: JSString = "attrName" - @usableFromInline static let attributeFilter: JSString = "attributeFilter" - @usableFromInline static let attributeName: JSString = "attributeName" - @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" - @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" - @usableFromInline static let attributes: JSString = "attributes" - @usableFromInline static let audioTracks: JSString = "audioTracks" - @usableFromInline static let autoAllocateChunkSize: JSString = "autoAllocateChunkSize" - @usableFromInline static let autocapitalize: JSString = "autocapitalize" - @usableFromInline static let autocomplete: JSString = "autocomplete" - @usableFromInline static let autofocus: JSString = "autofocus" - @usableFromInline static let autoplay: JSString = "autoplay" - @usableFromInline static let axis: JSString = "axis" - @usableFromInline static let b: JSString = "b" - @usableFromInline static let back: JSString = "back" - @usableFromInline static let background: JSString = "background" - @usableFromInline static let badInput: JSString = "badInput" - @usableFromInline static let baseURI: JSString = "baseURI" - @usableFromInline static let before: JSString = "before" - @usableFromInline static let beginPath: JSString = "beginPath" - @usableFromInline static let behavior: JSString = "behavior" - @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" - @usableFromInline static let bgColor: JSString = "bgColor" - @usableFromInline static let blob: JSString = "blob" - @usableFromInline static let blocking: JSString = "blocking" - @usableFromInline static let blur: JSString = "blur" - @usableFromInline static let body: JSString = "body" - @usableFromInline static let bodyUsed: JSString = "bodyUsed" - @usableFromInline static let booleanValue: JSString = "booleanValue" - @usableFromInline static let border: JSString = "border" - @usableFromInline static let bottom: JSString = "bottom" - @usableFromInline static let btoa: JSString = "btoa" - @usableFromInline static let bubbles: JSString = "bubbles" - @usableFromInline static let buffered: JSString = "buffered" - @usableFromInline static let button: JSString = "button" - @usableFromInline static let buttons: JSString = "buttons" - @usableFromInline static let byobRequest: JSString = "byobRequest" - @usableFromInline static let c: JSString = "c" - @usableFromInline static let cache: JSString = "cache" - @usableFromInline static let cacheName: JSString = "cacheName" - @usableFromInline static let caches: JSString = "caches" - @usableFromInline static let canPlayType: JSString = "canPlayType" - @usableFromInline static let cancel: JSString = "cancel" - @usableFromInline static let cancelAnimationFrame: JSString = "cancelAnimationFrame" - @usableFromInline static let cancelBubble: JSString = "cancelBubble" - @usableFromInline static let cancelable: JSString = "cancelable" - @usableFromInline static let canvas: JSString = "canvas" - @usableFromInline static let caption: JSString = "caption" - @usableFromInline static let capture: JSString = "capture" - @usableFromInline static let captureEvents: JSString = "captureEvents" - @usableFromInline static let cellIndex: JSString = "cellIndex" - @usableFromInline static let cellPadding: JSString = "cellPadding" - @usableFromInline static let cellSpacing: JSString = "cellSpacing" - @usableFromInline static let cells: JSString = "cells" - @usableFromInline static let ch: JSString = "ch" - @usableFromInline static let chOff: JSString = "chOff" - @usableFromInline static let charCode: JSString = "charCode" - @usableFromInline static let characterData: JSString = "characterData" - @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" - @usableFromInline static let characterSet: JSString = "characterSet" - @usableFromInline static let charset: JSString = "charset" - @usableFromInline static let checkValidity: JSString = "checkValidity" - @usableFromInline static let checked: JSString = "checked" - @usableFromInline static let childElementCount: JSString = "childElementCount" - @usableFromInline static let childList: JSString = "childList" - @usableFromInline static let childNodes: JSString = "childNodes" - @usableFromInline static let children: JSString = "children" - @usableFromInline static let cite: JSString = "cite" - @usableFromInline static let classList: JSString = "classList" - @usableFromInline static let className: JSString = "className" + @usableFromInline static let assert: JSString = "assert" @usableFromInline static let clear: JSString = "clear" - @usableFromInline static let clearData: JSString = "clearData" - @usableFromInline static let clearInterval: JSString = "clearInterval" - @usableFromInline static let clearParameters: JSString = "clearParameters" - @usableFromInline static let clearRect: JSString = "clearRect" - @usableFromInline static let clearTimeout: JSString = "clearTimeout" - @usableFromInline static let click: JSString = "click" - @usableFromInline static let clientId: JSString = "clientId" - @usableFromInline static let clientInformation: JSString = "clientInformation" - @usableFromInline static let clientX: JSString = "clientX" - @usableFromInline static let clientY: JSString = "clientY" - @usableFromInline static let clip: JSString = "clip" - @usableFromInline static let clone: JSString = "clone" - @usableFromInline static let cloneContents: JSString = "cloneContents" - @usableFromInline static let cloneNode: JSString = "cloneNode" - @usableFromInline static let cloneRange: JSString = "cloneRange" - @usableFromInline static let close: JSString = "close" - @usableFromInline static let closePath: JSString = "closePath" - @usableFromInline static let closed: JSString = "closed" - @usableFromInline static let closest: JSString = "closest" @usableFromInline static let code: JSString = "code" - @usableFromInline static let codeBase: JSString = "codeBase" - @usableFromInline static let codeType: JSString = "codeType" - @usableFromInline static let colSpan: JSString = "colSpan" - @usableFromInline static let collapse: JSString = "collapse" - @usableFromInline static let collapsed: JSString = "collapsed" - @usableFromInline static let colno: JSString = "colno" - @usableFromInline static let color: JSString = "color" - @usableFromInline static let colorSpace: JSString = "colorSpace" - @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" - @usableFromInline static let cols: JSString = "cols" - @usableFromInline static let commit: JSString = "commit" - @usableFromInline static let commitStyles: JSString = "commitStyles" - @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" - @usableFromInline static let compact: JSString = "compact" - @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" - @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" - @usableFromInline static let comparePoint: JSString = "comparePoint" - @usableFromInline static let compatMode: JSString = "compatMode" - @usableFromInline static let complete: JSString = "complete" - @usableFromInline static let composed: JSString = "composed" - @usableFromInline static let composedPath: JSString = "composedPath" - @usableFromInline static let composite: JSString = "composite" - @usableFromInline static let computedOffset: JSString = "computedOffset" - @usableFromInline static let confirm: JSString = "confirm" - @usableFromInline static let contains: JSString = "contains" - @usableFromInline static let content: JSString = "content" - @usableFromInline static let contentDocument: JSString = "contentDocument" - @usableFromInline static let contentEditable: JSString = "contentEditable" - @usableFromInline static let contentType: JSString = "contentType" - @usableFromInline static let contentWindow: JSString = "contentWindow" - @usableFromInline static let control: JSString = "control" - @usableFromInline static let controller: JSString = "controller" - @usableFromInline static let controls: JSString = "controls" - @usableFromInline static let convertToBlob: JSString = "convertToBlob" - @usableFromInline static let cookie: JSString = "cookie" - @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" - @usableFromInline static let coords: JSString = "coords" - @usableFromInline static let createAttribute: JSString = "createAttribute" - @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" - @usableFromInline static let createCDATASection: JSString = "createCDATASection" - @usableFromInline static let createCaption: JSString = "createCaption" - @usableFromInline static let createComment: JSString = "createComment" - @usableFromInline static let createConicGradient: JSString = "createConicGradient" - @usableFromInline static let createDocument: JSString = "createDocument" - @usableFromInline static let createDocumentFragment: JSString = "createDocumentFragment" - @usableFromInline static let createDocumentType: JSString = "createDocumentType" - @usableFromInline static let createElement: JSString = "createElement" - @usableFromInline static let createElementNS: JSString = "createElementNS" - @usableFromInline static let createEvent: JSString = "createEvent" - @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" - @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" - @usableFromInline static let createImageData: JSString = "createImageData" - @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" - @usableFromInline static let createPattern: JSString = "createPattern" - @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" - @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" - @usableFromInline static let createRange: JSString = "createRange" - @usableFromInline static let createTBody: JSString = "createTBody" - @usableFromInline static let createTFoot: JSString = "createTFoot" - @usableFromInline static let createTHead: JSString = "createTHead" - @usableFromInline static let createTextNode: JSString = "createTextNode" - @usableFromInline static let credentials: JSString = "credentials" - @usableFromInline static let crossOrigin: JSString = "crossOrigin" - @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" - @usableFromInline static let ctrlKey: JSString = "ctrlKey" - @usableFromInline static let cues: JSString = "cues" - @usableFromInline static let currentIteration: JSString = "currentIteration" - @usableFromInline static let currentNode: JSString = "currentNode" - @usableFromInline static let currentScript: JSString = "currentScript" - @usableFromInline static let currentSrc: JSString = "currentSrc" - @usableFromInline static let currentTarget: JSString = "currentTarget" - @usableFromInline static let currentTime: JSString = "currentTime" - @usableFromInline static let customElements: JSString = "customElements" - @usableFromInline static let customError: JSString = "customError" - @usableFromInline static let d: JSString = "d" - @usableFromInline static let data: JSString = "data" - @usableFromInline static let dataTransfer: JSString = "dataTransfer" - @usableFromInline static let dataset: JSString = "dataset" - @usableFromInline static let dateTime: JSString = "dateTime" - @usableFromInline static let declare: JSString = "declare" - @usableFromInline static let decode: JSString = "decode" - @usableFromInline static let decoding: JSString = "decoding" - @usableFromInline static let `default`: JSString = "default" - @usableFromInline static let defaultChecked: JSString = "defaultChecked" - @usableFromInline static let defaultMuted: JSString = "defaultMuted" - @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" - @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" - @usableFromInline static let defaultSelected: JSString = "defaultSelected" - @usableFromInline static let defaultValue: JSString = "defaultValue" - @usableFromInline static let defaultView: JSString = "defaultView" - @usableFromInline static let `defer`: JSString = "defer" - @usableFromInline static let define: JSString = "define" - @usableFromInline static let delay: JSString = "delay" - @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" + @usableFromInline static let console: JSString = "console" + @usableFromInline static let count: JSString = "count" + @usableFromInline static let countReset: JSString = "countReset" + @usableFromInline static let createObjectURL: JSString = "createObjectURL" + @usableFromInline static let debug: JSString = "debug" @usableFromInline static let delete: JSString = "delete" - @usableFromInline static let deleteCaption: JSString = "deleteCaption" - @usableFromInline static let deleteCell: JSString = "deleteCell" - @usableFromInline static let deleteContents: JSString = "deleteContents" - @usableFromInline static let deleteData: JSString = "deleteData" - @usableFromInline static let deleteRow: JSString = "deleteRow" - @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" - @usableFromInline static let deleteTHead: JSString = "deleteTHead" - @usableFromInline static let deltaMode: JSString = "deltaMode" - @usableFromInline static let deltaX: JSString = "deltaX" - @usableFromInline static let deltaY: JSString = "deltaY" - @usableFromInline static let deltaZ: JSString = "deltaZ" - @usableFromInline static let description: JSString = "description" - @usableFromInline static let designMode: JSString = "designMode" - @usableFromInline static let desiredSize: JSString = "desiredSize" - @usableFromInline static let destination: JSString = "destination" - @usableFromInline static let desynchronized: JSString = "desynchronized" - @usableFromInline static let detach: JSString = "detach" - @usableFromInline static let detail: JSString = "detail" @usableFromInline static let dir: JSString = "dir" - @usableFromInline static let dirName: JSString = "dirName" - @usableFromInline static let direction: JSString = "direction" - @usableFromInline static let disable: JSString = "disable" - @usableFromInline static let disabled: JSString = "disabled" - @usableFromInline static let disconnect: JSString = "disconnect" - @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" - @usableFromInline static let doctype: JSString = "doctype" - @usableFromInline static let document: JSString = "document" - @usableFromInline static let documentElement: JSString = "documentElement" - @usableFromInline static let documentURI: JSString = "documentURI" - @usableFromInline static let domain: JSString = "domain" - @usableFromInline static let done: JSString = "done" - @usableFromInline static let download: JSString = "download" - @usableFromInline static let draggable: JSString = "draggable" - @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" - @usableFromInline static let drawImage: JSString = "drawImage" - @usableFromInline static let dropEffect: JSString = "dropEffect" - @usableFromInline static let duration: JSString = "duration" - @usableFromInline static let e: JSString = "e" - @usableFromInline static let easing: JSString = "easing" - @usableFromInline static let effect: JSString = "effect" - @usableFromInline static let effectAllowed: JSString = "effectAllowed" - @usableFromInline static let elements: JSString = "elements" - @usableFromInline static let ellipse: JSString = "ellipse" - @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" - @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" - @usableFromInline static let embeds: JSString = "embeds" - @usableFromInline static let enable: JSString = "enable" - @usableFromInline static let enabled: JSString = "enabled" - @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" - @usableFromInline static let encoding: JSString = "encoding" - @usableFromInline static let enctype: JSString = "enctype" - @usableFromInline static let end: JSString = "end" - @usableFromInline static let endContainer: JSString = "endContainer" - @usableFromInline static let endDelay: JSString = "endDelay" - @usableFromInline static let endOffset: JSString = "endOffset" - @usableFromInline static let endTime: JSString = "endTime" - @usableFromInline static let ended: JSString = "ended" - @usableFromInline static let enqueue: JSString = "enqueue" - @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" + @usableFromInline static let dirxml: JSString = "dirxml" + @usableFromInline static let endings: JSString = "endings" @usableFromInline static let error: JSString = "error" - @usableFromInline static let evaluate: JSString = "evaluate" - @usableFromInline static let event: JSString = "event" - @usableFromInline static let eventPhase: JSString = "eventPhase" - @usableFromInline static let execCommand: JSString = "execCommand" - @usableFromInline static let extends: JSString = "extends" - @usableFromInline static let external: JSString = "external" - @usableFromInline static let extractContents: JSString = "extractContents" - @usableFromInline static let f: JSString = "f" - @usableFromInline static let face: JSString = "face" - @usableFromInline static let fastSeek: JSString = "fastSeek" - @usableFromInline static let fetch: JSString = "fetch" - @usableFromInline static let fgColor: JSString = "fgColor" - @usableFromInline static let filename: JSString = "filename" - @usableFromInline static let files: JSString = "files" - @usableFromInline static let fill: JSString = "fill" - @usableFromInline static let fillRect: JSString = "fillRect" - @usableFromInline static let fillStyle: JSString = "fillStyle" - @usableFromInline static let fillText: JSString = "fillText" - @usableFromInline static let filter: JSString = "filter" - @usableFromInline static let finish: JSString = "finish" - @usableFromInline static let finished: JSString = "finished" - @usableFromInline static let firstChild: JSString = "firstChild" - @usableFromInline static let firstElementChild: JSString = "firstElementChild" - @usableFromInline static let flatten: JSString = "flatten" - @usableFromInline static let flipX: JSString = "flipX" - @usableFromInline static let flipY: JSString = "flipY" - @usableFromInline static let flush: JSString = "flush" - @usableFromInline static let focus: JSString = "focus" - @usableFromInline static let font: JSString = "font" - @usableFromInline static let fontBoundingBoxAscent: JSString = "fontBoundingBoxAscent" - @usableFromInline static let fontBoundingBoxDescent: JSString = "fontBoundingBoxDescent" - @usableFromInline static let fontKerning: JSString = "fontKerning" - @usableFromInline static let fontStretch: JSString = "fontStretch" - @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" - @usableFromInline static let form: JSString = "form" - @usableFromInline static let formAction: JSString = "formAction" - @usableFromInline static let formData: JSString = "formData" - @usableFromInline static let formEnctype: JSString = "formEnctype" - @usableFromInline static let formMethod: JSString = "formMethod" - @usableFromInline static let formNoValidate: JSString = "formNoValidate" - @usableFromInline static let formTarget: JSString = "formTarget" - @usableFromInline static let forms: JSString = "forms" - @usableFromInline static let forward: JSString = "forward" - @usableFromInline static let frame: JSString = "frame" - @usableFromInline static let frameBorder: JSString = "frameBorder" - @usableFromInline static let frameElement: JSString = "frameElement" - @usableFromInline static let frames: JSString = "frames" - @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" - @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" - @usableFromInline static let fromMatrix: JSString = "fromMatrix" - @usableFromInline static let fromPoint: JSString = "fromPoint" - @usableFromInline static let fromQuad: JSString = "fromQuad" - @usableFromInline static let fromRect: JSString = "fromRect" @usableFromInline static let get: JSString = "get" @usableFromInline static let getAll: JSString = "getAll" - @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" - @usableFromInline static let getAnimations: JSString = "getAnimations" - @usableFromInline static let getAsFile: JSString = "getAsFile" - @usableFromInline static let getAttribute: JSString = "getAttribute" - @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" - @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" - @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" - @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" - @usableFromInline static let getBounds: JSString = "getBounds" - @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" - @usableFromInline static let getContext: JSString = "getContext" - @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" - @usableFromInline static let getCueById: JSString = "getCueById" - @usableFromInline static let getData: JSString = "getData" - @usableFromInline static let getElementById: JSString = "getElementById" - @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" - @usableFromInline static let getElementsByName: JSString = "getElementsByName" - @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" - @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" - @usableFromInline static let getImageData: JSString = "getImageData" - @usableFromInline static let getKeyframes: JSString = "getKeyframes" - @usableFromInline static let getLineDash: JSString = "getLineDash" - @usableFromInline static let getModifierState: JSString = "getModifierState" - @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" - @usableFromInline static let getParameter: JSString = "getParameter" - @usableFromInline static let getReader: JSString = "getReader" - @usableFromInline static let getRegistration: JSString = "getRegistration" - @usableFromInline static let getRegistrations: JSString = "getRegistrations" - @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" - @usableFromInline static let getRootNode: JSString = "getRootNode" - @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" - @usableFromInline static let getStartDate: JSString = "getStartDate" - @usableFromInline static let getState: JSString = "getState" - @usableFromInline static let getTiming: JSString = "getTiming" - @usableFromInline static let getTrackById: JSString = "getTrackById" - @usableFromInline static let getTransform: JSString = "getTransform" - @usableFromInline static let getWriter: JSString = "getWriter" - @usableFromInline static let globalAlpha: JSString = "globalAlpha" - @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" - @usableFromInline static let go: JSString = "go" - @usableFromInline static let handled: JSString = "handled" - @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" - @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" + @usableFromInline static let group: JSString = "group" + @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" + @usableFromInline static let groupEnd: JSString = "groupEnd" @usableFromInline static let has: JSString = "has" - @usableFromInline static let hasAttribute: JSString = "hasAttribute" - @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" - @usableFromInline static let hasAttributes: JSString = "hasAttributes" - @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" - @usableFromInline static let hasFeature: JSString = "hasFeature" - @usableFromInline static let hasFocus: JSString = "hasFocus" @usableFromInline static let hash: JSString = "hash" - @usableFromInline static let head: JSString = "head" - @usableFromInline static let headerValue: JSString = "headerValue" - @usableFromInline static let headers: JSString = "headers" - @usableFromInline static let height: JSString = "height" - @usableFromInline static let hidden: JSString = "hidden" - @usableFromInline static let high: JSString = "high" - @usableFromInline static let highWaterMark: JSString = "highWaterMark" - @usableFromInline static let history: JSString = "history" @usableFromInline static let host: JSString = "host" @usableFromInline static let hostname: JSString = "hostname" @usableFromInline static let href: JSString = "href" - @usableFromInline static let hreflang: JSString = "hreflang" - @usableFromInline static let hspace: JSString = "hspace" - @usableFromInline static let htmlFor: JSString = "htmlFor" - @usableFromInline static let httpEquiv: JSString = "httpEquiv" - @usableFromInline static let id: JSString = "id" - @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" - @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" - @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" - @usableFromInline static let ignoreVary: JSString = "ignoreVary" - @usableFromInline static let imageOrientation: JSString = "imageOrientation" - @usableFromInline static let imageSizes: JSString = "imageSizes" - @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" - @usableFromInline static let imageSmoothingQuality: JSString = "imageSmoothingQuality" - @usableFromInline static let imageSrcset: JSString = "imageSrcset" - @usableFromInline static let images: JSString = "images" - @usableFromInline static let implementation: JSString = "implementation" - @usableFromInline static let importNode: JSString = "importNode" - @usableFromInline static let importStylesheet: JSString = "importStylesheet" - @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" - @usableFromInline static let includeUncontrolled: JSString = "includeUncontrolled" - @usableFromInline static let indeterminate: JSString = "indeterminate" - @usableFromInline static let index: JSString = "index" - @usableFromInline static let inert: JSString = "inert" - @usableFromInline static let initCompositionEvent: JSString = "initCompositionEvent" - @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" - @usableFromInline static let initEvent: JSString = "initEvent" - @usableFromInline static let initKeyboardEvent: JSString = "initKeyboardEvent" - @usableFromInline static let initMessageEvent: JSString = "initMessageEvent" - @usableFromInline static let initMouseEvent: JSString = "initMouseEvent" - @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" - @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" - @usableFromInline static let initUIEvent: JSString = "initUIEvent" - @usableFromInline static let innerText: JSString = "innerText" - @usableFromInline static let inputEncoding: JSString = "inputEncoding" - @usableFromInline static let inputMode: JSString = "inputMode" - @usableFromInline static let inputType: JSString = "inputType" - @usableFromInline static let insertAdjacentElement: JSString = "insertAdjacentElement" - @usableFromInline static let insertAdjacentText: JSString = "insertAdjacentText" - @usableFromInline static let insertBefore: JSString = "insertBefore" - @usableFromInline static let insertCell: JSString = "insertCell" - @usableFromInline static let insertData: JSString = "insertData" - @usableFromInline static let insertNode: JSString = "insertNode" - @usableFromInline static let insertRow: JSString = "insertRow" - @usableFromInline static let installing: JSString = "installing" - @usableFromInline static let integrity: JSString = "integrity" - @usableFromInline static let intersectsNode: JSString = "intersectsNode" - @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" - @usableFromInline static let inverse: JSString = "inverse" - @usableFromInline static let invertSelf: JSString = "invertSelf" - @usableFromInline static let `is`: JSString = "is" - @usableFromInline static let is2D: JSString = "is2D" - @usableFromInline static let isComposing: JSString = "isComposing" - @usableFromInline static let isConnected: JSString = "isConnected" - @usableFromInline static let isContentEditable: JSString = "isContentEditable" - @usableFromInline static let isContextLost: JSString = "isContextLost" - @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" - @usableFromInline static let isEqualNode: JSString = "isEqualNode" - @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" - @usableFromInline static let isIdentity: JSString = "isIdentity" - @usableFromInline static let isMap: JSString = "isMap" - @usableFromInline static let isPointInPath: JSString = "isPointInPath" - @usableFromInline static let isPointInRange: JSString = "isPointInRange" - @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" - @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" - @usableFromInline static let isSameNode: JSString = "isSameNode" - @usableFromInline static let isSecureContext: JSString = "isSecureContext" - @usableFromInline static let isTrusted: JSString = "isTrusted" - @usableFromInline static let item: JSString = "item" - @usableFromInline static let items: JSString = "items" - @usableFromInline static let iterateNext: JSString = "iterateNext" - @usableFromInline static let iterationStart: JSString = "iterationStart" - @usableFromInline static let iterations: JSString = "iterations" - @usableFromInline static let javaEnabled: JSString = "javaEnabled" - @usableFromInline static let json: JSString = "json" - @usableFromInline static let keepalive: JSString = "keepalive" - @usableFromInline static let key: JSString = "key" - @usableFromInline static let keyCode: JSString = "keyCode" - @usableFromInline static let keys: JSString = "keys" - @usableFromInline static let kind: JSString = "kind" - @usableFromInline static let label: JSString = "label" - @usableFromInline static let labels: JSString = "labels" - @usableFromInline static let lang: JSString = "lang" - @usableFromInline static let language: JSString = "language" - @usableFromInline static let languages: JSString = "languages" - @usableFromInline static let lastChild: JSString = "lastChild" - @usableFromInline static let lastElementChild: JSString = "lastElementChild" - @usableFromInline static let lastEventId: JSString = "lastEventId" + @usableFromInline static let info: JSString = "info" @usableFromInline static let lastModified: JSString = "lastModified" - @usableFromInline static let left: JSString = "left" @usableFromInline static let length: JSString = "length" - @usableFromInline static let lengthComputable: JSString = "lengthComputable" - @usableFromInline static let letterSpacing: JSString = "letterSpacing" - @usableFromInline static let lineCap: JSString = "lineCap" - @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" - @usableFromInline static let lineJoin: JSString = "lineJoin" - @usableFromInline static let lineTo: JSString = "lineTo" - @usableFromInline static let lineWidth: JSString = "lineWidth" - @usableFromInline static let lineno: JSString = "lineno" - @usableFromInline static let link: JSString = "link" - @usableFromInline static let linkColor: JSString = "linkColor" - @usableFromInline static let links: JSString = "links" - @usableFromInline static let list: JSString = "list" - @usableFromInline static let load: JSString = "load" - @usableFromInline static let loaded: JSString = "loaded" - @usableFromInline static let loading: JSString = "loading" - @usableFromInline static let localName: JSString = "localName" - @usableFromInline static let localStorage: JSString = "localStorage" - @usableFromInline static let location: JSString = "location" - @usableFromInline static let locationbar: JSString = "locationbar" - @usableFromInline static let locked: JSString = "locked" - @usableFromInline static let longDesc: JSString = "longDesc" - @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" - @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" - @usableFromInline static let loop: JSString = "loop" - @usableFromInline static let low: JSString = "low" - @usableFromInline static let lowsrc: JSString = "lowsrc" - @usableFromInline static let m11: JSString = "m11" - @usableFromInline static let m12: JSString = "m12" - @usableFromInline static let m13: JSString = "m13" - @usableFromInline static let m14: JSString = "m14" - @usableFromInline static let m21: JSString = "m21" - @usableFromInline static let m22: JSString = "m22" - @usableFromInline static let m23: JSString = "m23" - @usableFromInline static let m24: JSString = "m24" - @usableFromInline static let m31: JSString = "m31" - @usableFromInline static let m32: JSString = "m32" - @usableFromInline static let m33: JSString = "m33" - @usableFromInline static let m34: JSString = "m34" - @usableFromInline static let m41: JSString = "m41" - @usableFromInline static let m42: JSString = "m42" - @usableFromInline static let m43: JSString = "m43" - @usableFromInline static let m44: JSString = "m44" - @usableFromInline static let marginHeight: JSString = "marginHeight" - @usableFromInline static let marginWidth: JSString = "marginWidth" - @usableFromInline static let match: JSString = "match" - @usableFromInline static let matchAll: JSString = "matchAll" - @usableFromInline static let matches: JSString = "matches" - @usableFromInline static let matrixTransform: JSString = "matrixTransform" - @usableFromInline static let max: JSString = "max" - @usableFromInline static let maxLength: JSString = "maxLength" - @usableFromInline static let measureText: JSString = "measureText" - @usableFromInline static let media: JSString = "media" - @usableFromInline static let menubar: JSString = "menubar" + @usableFromInline static let log: JSString = "log" @usableFromInline static let message: JSString = "message" - @usableFromInline static let metaKey: JSString = "metaKey" - @usableFromInline static let method: JSString = "method" - @usableFromInline static let mimeTypes: JSString = "mimeTypes" - @usableFromInline static let min: JSString = "min" - @usableFromInline static let minLength: JSString = "minLength" - @usableFromInline static let miterLimit: JSString = "miterLimit" - @usableFromInline static let mode: JSString = "mode" - @usableFromInline static let modifierAltGraph: JSString = "modifierAltGraph" - @usableFromInline static let modifierCapsLock: JSString = "modifierCapsLock" - @usableFromInline static let modifierFn: JSString = "modifierFn" - @usableFromInline static let modifierFnLock: JSString = "modifierFnLock" - @usableFromInline static let modifierHyper: JSString = "modifierHyper" - @usableFromInline static let modifierNumLock: JSString = "modifierNumLock" - @usableFromInline static let modifierScrollLock: JSString = "modifierScrollLock" - @usableFromInline static let modifierSuper: JSString = "modifierSuper" - @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" - @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" - @usableFromInline static let moveTo: JSString = "moveTo" - @usableFromInline static let multiple: JSString = "multiple" - @usableFromInline static let multiply: JSString = "multiply" - @usableFromInline static let multiplySelf: JSString = "multiplySelf" - @usableFromInline static let muted: JSString = "muted" @usableFromInline static let name: JSString = "name" - @usableFromInline static let namedItem: JSString = "namedItem" - @usableFromInline static let namespaceURI: JSString = "namespaceURI" - @usableFromInline static let naturalHeight: JSString = "naturalHeight" - @usableFromInline static let naturalWidth: JSString = "naturalWidth" - @usableFromInline static let navigationPreload: JSString = "navigationPreload" - @usableFromInline static let navigator: JSString = "navigator" - @usableFromInline static let networkState: JSString = "networkState" - @usableFromInline static let newURL: JSString = "newURL" - @usableFromInline static let newValue: JSString = "newValue" - @usableFromInline static let nextElementSibling: JSString = "nextElementSibling" - @usableFromInline static let nextNode: JSString = "nextNode" - @usableFromInline static let nextSibling: JSString = "nextSibling" - @usableFromInline static let noHref: JSString = "noHref" - @usableFromInline static let noModule: JSString = "noModule" - @usableFromInline static let noResize: JSString = "noResize" - @usableFromInline static let noShade: JSString = "noShade" - @usableFromInline static let noValidate: JSString = "noValidate" - @usableFromInline static let noWrap: JSString = "noWrap" - @usableFromInline static let nodeName: JSString = "nodeName" - @usableFromInline static let nodeType: JSString = "nodeType" - @usableFromInline static let nodeValue: JSString = "nodeValue" - @usableFromInline static let nonce: JSString = "nonce" - @usableFromInline static let normalize: JSString = "normalize" - @usableFromInline static let now: JSString = "now" - @usableFromInline static let numberValue: JSString = "numberValue" - @usableFromInline static let observe: JSString = "observe" - @usableFromInline static let offset: JSString = "offset" - @usableFromInline static let ok: JSString = "ok" - @usableFromInline static let oldURL: JSString = "oldURL" - @usableFromInline static let oldValue: JSString = "oldValue" - @usableFromInline static let onLine: JSString = "onLine" @usableFromInline static let onabort: JSString = "onabort" - @usableFromInline static let onaddtrack: JSString = "onaddtrack" - @usableFromInline static let onafterprint: JSString = "onafterprint" - @usableFromInline static let onauxclick: JSString = "onauxclick" - @usableFromInline static let onbeforeprint: JSString = "onbeforeprint" - @usableFromInline static let onbeforeunload: JSString = "onbeforeunload" - @usableFromInline static let onblur: JSString = "onblur" - @usableFromInline static let oncancel: JSString = "oncancel" - @usableFromInline static let oncanplay: JSString = "oncanplay" - @usableFromInline static let oncanplaythrough: JSString = "oncanplaythrough" - @usableFromInline static let once: JSString = "once" - @usableFromInline static let onchange: JSString = "onchange" - @usableFromInline static let onclick: JSString = "onclick" - @usableFromInline static let onclose: JSString = "onclose" - @usableFromInline static let oncontextlost: JSString = "oncontextlost" - @usableFromInline static let oncontextmenu: JSString = "oncontextmenu" - @usableFromInline static let oncontextrestored: JSString = "oncontextrestored" - @usableFromInline static let oncontrollerchange: JSString = "oncontrollerchange" - @usableFromInline static let oncopy: JSString = "oncopy" - @usableFromInline static let oncuechange: JSString = "oncuechange" - @usableFromInline static let oncut: JSString = "oncut" - @usableFromInline static let ondblclick: JSString = "ondblclick" - @usableFromInline static let ondrag: JSString = "ondrag" - @usableFromInline static let ondragend: JSString = "ondragend" - @usableFromInline static let ondragenter: JSString = "ondragenter" - @usableFromInline static let ondragleave: JSString = "ondragleave" - @usableFromInline static let ondragover: JSString = "ondragover" - @usableFromInline static let ondragstart: JSString = "ondragstart" - @usableFromInline static let ondrop: JSString = "ondrop" - @usableFromInline static let ondurationchange: JSString = "ondurationchange" - @usableFromInline static let onemptied: JSString = "onemptied" - @usableFromInline static let onended: JSString = "onended" - @usableFromInline static let onenter: JSString = "onenter" @usableFromInline static let onerror: JSString = "onerror" - @usableFromInline static let onexit: JSString = "onexit" - @usableFromInline static let onfinish: JSString = "onfinish" - @usableFromInline static let onfocus: JSString = "onfocus" - @usableFromInline static let onformdata: JSString = "onformdata" - @usableFromInline static let onhashchange: JSString = "onhashchange" - @usableFromInline static let oninput: JSString = "oninput" - @usableFromInline static let oninvalid: JSString = "oninvalid" - @usableFromInline static let onkeydown: JSString = "onkeydown" - @usableFromInline static let onkeypress: JSString = "onkeypress" - @usableFromInline static let onkeyup: JSString = "onkeyup" - @usableFromInline static let onlanguagechange: JSString = "onlanguagechange" @usableFromInline static let onload: JSString = "onload" - @usableFromInline static let onloadeddata: JSString = "onloadeddata" - @usableFromInline static let onloadedmetadata: JSString = "onloadedmetadata" @usableFromInline static let onloadend: JSString = "onloadend" @usableFromInline static let onloadstart: JSString = "onloadstart" - @usableFromInline static let onmessage: JSString = "onmessage" - @usableFromInline static let onmessageerror: JSString = "onmessageerror" - @usableFromInline static let onmousedown: JSString = "onmousedown" - @usableFromInline static let onmouseenter: JSString = "onmouseenter" - @usableFromInline static let onmouseleave: JSString = "onmouseleave" - @usableFromInline static let onmousemove: JSString = "onmousemove" - @usableFromInline static let onmouseout: JSString = "onmouseout" - @usableFromInline static let onmouseover: JSString = "onmouseover" - @usableFromInline static let onmouseup: JSString = "onmouseup" - @usableFromInline static let onoffline: JSString = "onoffline" - @usableFromInline static let ononline: JSString = "ononline" - @usableFromInline static let onopen: JSString = "onopen" - @usableFromInline static let onpagehide: JSString = "onpagehide" - @usableFromInline static let onpageshow: JSString = "onpageshow" - @usableFromInline static let onpaste: JSString = "onpaste" - @usableFromInline static let onpause: JSString = "onpause" - @usableFromInline static let onplay: JSString = "onplay" - @usableFromInline static let onplaying: JSString = "onplaying" - @usableFromInline static let onpopstate: JSString = "onpopstate" @usableFromInline static let onprogress: JSString = "onprogress" - @usableFromInline static let onratechange: JSString = "onratechange" - @usableFromInline static let onreadystatechange: JSString = "onreadystatechange" - @usableFromInline static let onrejectionhandled: JSString = "onrejectionhandled" - @usableFromInline static let onremove: JSString = "onremove" - @usableFromInline static let onremovetrack: JSString = "onremovetrack" - @usableFromInline static let onreset: JSString = "onreset" - @usableFromInline static let onresize: JSString = "onresize" - @usableFromInline static let onscroll: JSString = "onscroll" - @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" - @usableFromInline static let onseeked: JSString = "onseeked" - @usableFromInline static let onseeking: JSString = "onseeking" - @usableFromInline static let onselect: JSString = "onselect" - @usableFromInline static let onslotchange: JSString = "onslotchange" - @usableFromInline static let onstalled: JSString = "onstalled" - @usableFromInline static let onstatechange: JSString = "onstatechange" - @usableFromInline static let onstorage: JSString = "onstorage" - @usableFromInline static let onsubmit: JSString = "onsubmit" - @usableFromInline static let onsuspend: JSString = "onsuspend" - @usableFromInline static let ontimeout: JSString = "ontimeout" - @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" - @usableFromInline static let ontoggle: JSString = "ontoggle" - @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" - @usableFromInline static let onunload: JSString = "onunload" - @usableFromInline static let onupdatefound: JSString = "onupdatefound" - @usableFromInline static let onvisibilitychange: JSString = "onvisibilitychange" - @usableFromInline static let onvolumechange: JSString = "onvolumechange" - @usableFromInline static let onwaiting: JSString = "onwaiting" - @usableFromInline static let onwebkitanimationend: JSString = "onwebkitanimationend" - @usableFromInline static let onwebkitanimationiteration: JSString = "onwebkitanimationiteration" - @usableFromInline static let onwebkitanimationstart: JSString = "onwebkitanimationstart" - @usableFromInline static let onwebkittransitionend: JSString = "onwebkittransitionend" - @usableFromInline static let onwheel: JSString = "onwheel" - @usableFromInline static let open: JSString = "open" - @usableFromInline static let opener: JSString = "opener" - @usableFromInline static let optimum: JSString = "optimum" - @usableFromInline static let options: JSString = "options" @usableFromInline static let origin: JSString = "origin" - @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" - @usableFromInline static let originTime: JSString = "originTime" - @usableFromInline static let oscpu: JSString = "oscpu" - @usableFromInline static let outerText: JSString = "outerText" - @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" - @usableFromInline static let ownerDocument: JSString = "ownerDocument" - @usableFromInline static let ownerElement: JSString = "ownerElement" - @usableFromInline static let p1: JSString = "p1" - @usableFromInline static let p2: JSString = "p2" - @usableFromInline static let p3: JSString = "p3" - @usableFromInline static let p4: JSString = "p4" - @usableFromInline static let parent: JSString = "parent" - @usableFromInline static let parentElement: JSString = "parentElement" - @usableFromInline static let parentNode: JSString = "parentNode" - @usableFromInline static let parseFromString: JSString = "parseFromString" - @usableFromInline static let passive: JSString = "passive" @usableFromInline static let password: JSString = "password" @usableFromInline static let pathname: JSString = "pathname" - @usableFromInline static let pattern: JSString = "pattern" - @usableFromInline static let patternMismatch: JSString = "patternMismatch" - @usableFromInline static let pause: JSString = "pause" - @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" - @usableFromInline static let paused: JSString = "paused" - @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" - @usableFromInline static let pending: JSString = "pending" - @usableFromInline static let performance: JSString = "performance" - @usableFromInline static let persist: JSString = "persist" - @usableFromInline static let persisted: JSString = "persisted" - @usableFromInline static let personalbar: JSString = "personalbar" - @usableFromInline static let phase: JSString = "phase" - @usableFromInline static let ping: JSString = "ping" - @usableFromInline static let pipeThrough: JSString = "pipeThrough" - @usableFromInline static let pipeTo: JSString = "pipeTo" - @usableFromInline static let placeholder: JSString = "placeholder" - @usableFromInline static let platform: JSString = "platform" - @usableFromInline static let play: JSString = "play" - @usableFromInline static let playState: JSString = "playState" - @usableFromInline static let playbackRate: JSString = "playbackRate" - @usableFromInline static let played: JSString = "played" - @usableFromInline static let playsInline: JSString = "playsInline" - @usableFromInline static let plugins: JSString = "plugins" - @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" @usableFromInline static let port: JSString = "port" - @usableFromInline static let port1: JSString = "port1" - @usableFromInline static let port2: JSString = "port2" - @usableFromInline static let ports: JSString = "ports" - @usableFromInline static let position: JSString = "position" - @usableFromInline static let postMessage: JSString = "postMessage" - @usableFromInline static let poster: JSString = "poster" - @usableFromInline static let preMultiplySelf: JSString = "preMultiplySelf" - @usableFromInline static let prefix: JSString = "prefix" - @usableFromInline static let preload: JSString = "preload" - @usableFromInline static let preloadResponse: JSString = "preloadResponse" - @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" - @usableFromInline static let prepend: JSString = "prepend" - @usableFromInline static let preservesPitch: JSString = "preservesPitch" - @usableFromInline static let prevValue: JSString = "prevValue" - @usableFromInline static let preventAbort: JSString = "preventAbort" - @usableFromInline static let preventCancel: JSString = "preventCancel" - @usableFromInline static let preventClose: JSString = "preventClose" - @usableFromInline static let preventDefault: JSString = "preventDefault" - @usableFromInline static let preventScroll: JSString = "preventScroll" - @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" - @usableFromInline static let previousNode: JSString = "previousNode" - @usableFromInline static let previousSibling: JSString = "previousSibling" - @usableFromInline static let print: JSString = "print" - @usableFromInline static let product: JSString = "product" - @usableFromInline static let productSub: JSString = "productSub" - @usableFromInline static let progress: JSString = "progress" - @usableFromInline static let promise: JSString = "promise" - @usableFromInline static let prompt: JSString = "prompt" @usableFromInline static let `protocol`: JSString = "protocol" - @usableFromInline static let pseudoElement: JSString = "pseudoElement" - @usableFromInline static let publicId: JSString = "publicId" - @usableFromInline static let pull: JSString = "pull" - @usableFromInline static let pushState: JSString = "pushState" - @usableFromInline static let put: JSString = "put" - @usableFromInline static let putImageData: JSString = "putImageData" - @usableFromInline static let quadraticCurveTo: JSString = "quadraticCurveTo" - @usableFromInline static let quality: JSString = "quality" - @usableFromInline static let queryCommandEnabled: JSString = "queryCommandEnabled" - @usableFromInline static let queryCommandIndeterm: JSString = "queryCommandIndeterm" - @usableFromInline static let queryCommandState: JSString = "queryCommandState" - @usableFromInline static let queryCommandSupported: JSString = "queryCommandSupported" - @usableFromInline static let queryCommandValue: JSString = "queryCommandValue" - @usableFromInline static let querySelector: JSString = "querySelector" - @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" - @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" - @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" - @usableFromInline static let read: JSString = "read" - @usableFromInline static let readOnly: JSString = "readOnly" - @usableFromInline static let readable: JSString = "readable" - @usableFromInline static let readableType: JSString = "readableType" - @usableFromInline static let ready: JSString = "ready" + @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" + @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" + @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" + @usableFromInline static let readAsText: JSString = "readAsText" @usableFromInline static let readyState: JSString = "readyState" - @usableFromInline static let reason: JSString = "reason" - @usableFromInline static let rect: JSString = "rect" - @usableFromInline static let redirect: JSString = "redirect" - @usableFromInline static let redirected: JSString = "redirected" - @usableFromInline static let referenceNode: JSString = "referenceNode" - @usableFromInline static let referrer: JSString = "referrer" - @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" - @usableFromInline static let refresh: JSString = "refresh" - @usableFromInline static let register: JSString = "register" - @usableFromInline static let registerProtocolHandler: JSString = "registerProtocolHandler" - @usableFromInline static let rel: JSString = "rel" - @usableFromInline static let relList: JSString = "relList" - @usableFromInline static let relatedNode: JSString = "relatedNode" - @usableFromInline static let relatedTarget: JSString = "relatedTarget" - @usableFromInline static let releaseEvents: JSString = "releaseEvents" - @usableFromInline static let releaseLock: JSString = "releaseLock" - @usableFromInline static let reload: JSString = "reload" - @usableFromInline static let remove: JSString = "remove" - @usableFromInline static let removeAttribute: JSString = "removeAttribute" - @usableFromInline static let removeAttributeNS: JSString = "removeAttributeNS" - @usableFromInline static let removeAttributeNode: JSString = "removeAttributeNode" - @usableFromInline static let removeChild: JSString = "removeChild" - @usableFromInline static let removeCue: JSString = "removeCue" - @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" - @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" - @usableFromInline static let removeParameter: JSString = "removeParameter" - @usableFromInline static let removedNodes: JSString = "removedNodes" - @usableFromInline static let `repeat`: JSString = "repeat" - @usableFromInline static let replace: JSString = "replace" - @usableFromInline static let replaceChild: JSString = "replaceChild" - @usableFromInline static let replaceChildren: JSString = "replaceChildren" - @usableFromInline static let replaceData: JSString = "replaceData" - @usableFromInline static let replaceState: JSString = "replaceState" - @usableFromInline static let replaceWith: JSString = "replaceWith" - @usableFromInline static let replacesClientId: JSString = "replacesClientId" - @usableFromInline static let reportError: JSString = "reportError" - @usableFromInline static let reportValidity: JSString = "reportValidity" - @usableFromInline static let request: JSString = "request" - @usableFromInline static let requestSubmit: JSString = "requestSubmit" - @usableFromInline static let required: JSString = "required" - @usableFromInline static let reset: JSString = "reset" - @usableFromInline static let resetTransform: JSString = "resetTransform" - @usableFromInline static let resizeHeight: JSString = "resizeHeight" - @usableFromInline static let resizeQuality: JSString = "resizeQuality" - @usableFromInline static let resizeWidth: JSString = "resizeWidth" - @usableFromInline static let respond: JSString = "respond" - @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" - @usableFromInline static let response: JSString = "response" - @usableFromInline static let responseText: JSString = "responseText" - @usableFromInline static let responseType: JSString = "responseType" - @usableFromInline static let responseURL: JSString = "responseURL" - @usableFromInline static let responseXML: JSString = "responseXML" - @usableFromInline static let restore: JSString = "restore" - @usableFromInline static let resultType: JSString = "resultType" - @usableFromInline static let resultingClientId: JSString = "resultingClientId" - @usableFromInline static let returnValue: JSString = "returnValue" - @usableFromInline static let rev: JSString = "rev" - @usableFromInline static let reverse: JSString = "reverse" - @usableFromInline static let reversed: JSString = "reversed" - @usableFromInline static let right: JSString = "right" - @usableFromInline static let role: JSString = "role" - @usableFromInline static let root: JSString = "root" - @usableFromInline static let rotate: JSString = "rotate" - @usableFromInline static let rotateAxisAngle: JSString = "rotateAxisAngle" - @usableFromInline static let rotateAxisAngleSelf: JSString = "rotateAxisAngleSelf" - @usableFromInline static let rotateFromVector: JSString = "rotateFromVector" - @usableFromInline static let rotateFromVectorSelf: JSString = "rotateFromVectorSelf" - @usableFromInline static let rotateSelf: JSString = "rotateSelf" - @usableFromInline static let roundRect: JSString = "roundRect" - @usableFromInline static let rowIndex: JSString = "rowIndex" - @usableFromInline static let rowSpan: JSString = "rowSpan" - @usableFromInline static let rows: JSString = "rows" - @usableFromInline static let rules: JSString = "rules" - @usableFromInline static let sandbox: JSString = "sandbox" - @usableFromInline static let save: JSString = "save" - @usableFromInline static let scale: JSString = "scale" - @usableFromInline static let scale3d: JSString = "scale3d" - @usableFromInline static let scale3dSelf: JSString = "scale3dSelf" - @usableFromInline static let scaleNonUniform: JSString = "scaleNonUniform" - @usableFromInline static let scaleSelf: JSString = "scaleSelf" - @usableFromInline static let scheme: JSString = "scheme" - @usableFromInline static let scope: JSString = "scope" - @usableFromInline static let screenX: JSString = "screenX" - @usableFromInline static let screenY: JSString = "screenY" - @usableFromInline static let scriptURL: JSString = "scriptURL" - @usableFromInline static let scripts: JSString = "scripts" - @usableFromInline static let scrollAmount: JSString = "scrollAmount" - @usableFromInline static let scrollDelay: JSString = "scrollDelay" - @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" - @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" - @usableFromInline static let scrollbars: JSString = "scrollbars" - @usableFromInline static let scrolling: JSString = "scrolling" + @usableFromInline static let result: JSString = "result" + @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" @usableFromInline static let search: JSString = "search" - @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" - @usableFromInline static let seekable: JSString = "seekable" - @usableFromInline static let seeking: JSString = "seeking" - @usableFromInline static let select: JSString = "select" - @usableFromInline static let selectNode: JSString = "selectNode" - @usableFromInline static let selectNodeContents: JSString = "selectNodeContents" - @usableFromInline static let selected: JSString = "selected" - @usableFromInline static let selectedIndex: JSString = "selectedIndex" - @usableFromInline static let selectedOptions: JSString = "selectedOptions" - @usableFromInline static let selectionDirection: JSString = "selectionDirection" - @usableFromInline static let selectionEnd: JSString = "selectionEnd" - @usableFromInline static let selectionStart: JSString = "selectionStart" - @usableFromInline static let send: JSString = "send" - @usableFromInline static let serviceWorker: JSString = "serviceWorker" - @usableFromInline static let sessionStorage: JSString = "sessionStorage" + @usableFromInline static let searchParams: JSString = "searchParams" @usableFromInline static let set: JSString = "set" - @usableFromInline static let setAttribute: JSString = "setAttribute" - @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" - @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" - @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" - @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" - @usableFromInline static let setData: JSString = "setData" - @usableFromInline static let setDragImage: JSString = "setDragImage" - @usableFromInline static let setEnd: JSString = "setEnd" - @usableFromInline static let setEndAfter: JSString = "setEndAfter" - @usableFromInline static let setEndBefore: JSString = "setEndBefore" - @usableFromInline static let setFormValue: JSString = "setFormValue" - @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" - @usableFromInline static let setInterval: JSString = "setInterval" - @usableFromInline static let setKeyframes: JSString = "setKeyframes" - @usableFromInline static let setLineDash: JSString = "setLineDash" - @usableFromInline static let setMatrixValue: JSString = "setMatrixValue" - @usableFromInline static let setNamedItem: JSString = "setNamedItem" - @usableFromInline static let setNamedItemNS: JSString = "setNamedItemNS" - @usableFromInline static let setParameter: JSString = "setParameter" - @usableFromInline static let setRangeText: JSString = "setRangeText" - @usableFromInline static let setRequestHeader: JSString = "setRequestHeader" - @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" - @usableFromInline static let setStart: JSString = "setStart" - @usableFromInline static let setStartAfter: JSString = "setStartAfter" - @usableFromInline static let setStartBefore: JSString = "setStartBefore" - @usableFromInline static let setTimeout: JSString = "setTimeout" - @usableFromInline static let setTransform: JSString = "setTransform" - @usableFromInline static let setValidity: JSString = "setValidity" - @usableFromInline static let shadowBlur: JSString = "shadowBlur" - @usableFromInline static let shadowColor: JSString = "shadowColor" - @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" - @usableFromInline static let shadowOffsetY: JSString = "shadowOffsetY" - @usableFromInline static let shadowRoot: JSString = "shadowRoot" - @usableFromInline static let shape: JSString = "shape" - @usableFromInline static let shiftKey: JSString = "shiftKey" - @usableFromInline static let show: JSString = "show" - @usableFromInline static let showModal: JSString = "showModal" - @usableFromInline static let showPicker: JSString = "showPicker" - @usableFromInline static let signal: JSString = "signal" - @usableFromInline static let singleNodeValue: JSString = "singleNodeValue" @usableFromInline static let size: JSString = "size" - @usableFromInline static let sizes: JSString = "sizes" - @usableFromInline static let skewX: JSString = "skewX" - @usableFromInline static let skewXSelf: JSString = "skewXSelf" - @usableFromInline static let skewY: JSString = "skewY" - @usableFromInline static let skewYSelf: JSString = "skewYSelf" - @usableFromInline static let slot: JSString = "slot" - @usableFromInline static let slotAssignment: JSString = "slotAssignment" - @usableFromInline static let snapshotItem: JSString = "snapshotItem" - @usableFromInline static let snapshotLength: JSString = "snapshotLength" - @usableFromInline static let source: JSString = "source" - @usableFromInline static let span: JSString = "span" - @usableFromInline static let specified: JSString = "specified" - @usableFromInline static let spellcheck: JSString = "spellcheck" - @usableFromInline static let splitText: JSString = "splitText" - @usableFromInline static let src: JSString = "src" - @usableFromInline static let srcElement: JSString = "srcElement" - @usableFromInline static let srcdoc: JSString = "srcdoc" - @usableFromInline static let srclang: JSString = "srclang" - @usableFromInline static let srcset: JSString = "srcset" - @usableFromInline static let standby: JSString = "standby" - @usableFromInline static let start: JSString = "start" - @usableFromInline static let startContainer: JSString = "startContainer" - @usableFromInline static let startMessages: JSString = "startMessages" - @usableFromInline static let startOffset: JSString = "startOffset" - @usableFromInline static let startTime: JSString = "startTime" - @usableFromInline static let state: JSString = "state" - @usableFromInline static let status: JSString = "status" - @usableFromInline static let statusText: JSString = "statusText" - @usableFromInline static let statusbar: JSString = "statusbar" - @usableFromInline static let step: JSString = "step" - @usableFromInline static let stepDown: JSString = "stepDown" - @usableFromInline static let stepMismatch: JSString = "stepMismatch" - @usableFromInline static let stepUp: JSString = "stepUp" - @usableFromInline static let stop: JSString = "stop" - @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" - @usableFromInline static let stopPropagation: JSString = "stopPropagation" - @usableFromInline static let storageArea: JSString = "storageArea" - @usableFromInline static let stringValue: JSString = "stringValue" - @usableFromInline static let stroke: JSString = "stroke" - @usableFromInline static let strokeRect: JSString = "strokeRect" - @usableFromInline static let strokeStyle: JSString = "strokeStyle" - @usableFromInline static let strokeText: JSString = "strokeText" - @usableFromInline static let structuredClone: JSString = "structuredClone" - @usableFromInline static let submit: JSString = "submit" - @usableFromInline static let submitter: JSString = "submitter" - @usableFromInline static let substringData: JSString = "substringData" - @usableFromInline static let subtree: JSString = "subtree" - @usableFromInline static let suffixes: JSString = "suffixes" - @usableFromInline static let summary: JSString = "summary" - @usableFromInline static let supports: JSString = "supports" - @usableFromInline static let surroundContents: JSString = "surroundContents" - @usableFromInline static let systemId: JSString = "systemId" - @usableFromInline static let tBodies: JSString = "tBodies" - @usableFromInline static let tFoot: JSString = "tFoot" - @usableFromInline static let tHead: JSString = "tHead" - @usableFromInline static let tabIndex: JSString = "tabIndex" - @usableFromInline static let tagName: JSString = "tagName" - @usableFromInline static let taintEnabled: JSString = "taintEnabled" - @usableFromInline static let takeRecords: JSString = "takeRecords" - @usableFromInline static let target: JSString = "target" - @usableFromInline static let targetOrigin: JSString = "targetOrigin" - @usableFromInline static let tee: JSString = "tee" - @usableFromInline static let terminate: JSString = "terminate" + @usableFromInline static let slice: JSString = "slice" + @usableFromInline static let sort: JSString = "sort" + @usableFromInline static let table: JSString = "table" @usableFromInline static let text: JSString = "text" - @usableFromInline static let textAlign: JSString = "textAlign" - @usableFromInline static let textBaseline: JSString = "textBaseline" - @usableFromInline static let textContent: JSString = "textContent" - @usableFromInline static let textLength: JSString = "textLength" - @usableFromInline static let textRendering: JSString = "textRendering" - @usableFromInline static let textTracks: JSString = "textTracks" - @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" - @usableFromInline static let timeOrigin: JSString = "timeOrigin" - @usableFromInline static let timeStamp: JSString = "timeStamp" - @usableFromInline static let timeline: JSString = "timeline" - @usableFromInline static let timeout: JSString = "timeout" - @usableFromInline static let title: JSString = "title" - @usableFromInline static let toDataURL: JSString = "toDataURL" - @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" - @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" + @usableFromInline static let time: JSString = "time" + @usableFromInline static let timeEnd: JSString = "timeEnd" + @usableFromInline static let timeLog: JSString = "timeLog" @usableFromInline static let toJSON: JSString = "toJSON" @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let toggle: JSString = "toggle" - @usableFromInline static let toggleAttribute: JSString = "toggleAttribute" - @usableFromInline static let tooLong: JSString = "tooLong" - @usableFromInline static let tooShort: JSString = "tooShort" - @usableFromInline static let toolbar: JSString = "toolbar" - @usableFromInline static let top: JSString = "top" - @usableFromInline static let total: JSString = "total" - @usableFromInline static let track: JSString = "track" - @usableFromInline static let transfer: JSString = "transfer" - @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" - @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" - @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" - @usableFromInline static let transform: JSString = "transform" - @usableFromInline static let transformPoint: JSString = "transformPoint" - @usableFromInline static let transformToDocument: JSString = "transformToDocument" - @usableFromInline static let transformToFragment: JSString = "transformToFragment" - @usableFromInline static let translate: JSString = "translate" - @usableFromInline static let translateSelf: JSString = "translateSelf" - @usableFromInline static let trueSpeed: JSString = "trueSpeed" + @usableFromInline static let trace: JSString = "trace" @usableFromInline static let type: JSString = "type" - @usableFromInline static let typeMismatch: JSString = "typeMismatch" - @usableFromInline static let types: JSString = "types" - @usableFromInline static let unregister: JSString = "unregister" - @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" - @usableFromInline static let update: JSString = "update" - @usableFromInline static let updatePlaybackRate: JSString = "updatePlaybackRate" - @usableFromInline static let updateTiming: JSString = "updateTiming" - @usableFromInline static let updateViaCache: JSString = "updateViaCache" - @usableFromInline static let upgrade: JSString = "upgrade" - @usableFromInline static let upload: JSString = "upload" - @usableFromInline static let url: JSString = "url" - @usableFromInline static let useMap: JSString = "useMap" - @usableFromInline static let userAgent: JSString = "userAgent" @usableFromInline static let username: JSString = "username" - @usableFromInline static let vAlign: JSString = "vAlign" - @usableFromInline static let vLink: JSString = "vLink" - @usableFromInline static let valid: JSString = "valid" - @usableFromInline static let validationMessage: JSString = "validationMessage" - @usableFromInline static let validity: JSString = "validity" - @usableFromInline static let value: JSString = "value" - @usableFromInline static let valueAsDate: JSString = "valueAsDate" - @usableFromInline static let valueAsNumber: JSString = "valueAsNumber" - @usableFromInline static let valueMissing: JSString = "valueMissing" - @usableFromInline static let valueType: JSString = "valueType" - @usableFromInline static let vendor: JSString = "vendor" - @usableFromInline static let vendorSub: JSString = "vendorSub" - @usableFromInline static let version: JSString = "version" - @usableFromInline static let videoHeight: JSString = "videoHeight" - @usableFromInline static let videoTracks: JSString = "videoTracks" - @usableFromInline static let videoWidth: JSString = "videoWidth" - @usableFromInline static let view: JSString = "view" - @usableFromInline static let visibilityState: JSString = "visibilityState" - @usableFromInline static let visible: JSString = "visible" - @usableFromInline static let vlinkColor: JSString = "vlinkColor" - @usableFromInline static let volume: JSString = "volume" - @usableFromInline static let vspace: JSString = "vspace" - @usableFromInline static let w: JSString = "w" - @usableFromInline static let waiting: JSString = "waiting" - @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" - @usableFromInline static let whatToShow: JSString = "whatToShow" - @usableFromInline static let whenDefined: JSString = "whenDefined" - @usableFromInline static let which: JSString = "which" - @usableFromInline static let wholeText: JSString = "wholeText" - @usableFromInline static let width: JSString = "width" - @usableFromInline static let willReadFrequently: JSString = "willReadFrequently" - @usableFromInline static let willValidate: JSString = "willValidate" - @usableFromInline static let window: JSString = "window" - @usableFromInline static let withCredentials: JSString = "withCredentials" - @usableFromInline static let wordSpacing: JSString = "wordSpacing" - @usableFromInline static let wrap: JSString = "wrap" - @usableFromInline static let writable: JSString = "writable" - @usableFromInline static let writableType: JSString = "writableType" - @usableFromInline static let write: JSString = "write" - @usableFromInline static let writeln: JSString = "writeln" - @usableFromInline static let x: JSString = "x" - @usableFromInline static let y: JSString = "y" - @usableFromInline static let z: JSString = "z" + @usableFromInline static let warn: JSString = "warn" } diff --git a/Sources/WebIDL/Argument.swift b/Sources/WebIDL/Argument.swift index b6c4e8db..878f06f3 100644 --- a/Sources/WebIDL/Argument.swift +++ b/Sources/WebIDL/Argument.swift @@ -7,4 +7,8 @@ public struct IDLArgument: Hashable, IDLNode, IDLNamed { public let idlType: IDLType public let name: String public let extAttrs: [IDLExtendedAttribute] + + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Interface.swift b/Sources/WebIDL/Interface.swift index 9e1875be..ca0f0a6f 100644 --- a/Sources/WebIDL/Interface.swift +++ b/Sources/WebIDL/Interface.swift @@ -6,16 +6,23 @@ public struct IDLInterface: IDLNode, IDLNamed { public let members: GenericCollection public let inheritance: String? public let extAttrs: [IDLExtendedAttribute] + + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } /// https://github.com/w3c/webidl2.js#callback-interfaces -public struct IDLCallbackInterface: IDLNode { +public struct IDLCallbackInterface: IDLNode, IDLNamed { public static let type = "callback interface" public let name: String public let partial: Bool public let members: GenericCollection public let inheritance: String? public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } public protocol IDLInterfaceMember: IDLNode {} diff --git a/Sources/WebIDL/Node.swift b/Sources/WebIDL/Node.swift index 85b660ab..171e2ea6 100644 --- a/Sources/WebIDL/Node.swift +++ b/Sources/WebIDL/Node.swift @@ -60,6 +60,7 @@ public protocol IDLDeclVisitor { mutating func visit(_ operation: IDLOperation) mutating func visit(_ constructor: IDLConstructor) mutating func visit(_ enum: IDLEnum) + mutating func visit(_ argument: IDLArgument) mutating func visit(_ rawNode: IDLNode) } @@ -71,6 +72,6 @@ public extension IDLDeclVisitor { public extension IDLNode { func accept(visitor: inout V) { -// visitor.visit(self) + visitor.visit(self) } } diff --git a/Sources/WebIDL/Typedef.swift b/Sources/WebIDL/Typedef.swift index b0e34288..025907cf 100644 --- a/Sources/WebIDL/Typedef.swift +++ b/Sources/WebIDL/Typedef.swift @@ -3,4 +3,7 @@ public struct IDLTypedef: IDLNode, IDLNamed { public let name: String public let idlType: IDLType public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDLToSwift/DeclGraph.swift b/Sources/WebIDLToSwift/DeclGraph.swift index 993dec4e..42f712e5 100644 --- a/Sources/WebIDLToSwift/DeclGraph.swift +++ b/Sources/WebIDLToSwift/DeclGraph.swift @@ -8,10 +8,22 @@ class IDLSource { } protocol IDLCodeGenUnit: IDLNode { - var name: String { get } + var identifier: String? { get } +} +extension IDLCodeGenUnit where Self: IDLNamed { + var identifier: String? { name } } extension IDLInterface: IDLCodeGenUnit {} extension IDLInterfaceMixin: IDLCodeGenUnit {} +extension IDLTypedef: IDLCodeGenUnit {} +extension IDLIncludes: IDLCodeGenUnit { + var identifier: String? { nil } +} +extension IDLDictionary: IDLCodeGenUnit {} +extension IDLEnum: IDLCodeGenUnit {} +extension IDLCallback: IDLCodeGenUnit {} +extension IDLCallbackInterface: IDLCodeGenUnit {} +extension IDLNamespace: IDLCodeGenUnit {} struct DeclGraph { @@ -21,7 +33,7 @@ struct DeclGraph { typealias NodeId = Array.Index - final class Node: Hashable { + final class Node: Hashable, CustomStringConvertible { let declNode: IDLCodeGenUnit let source: IDLSource @@ -37,17 +49,20 @@ struct DeclGraph { func hash(into hasher: inout Hasher) { hasher.combine(ObjectIdentifier(self)) } + var description: String { + "\(source.name).\(declNode.identifier ?? _typeName(type(of: declNode)))" + } } private var resolutions: [UnresolvedRef: [NodeId]] = [:] private var nodes: [Node] = [] - private(set) var forwardEdges: [NodeId: [NodeId]] = [:] + private(set) var forwardEdges: [NodeId: Set] = [:] private var nodeByName: [String: NodeId] = [:] private var sources: [String: IDLSource] = [:] mutating func addEdge(from source: NodeId, to destination: NodeId) { - self.forwardEdges[source, default: []].append(destination) + self.forwardEdges[source, default: []].insert(destination) } private mutating func collect(unitName: String, decls: [IDLNode]) { @@ -59,7 +74,9 @@ struct DeclGraph { let newNodeId = nodes.count let newNode = Node(declNode: decl, source: source) nodes.append(newNode) - nodeByName[decl.name] = newNodeId + if let identifier = decl.identifier { + nodeByName[identifier] = newNodeId + } IDLDeclWalker.walk( root: decl, @@ -72,26 +89,41 @@ struct DeclGraph { private mutating func resolve() { for (ref, onResolved) in resolutions { - let node = resolve(ref: ref) - onResolved.forEach { sourceNode in - self.addEdge(from: sourceNode, to: node) + let nodes = resolve(ref: ref) + for sourceNode in onResolved { + for node in nodes { + self.addEdge(from: sourceNode, to: node) + } } } resolutions = [:] } - private func resolve(ref: UnresolvedRef) -> NodeId { + private func resolve(ref: UnresolvedRef) -> [NodeId] { switch ref { case .identifier(let id): - guard let node = nodeByName[id] else { - fatalError("'\(id)' not found") + return resolve(id: id).map { [$0] } ?? [] + case .type(let type): + switch type.value { + case .single(let id): + return resolve(id: id).map { [$0] } ?? [] + case .union(let types): + return types.flatMap { resolve(ref: .type($0)) } + default: + print("IDLType \(ref) is not handled") + return [] } - return node - case .type: - fatalError("TODO") } } + private func resolve(id: String) -> NodeId? { + guard let node = nodeByName[id] else { + print("'\(id)' not found") + return nil + } + return node + } + func transposed() -> DeclGraph { var graph = self graph.forwardEdges = [:] @@ -144,11 +176,29 @@ struct DeclGraph { var graph = DeclGraph() for idl in idls { + print("Building graph from \(idl.unitName)") graph.collect(unitName: idl.unitName, decls: idl.collection) } graph.resolve() return graph } + + func render() -> String { + var output = "digraph DependenciesGraph {\n" + output += " node [shape = box]\n" + func renderNode(node id: NodeId) { + let node = self.nodes[id] + output += #" "_\#(id)" [label="\#(node)"]"# + "\n" + } + for node in nodes.indices { + renderNode(node: node) + for edge in forwardEdges[node] ?? [] { + output += #" "_\#(node)" -> "_\#(edge)""# + "\n" + } + } + output += "}\n" + return output + } } enum UnresolvedRef: Hashable { @@ -211,9 +261,13 @@ fileprivate struct IDLDeclWalker: IDLDeclVisitor { } public func visit(_ enum: IDLEnum) {} + + mutating func visit(_ argument: IDLArgument) { + process(.type(argument.idlType)) + } public func visit(_ rawNode: IDLNode) { - fatalError("Unhandled IDLNode in IDLDeclWalker: \(rawNode)") + print("Unhandled IDLNode in IDLDeclWalker: \(type(of: rawNode))") } mutating func process(_ node: IDLNode) { diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 57db0020..4c96d656 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -23,36 +23,36 @@ enum IDLParser { return try JSONDecoder().decode(GenericCollection.self, from: data) } - static func defaultIDLs() -> [(moduleName: String, paths: [URL], imports: [String])] { + static func defaultIDLs() -> [(name: String, path: URL)] { let enabledIDLs: [(moduleName: String, idlNames: [String], imports: [String])] = [ - ("DOMKit", [ - "fetch", - "geometry", - "hr-time", - "referrer-policy", - "uievents", - "wai-aria", - "web-animations", - "xhr", - "service-workers", - "streams", - "dom", - "html", - ], ["DOMKitConsole", "DOMKitFileAPI", "DOMKitWebIDL", "DOMKitURL"]), +// ("DOMKit", [ +// "fetch", +// "geometry", +// "hr-time", +// "referrer-policy", +// "uievents", +// "wai-aria", +// "web-animations", +// "xhr", +// "service-workers", +// "streams", +// "dom", +// "html", +// ], ["DOMKitConsole", "DOMKitFileAPI", "DOMKitWebIDL", "DOMKitURL"]), ("DOMKitWebIDL", ["webidl"], []), ("DOMKitURL", ["url"], []), ("DOMKitConsole", ["console"], []), ("DOMKitFileAPI", ["FileAPI"], ["DOMKitWebIDL"]), ] - return enabledIDLs.map { idl in - let paths = idl.idlNames.map { - packageDir + return enabledIDLs.flatMap { idl in + idl.idlNames.map { + let path = packageDir .appendingPathComponent("node_modules") .appendingPathComponent("@webref") .appendingPathComponent("idl") .appendingPathComponent($0 + ".idl") + return ($0, path) } - return (idl.moduleName, paths, idl.imports) } } } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 46a0212b..e7a8688f 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -1,15 +1,12 @@ import Foundation import WebIDL -func parseOptions() -> [(outputPath: String, idlPaths: [URL], imports: [String])] { +func parseOptions() -> [(name: String, path: URL)] { let args = CommandLine.arguments if args.count > 2 { - return [(args[1], Array(args[2...].map(URL.init(fileURLWithPath: ))), [])] + fatalError() } else { - return IDLParser.defaultIDLs().map { idl in - let outputPath = "Sources/\(idl.moduleName)/\(idl.moduleName).swift" - return (outputPath, idl.paths, idl.imports) - } + return IDLParser.defaultIDLs() } } @@ -17,15 +14,17 @@ main() func main() { do { - let options = parseOptions() - for (outputPath, idlPaths, imports) in options { - Record.reset() - let startTime = Date() - print("Generating bindings for \(idlPaths.map(\.path))...") - let idls = try idlPaths.map { try IDLParser.parseIDL(path: $0) } - try generate(idls: idls, imports: imports, outputPath: outputPath) - print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") - } + let idlInputs = parseOptions() + Record.reset() + let startTime = Date() + print("Generating bindings for \(idlInputs.map(\.path))...") + let idls = try idlInputs.map { try (name: $0.name, collection: IDLParser.parseIDL(path: $0.path)) } + let graph = DeclGraph.build(from: idls.map { ($0, $1.array) }) + print(graph.render()) +// let scc = graph.buildSCC() + + try generate(idls: idls.map(\.collection), imports: [], outputPath: "Sources/DOMKit/DOMKit.swift") + print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") } catch { handleDecodingError(error) } From c6246221220cc9a8c4ddcd8551e9c3a5023e88a5 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 16:04:48 +0900 Subject: [PATCH 20/24] WIP --- Package.swift | 11 +- Sources/DOMKit/DOMKit.swift | 16710 +++++++++++++++- Sources/DOMKitConsole/DOMKitConsole.swift | 133 - Sources/DOMKitFetch/DOMKitFetch.swift | 721 - Sources/DOMKitFetch/Support.swift | 2 - Sources/DOMKitFileAPI/DOMKitFileAPI.swift | 289 - Sources/DOMKitFileAPI/Support.swift | 16 - Sources/DOMKitURL/DOMKitURL.swift | 159 - Sources/DOMKitWebIDL/DOMKitWebIDL.swift | 156 - Sources/WebIDL/Attribute.swift | 3 + Sources/WebIDL/Callback.swift | 3 + Sources/WebIDL/Constant.swift | 3 + Sources/WebIDL/Declaration.swift | 9 + Sources/WebIDL/Dictionary.swift | 3 + Sources/WebIDL/Namespace.swift | 3 + Sources/WebIDL/Node.swift | 8 + Sources/WebIDLToSwift/DeclGraph.swift | 137 +- Sources/WebIDLToSwift/IDLParser.swift | 52 +- .../WebIDL+SwiftRepresentation.swift | 2 +- Sources/WebIDLToSwift/main.swift | 9 +- 20 files changed, 16568 insertions(+), 1861 deletions(-) delete mode 100644 Sources/DOMKitConsole/DOMKitConsole.swift delete mode 100644 Sources/DOMKitFetch/DOMKitFetch.swift delete mode 100644 Sources/DOMKitFetch/Support.swift delete mode 100644 Sources/DOMKitFileAPI/DOMKitFileAPI.swift delete mode 100644 Sources/DOMKitFileAPI/Support.swift delete mode 100644 Sources/DOMKitURL/DOMKitURL.swift delete mode 100644 Sources/DOMKitWebIDL/DOMKitWebIDL.swift diff --git a/Package.swift b/Package.swift index 338aca71..cfa1e246 100644 --- a/Package.swift +++ b/Package.swift @@ -28,16 +28,7 @@ let package = Package( dependencies: ["DOMKit"]), .target( name: "DOMKit", - dependencies: dependencyOfWebIDLToSwift + [ - "DOMKitFileAPI", - "DOMKitConsole", - "DOMKitWebIDL", - "DOMKitURL", - ]), - .target(name: "DOMKitConsole", dependencies: dependencyOfWebIDLToSwift), - .target(name: "DOMKitFileAPI", dependencies: dependencyOfWebIDLToSwift + ["DOMKitWebIDL"]), - .target(name: "DOMKitWebIDL", dependencies: dependencyOfWebIDLToSwift), - .target(name: "DOMKitURL", dependencies: dependencyOfWebIDLToSwift), + dependencies: dependencyOfWebIDLToSwift), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", diff --git a/Sources/DOMKit/DOMKit.swift b/Sources/DOMKit/DOMKit.swift index 2b1ee4aa..fae91dc6 100644 --- a/Sources/DOMKit/DOMKit.swift +++ b/Sources/DOMKit/DOMKit.swift @@ -4,548 +4,15174 @@ import ECMAScript import JavaScriptEventLoop import JavaScriptKit -public class Blob: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - self.jsObject = jsObject +public protocol ARIAMixin: JSBridgedClass {} +public extension ARIAMixin { + @inlinable var role: String? { + get { ReadWriteAttribute[Strings.role, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.role, in: jsObject] = newValue } } - @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) + @inlinable var ariaAtomic: String? { + get { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaAtomic, in: jsObject] = newValue } } - @ReadonlyAttribute - public var size: UInt64 - - @ReadonlyAttribute - public var type: String - - @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { - let this = jsObject - return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! + @inlinable var ariaAutoComplete: String? { + get { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaAutoComplete, in: jsObject] = newValue } } - // XXX: member 'stream' is ignored - - @inlinable public func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + @inlinable var ariaBusy: String? { + get { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaBusy, in: jsObject] = newValue } } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + @inlinable var ariaChecked: String? { + get { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaChecked, in: jsObject] = newValue } } - @inlinable public func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + @inlinable var ariaColCount: String? { + get { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColCount, in: jsObject] = newValue } } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + @inlinable var ariaColIndex: String? { + get { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColIndex, in: jsObject] = newValue } } -} -public class BlobPropertyBag: BridgedDictionary { - public convenience init(type: String, endings: EndingType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.endings] = endings.jsValue - self.init(unsafelyWrapping: object) + @inlinable var ariaColIndexText: String? { + get { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColIndexText, in: jsObject] = newValue } } - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) - super.init(unsafelyWrapping: object) + @inlinable var ariaColSpan: String? { + get { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaColSpan, in: jsObject] = newValue } } - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var endings: EndingType -} - -public class DOMException: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } + @inlinable var ariaCurrent: String? { + get { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaCurrent, in: jsObject] = newValue } + } - public let jsObject: JSObject + @inlinable var ariaDescription: String? { + get { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaDescription, in: jsObject] = newValue } + } - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - self.jsObject = jsObject + @inlinable var ariaDisabled: String? { + get { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaDisabled, in: jsObject] = newValue } } - @inlinable public convenience init(message: String? = nil, name: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) + @inlinable var ariaExpanded: String? { + get { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaExpanded, in: jsObject] = newValue } } - @ReadonlyAttribute - public var name: String + @inlinable var ariaHasPopup: String? { + get { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaHasPopup, in: jsObject] = newValue } + } - @ReadonlyAttribute - public var message: String + @inlinable var ariaHidden: String? { + get { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaHidden, in: jsObject] = newValue } + } - @ReadonlyAttribute - public var code: UInt16 + @inlinable var ariaInvalid: String? { + get { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaInvalid, in: jsObject] = newValue } + } - public static let INDEX_SIZE_ERR: UInt16 = 1 + @inlinable var ariaKeyShortcuts: String? { + get { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaKeyShortcuts, in: jsObject] = newValue } + } - public static let DOMSTRING_SIZE_ERR: UInt16 = 2 + @inlinable var ariaLabel: String? { + get { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaLabel, in: jsObject] = newValue } + } - public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 + @inlinable var ariaLevel: String? { + get { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaLevel, in: jsObject] = newValue } + } - public static let WRONG_DOCUMENT_ERR: UInt16 = 4 + @inlinable var ariaLive: String? { + get { ReadWriteAttribute[Strings.ariaLive, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaLive, in: jsObject] = newValue } + } - public static let INVALID_CHARACTER_ERR: UInt16 = 5 + @inlinable var ariaModal: String? { + get { ReadWriteAttribute[Strings.ariaModal, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaModal, in: jsObject] = newValue } + } - public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 + @inlinable var ariaMultiLine: String? { + get { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaMultiLine, in: jsObject] = newValue } + } - public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 + @inlinable var ariaMultiSelectable: String? { + get { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaMultiSelectable, in: jsObject] = newValue } + } - public static let NOT_FOUND_ERR: UInt16 = 8 + @inlinable var ariaOrientation: String? { + get { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaOrientation, in: jsObject] = newValue } + } - public static let NOT_SUPPORTED_ERR: UInt16 = 9 + @inlinable var ariaPlaceholder: String? { + get { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaPlaceholder, in: jsObject] = newValue } + } - public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 + @inlinable var ariaPosInSet: String? { + get { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaPosInSet, in: jsObject] = newValue } + } - public static let INVALID_STATE_ERR: UInt16 = 11 + @inlinable var ariaPressed: String? { + get { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaPressed, in: jsObject] = newValue } + } - public static let SYNTAX_ERR: UInt16 = 12 + @inlinable var ariaReadOnly: String? { + get { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaReadOnly, in: jsObject] = newValue } + } - public static let INVALID_MODIFICATION_ERR: UInt16 = 13 + @inlinable var ariaRequired: String? { + get { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRequired, in: jsObject] = newValue } + } - public static let NAMESPACE_ERR: UInt16 = 14 + @inlinable var ariaRoleDescription: String? { + get { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRoleDescription, in: jsObject] = newValue } + } - public static let INVALID_ACCESS_ERR: UInt16 = 15 + @inlinable var ariaRowCount: String? { + get { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowCount, in: jsObject] = newValue } + } - public static let VALIDATION_ERR: UInt16 = 16 + @inlinable var ariaRowIndex: String? { + get { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowIndex, in: jsObject] = newValue } + } - public static let TYPE_MISMATCH_ERR: UInt16 = 17 + @inlinable var ariaRowIndexText: String? { + get { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowIndexText, in: jsObject] = newValue } + } - public static let SECURITY_ERR: UInt16 = 18 + @inlinable var ariaRowSpan: String? { + get { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaRowSpan, in: jsObject] = newValue } + } - public static let NETWORK_ERR: UInt16 = 19 + @inlinable var ariaSelected: String? { + get { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaSelected, in: jsObject] = newValue } + } - public static let ABORT_ERR: UInt16 = 20 + @inlinable var ariaSetSize: String? { + get { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaSetSize, in: jsObject] = newValue } + } - public static let URL_MISMATCH_ERR: UInt16 = 21 + @inlinable var ariaSort: String? { + get { ReadWriteAttribute[Strings.ariaSort, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaSort, in: jsObject] = newValue } + } - public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 + @inlinable var ariaValueMax: String? { + get { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueMax, in: jsObject] = newValue } + } - public static let TIMEOUT_ERR: UInt16 = 23 + @inlinable var ariaValueMin: String? { + get { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueMin, in: jsObject] = newValue } + } - public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 + @inlinable var ariaValueNow: String? { + get { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueNow, in: jsObject] = newValue } + } - public static let DATA_CLONE_ERR: UInt16 = 25 + @inlinable var ariaValueText: String? { + get { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.ariaValueText, in: jsObject] = newValue } + } } -public enum EndingType: JSString, JSValueCompatible { - case transparent = "transparent" - case native = "native" +public class AbortController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbortController].function! } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func abort(reason: JSValue? = nil) { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + } } -public class File: Blob { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } +public class AbortSignal: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AbortSignal].function! } public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + _aborted = ReadonlyAttribute(jsObject: jsObject, name: Strings.aborted) + _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) + _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) super.init(unsafelyWrapping: jsObject) } - @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) + @inlinable public static func abort(reason: JSValue? = nil) -> Self { + let this = constructor + return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func timeout(milliseconds: UInt64) -> Self { + let this = constructor + return this[Strings.timeout].function!(this: this, arguments: [milliseconds.jsValue]).fromJSValue()! } @ReadonlyAttribute - public var name: String + public var aborted: Bool @ReadonlyAttribute - public var lastModified: Int64 + public var reason: JSValue + + @inlinable public func throwIfAborted() { + let this = jsObject + _ = this[Strings.throwIfAborted].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onabort: EventHandler } -public class FileList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } +public class AbstractRange: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AbstractRange].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _startContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.startContainer) + _startOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.startOffset) + _endContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.endContainer) + _endOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.endOffset) + _collapsed = ReadonlyAttribute(jsObject: jsObject, name: Strings.collapsed) self.jsObject = jsObject } - @inlinable public subscript(key: Int) -> File? { - jsObject[key].fromJSValue() - } + @ReadonlyAttribute + public var startContainer: Node @ReadonlyAttribute - public var length: UInt32 + public var startOffset: UInt32 + + @ReadonlyAttribute + public var endContainer: Node + + @ReadonlyAttribute + public var endOffset: UInt32 + + @ReadonlyAttribute + public var collapsed: Bool } -public class FilePropertyBag: BridgedDictionary { - public convenience init(lastModified: Int64) { +public protocol AbstractWorker: JSBridgedClass {} +public extension AbstractWorker { + @inlinable var onerror: EventHandler { + get { ClosureAttribute1Optional[Strings.onerror, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onerror, in: jsObject] = newValue } + } +} + +public class AddEventListenerOptions: BridgedDictionary { + public convenience init(passive: Bool, once: Bool, signal: AbortSignal) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.lastModified] = lastModified.jsValue + object[Strings.passive] = passive.jsValue + object[Strings.once] = once.jsValue + object[Strings.signal] = signal.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) + _passive = ReadWriteAttribute(jsObject: object, name: Strings.passive) + _once = ReadWriteAttribute(jsObject: object, name: Strings.once) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var lastModified: Int64 -} + public var passive: Bool -public class FileReader: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - _onloadstart = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadstart) - _onprogress = ReadWriteAttribute(jsObject: jsObject, name: Strings.onprogress) - _onload = ReadWriteAttribute(jsObject: jsObject, name: Strings.onload) - _onabort = ReadWriteAttribute(jsObject: jsObject, name: Strings.onabort) - _onerror = ReadWriteAttribute(jsObject: jsObject, name: Strings.onerror) - _onloadend = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadend) - super.init(unsafelyWrapping: jsObject) - } + @ReadWriteAttribute + public var once: Bool - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } + @ReadWriteAttribute + public var signal: AbortSignal +} - @inlinable public func readAsArrayBuffer(blob: Blob) { +public protocol Animatable: JSBridgedClass {} +public extension Animatable { + @inlinable func animate(keyframes: JSObject?, options: JSValue? = nil) -> Animation { let this = jsObject - _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) + return this[Strings.animate].function!(this: this, arguments: [keyframes.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable public func readAsBinaryString(blob: Blob) { + @inlinable func getAnimations(options: GetAnimationsOptions? = nil) -> [Animation] { let this = jsObject - _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) + return this[Strings.getAnimations].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! } +} - @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { - let this = jsObject - _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) - } +public class Animation: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Animation].function! } - @inlinable public func readAsDataURL(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) + _effect = ReadWriteAttribute(jsObject: jsObject, name: Strings.effect) + _timeline = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeline) + _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) + _playState = ReadonlyAttribute(jsObject: jsObject, name: Strings.playState) + _replaceState = ReadonlyAttribute(jsObject: jsObject, name: Strings.replaceState) + _pending = ReadonlyAttribute(jsObject: jsObject, name: Strings.pending) + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _finished = ReadonlyAttribute(jsObject: jsObject, name: Strings.finished) + _onfinish = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onfinish) + _oncancel = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncancel) + _onremove = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremove) + super.init(unsafelyWrapping: jsObject) } - @inlinable public func abort() { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: []) + @inlinable public convenience init(effect: AnimationEffect? = nil, timeline: AnimationTimeline? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [effect?.jsValue ?? .undefined, timeline?.jsValue ?? .undefined])) } - public static let EMPTY: UInt16 = 0 + @ReadWriteAttribute + public var id: String - public static let LOADING: UInt16 = 1 + @ReadWriteAttribute + public var effect: AnimationEffect? - public static let DONE: UInt16 = 2 + @ReadWriteAttribute + public var timeline: AnimationTimeline? + + @ReadWriteAttribute + public var playbackRate: Double @ReadonlyAttribute - public var readyState: UInt16 + public var playState: AnimationPlayState @ReadonlyAttribute - public var result: JSValue? + public var replaceState: AnimationReplaceState @ReadonlyAttribute - public var error: DOMException? + public var pending: Bool - @ReadWriteAttribute - public var onloadstart: EventHandler + @ReadonlyAttribute + public var ready: JSPromise - @ReadWriteAttribute - public var onprogress: EventHandler + @ReadonlyAttribute + public var finished: JSPromise - @ReadWriteAttribute - public var onload: EventHandler + @ClosureAttribute1Optional + public var onfinish: EventHandler - @ReadWriteAttribute - public var onabort: EventHandler + @ClosureAttribute1Optional + public var oncancel: EventHandler - @ReadWriteAttribute - public var onerror: EventHandler + @ClosureAttribute1Optional + public var onremove: EventHandler - @ReadWriteAttribute - public var onloadend: EventHandler -} + @inlinable public func cancel() { + let this = jsObject + _ = this[Strings.cancel].function!(this: this, arguments: []) + } -public typealias DOMTimeStamp = UInt64 + @inlinable public func finish() { + let this = jsObject + _ = this[Strings.finish].function!(this: this, arguments: []) + } -public typealias VoidFunction = () -> Void -public class URL: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } + @inlinable public func play() { + let this = jsObject + _ = this[Strings.play].function!(this: this, arguments: []) + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @inlinable public func updatePlaybackRate(playbackRate: Double) { + let this = jsObject + _ = this[Strings.updatePlaybackRate].function!(this: this, arguments: [playbackRate.jsValue]) + } + + @inlinable public func reverse() { + let this = jsObject + _ = this[Strings.reverse].function!(this: this, arguments: []) + } + + @inlinable public func persist() { + let this = jsObject + _ = this[Strings.persist].function!(this: this, arguments: []) + } + + @inlinable public func commitStyles() { + let this = jsObject + _ = this[Strings.commitStyles].function!(this: this, arguments: []) + } +} + +public class AnimationEffect: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationEffect].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) - _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) self.jsObject = jsObject } - @inlinable public convenience init(url: String, base: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) + @inlinable public func getTiming() -> EffectTiming { + let this = jsObject + return this[Strings.getTiming].function!(this: this, arguments: []).fromJSValue()! } - @ReadWriteAttribute - public var href: String + @inlinable public func getComputedTiming() -> ComputedEffectTiming { + let this = jsObject + return this[Strings.getComputedTiming].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func updateTiming(timing: OptionalEffectTiming? = nil) { + let this = jsObject + _ = this[Strings.updateTiming].function!(this: this, arguments: [timing?.jsValue ?? .undefined]) + } +} + +public protocol AnimationFrameProvider: JSBridgedClass {} +public extension AnimationFrameProvider { + // XXX: method 'requestAnimationFrame' is ignored + + @inlinable func cancelAnimationFrame(handle: UInt32) { + let this = jsObject + _ = this[Strings.cancelAnimationFrame].function!(this: this, arguments: [handle.jsValue]) + } +} + +public enum AnimationPlayState: JSString, JSValueCompatible { + case idle = "idle" + case running = "running" + case paused = "paused" + case finished = "finished" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum AnimationReplaceState: JSString, JSValueCompatible { + case active = "active" + case removed = "removed" + case persisted = "persisted" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class AnimationTimeline: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AnimationTimeline].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _currentTime = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTime) + _phase = ReadonlyAttribute(jsObject: jsObject, name: Strings.phase) + self.jsObject = jsObject + } @ReadonlyAttribute - public var origin: String + public var currentTime: Double? + + @ReadonlyAttribute + public var phase: TimelinePhase +} + +public class AssignedNodesOptions: BridgedDictionary { + public convenience init(flatten: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.flatten] = flatten.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _flatten = ReadWriteAttribute(jsObject: object, name: Strings.flatten) + super.init(unsafelyWrapping: object) + } @ReadWriteAttribute - public var `protocol`: String + public var flatten: Bool +} + +public class Attr: Node { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Attr].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) + _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) + _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _ownerElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerElement) + _specified = ReadonlyAttribute(jsObject: jsObject, name: Strings.specified) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var namespaceURI: String? + + @ReadonlyAttribute + public var prefix: String? + + @ReadonlyAttribute + public var localName: String + + @ReadonlyAttribute + public var name: String @ReadWriteAttribute - public var username: String + public var value: String + + @ReadonlyAttribute + public var ownerElement: Element? + + @ReadonlyAttribute + public var specified: Bool +} + +public class AudioTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String @ReadWriteAttribute - public var password: String + public var enabled: Bool +} + +public class AudioTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AudioTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> AudioTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> AudioTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public class BarProp: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.BarProp].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _visible = ReadonlyAttribute(jsObject: jsObject, name: Strings.visible) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var visible: Bool +} + +public class BaseComputedKeyframe: BridgedDictionary { + public convenience init(offset: Double?, computedOffset: Double, easing: String, composite: CompositeOperationOrAuto) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.computedOffset] = computedOffset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _computedOffset = ReadWriteAttribute(jsObject: object, name: Strings.computedOffset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) + } @ReadWriteAttribute - public var host: String + public var offset: Double? @ReadWriteAttribute - public var hostname: String + public var computedOffset: Double @ReadWriteAttribute - public var port: String + public var easing: String @ReadWriteAttribute - public var pathname: String + public var composite: CompositeOperationOrAuto +} + +public class BaseKeyframe: BridgedDictionary { + public convenience init(offset: Double?, easing: String, composite: CompositeOperationOrAuto) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) + } @ReadWriteAttribute - public var search: String + public var offset: Double? - @ReadonlyAttribute - public var searchParams: URLSearchParams + @ReadWriteAttribute + public var easing: String @ReadWriteAttribute - public var hash: String + public var composite: CompositeOperationOrAuto +} - @inlinable public func toJSON() -> String { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! +public class BasePropertyIndexedKeyframe: BridgedDictionary { + public convenience init(offset: JSValue, easing: JSValue, composite: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) } - @inlinable public static func createObjectURL(obj: JSValue) -> String { - let this = constructor - return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) } - @inlinable public static func revokeObjectURL(url: String) { - let this = constructor - _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) + @ReadWriteAttribute + public var offset: JSValue + + @ReadWriteAttribute + public var easing: JSValue + + @ReadWriteAttribute + public var composite: JSValue +} + +public class BeforeUnloadEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BeforeUnloadEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) } + + // XXX: member 'returnValue' is ignored } -public class URLSearchParams: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } +public class Blob: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) self.jsObject = jsObject } - @inlinable public convenience init(init: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) } - @inlinable public func append(name: String, value: String) { + @ReadonlyAttribute + public var size: UInt64 + + @ReadonlyAttribute + public var type: String + + @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable public func delete(name: String) { + // XXX: member 'stream' is ignored + + @inlinable public func text() -> JSPromise { let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class BlobPropertyBag: BridgedDictionary { + public convenience init(type: String, endings: EndingType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.endings] = endings.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var endings: EndingType +} + +public protocol Body: JSBridgedClass {} +public extension Body { + // XXX: attribute 'body' is ignored + + @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } + + @inlinable func arrayBuffer() -> JSPromise { + let this = jsObject + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func arrayBuffer() async throws -> ArrayBuffer { + let this = jsObject + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func blob() -> JSPromise { + let this = jsObject + return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func blob() async throws -> Blob { + let this = jsObject + let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func formData() -> JSPromise { + let this = jsObject + return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func formData() async throws -> FormData { + let this = jsObject + let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func json() -> JSPromise { + let this = jsObject + return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func json() async throws -> JSValue { + let this = jsObject + let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class BroadcastChannel: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(name: String) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) + } + + @ReadonlyAttribute + public var name: String + + @inlinable public func postMessage(message: JSValue) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue]) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class ByteLengthQueuingStrategy: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ByteLengthQueuingStrategy].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: QueuingStrategyInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var highWaterMark: Double + + @ReadonlyAttribute + public var size: JSFunction +} + +public class CDATASection: Text { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CDATASection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class Cache: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { + let this = jsObject + let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { + let this = jsObject + let _promise: JSPromise = this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func add(request: RequestInfo) -> JSPromise { + let this = jsObject + return this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func add(request: RequestInfo) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { + let this = jsObject + return this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addAll(requests: [RequestInfo]) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { + let this = jsObject + return this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func put(request: RequestInfo, response: Response) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { + let this = jsObject + let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class CacheQueryOptions: BridgedDictionary { + public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.ignoreSearch] = ignoreSearch.jsValue + object[Strings.ignoreMethod] = ignoreMethod.jsValue + object[Strings.ignoreVary] = ignoreVary.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _ignoreSearch = ReadWriteAttribute(jsObject: object, name: Strings.ignoreSearch) + _ignoreMethod = ReadWriteAttribute(jsObject: object, name: Strings.ignoreMethod) + _ignoreVary = ReadWriteAttribute(jsObject: object, name: Strings.ignoreVary) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var ignoreSearch: Bool + + @ReadWriteAttribute + public var ignoreMethod: Bool + + @ReadWriteAttribute + public var ignoreVary: Bool +} + +public class CacheStorage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CacheStorage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { + let this = jsObject + let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func has(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func has(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func open(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func open(cacheName: String) async throws -> Cache { + let this = jsObject + let _promise: JSPromise = this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func delete(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func keys() -> JSPromise { + let this = jsObject + return this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys() async throws -> [String] { + let this = jsObject + let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public enum CanPlayTypeResult: JSString, JSValueCompatible { + case _empty = "" + case maybe = "maybe" + case probably = "probably" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasCompositing: JSBridgedClass {} +public extension CanvasCompositing { + @inlinable var globalAlpha: Double { + get { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] = newValue } + } + + @inlinable var globalCompositeOperation: String { + get { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] = newValue } + } +} + +public enum CanvasDirection: JSString, JSValueCompatible { + case ltr = "ltr" + case rtl = "rtl" + case inherit = "inherit" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasDrawImage: JSBridgedClass {} +public extension CanvasDrawImage { + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { + let this = jsObject + _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) + } + + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { + let this = jsObject + _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) + } + + @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = dx.jsValue + let _arg6 = dy.jsValue + let _arg7 = dw.jsValue + let _arg8 = dh.jsValue + let this = jsObject + _ = this[Strings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } +} + +public protocol CanvasDrawPath: JSBridgedClass {} +public extension CanvasDrawPath { + @inlinable func beginPath() { + let this = jsObject + _ = this[Strings.beginPath].function!(this: this, arguments: []) + } + + @inlinable func fill(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + } + + @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + } + + @inlinable func stroke() { + let this = jsObject + _ = this[Strings.stroke].function!(this: this, arguments: []) + } + + @inlinable func stroke(path: Path2D) { + let this = jsObject + _ = this[Strings.stroke].function!(this: this, arguments: [path.jsValue]) + } + + @inlinable func clip(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + } + + @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + } + + @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[Strings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[Strings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { + let this = jsObject + return this[Strings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { + let this = jsObject + return this[Strings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } +} + +public enum CanvasFillRule: JSString, JSValueCompatible { + case nonzero = "nonzero" + case evenodd = "evenodd" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasFillStrokeStyles: JSBridgedClass {} +public extension CanvasFillStrokeStyles { + @inlinable var strokeStyle: JSValue { + get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } + } + + @inlinable var fillStyle: JSValue { + get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } + } + + @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { + let this = jsObject + return this[Strings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! + } + + @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { + let _arg0 = x0.jsValue + let _arg1 = y0.jsValue + let _arg2 = r0.jsValue + let _arg3 = x1.jsValue + let _arg4 = y1.jsValue + let _arg5 = r1.jsValue + let this = jsObject + return this[Strings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { + let this = jsObject + return this[Strings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { + let this = jsObject + return this[Strings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! + } +} + +public class CanvasFilter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasFilter].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(filters: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) + } +} + +public protocol CanvasFilters: JSBridgedClass {} +public extension CanvasFilters { + @inlinable var filter: JSValue { + get { ReadWriteAttribute[Strings.filter, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } + } +} + +public enum CanvasFontKerning: JSString, JSValueCompatible { + case auto = "auto" + case normal = "normal" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasFontStretch: JSString, JSValueCompatible { + case ultraCondensed = "ultra-condensed" + case extraCondensed = "extra-condensed" + case condensed = "condensed" + case semiCondensed = "semi-condensed" + case normal = "normal" + case semiExpanded = "semi-expanded" + case expanded = "expanded" + case extraExpanded = "extra-expanded" + case ultraExpanded = "ultra-expanded" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasFontVariantCaps: JSString, JSValueCompatible { + case normal = "normal" + case smallCaps = "small-caps" + case allSmallCaps = "all-small-caps" + case petiteCaps = "petite-caps" + case allPetiteCaps = "all-petite-caps" + case unicase = "unicase" + case titlingCaps = "titling-caps" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CanvasGradient: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasGradient].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func addColorStop(offset: Double, color: String) { + let this = jsObject + _ = this[Strings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) + } +} + +public protocol CanvasImageData: JSBridgedClass {} +public extension CanvasImageData { + @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + let this = jsObject + return this[Strings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func createImageData(imagedata: ImageData) -> ImageData { + let this = jsObject + return this[Strings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! + } + + @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + let this = jsObject + return this[Strings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { + let this = jsObject + _ = this[Strings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) + } + + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { + let _arg0 = imagedata.jsValue + let _arg1 = dx.jsValue + let _arg2 = dy.jsValue + let _arg3 = dirtyX.jsValue + let _arg4 = dirtyY.jsValue + let _arg5 = dirtyWidth.jsValue + let _arg6 = dirtyHeight.jsValue + let this = jsObject + _ = this[Strings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } +} + +public protocol CanvasImageSmoothing: JSBridgedClass {} +public extension CanvasImageSmoothing { + @inlinable var imageSmoothingEnabled: Bool { + get { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] = newValue } + } + + @inlinable var imageSmoothingQuality: ImageSmoothingQuality { + get { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] = newValue } + } +} + +public enum CanvasLineCap: JSString, JSValueCompatible { + case butt = "butt" + case round = "round" + case square = "square" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasLineJoin: JSString, JSValueCompatible { + case round = "round" + case bevel = "bevel" + case miter = "miter" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasPath: JSBridgedClass {} +public extension CanvasPath { + @inlinable func closePath() { + let this = jsObject + _ = this[Strings.closePath].function!(this: this, arguments: []) + } + + @inlinable func moveTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func lineTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { + let this = jsObject + _ = this[Strings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { + let _arg0 = cp1x.jsValue + let _arg1 = cp1y.jsValue + let _arg2 = cp2x.jsValue + let _arg3 = cp2y.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let this = jsObject + _ = this[Strings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { + let this = jsObject + _ = this[Strings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) + } + + @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: JSValue? = nil) { + let this = jsObject + _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) + } + + @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radius.jsValue + let _arg3 = startAngle.jsValue + let _arg4 = endAngle.jsValue + let _arg5 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radiusX.jsValue + let _arg3 = radiusY.jsValue + let _arg4 = rotation.jsValue + let _arg5 = startAngle.jsValue + let _arg6 = endAngle.jsValue + let _arg7 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public protocol CanvasPathDrawingStyles: JSBridgedClass {} +public extension CanvasPathDrawingStyles { + @inlinable var lineWidth: Double { + get { ReadWriteAttribute[Strings.lineWidth, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineWidth, in: jsObject] = newValue } + } + + @inlinable var lineCap: CanvasLineCap { + get { ReadWriteAttribute[Strings.lineCap, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineCap, in: jsObject] = newValue } + } + + @inlinable var lineJoin: CanvasLineJoin { + get { ReadWriteAttribute[Strings.lineJoin, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineJoin, in: jsObject] = newValue } + } + + @inlinable var miterLimit: Double { + get { ReadWriteAttribute[Strings.miterLimit, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.miterLimit, in: jsObject] = newValue } + } + + @inlinable func setLineDash(segments: [Double]) { + let this = jsObject + _ = this[Strings.setLineDash].function!(this: this, arguments: [segments.jsValue]) + } + + @inlinable func getLineDash() -> [Double] { + let this = jsObject + return this[Strings.getLineDash].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var lineDashOffset: Double { + get { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] = newValue } + } +} + +public class CanvasPattern: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasPattern].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } +} + +public protocol CanvasRect: JSBridgedClass {} +public extension CanvasRect { + @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } + + @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } +} + +public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasRenderingContext2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: HTMLCanvasElement + + @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { + let this = jsObject + return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class CanvasRenderingContext2DSettings: BridgedDictionary { + public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + object[Strings.desynchronized] = desynchronized.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.willReadFrequently] = willReadFrequently.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _willReadFrequently = ReadWriteAttribute(jsObject: object, name: Strings.willReadFrequently) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool + + @ReadWriteAttribute + public var desynchronized: Bool + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace + + @ReadWriteAttribute + public var willReadFrequently: Bool +} + +public protocol CanvasShadowStyles: JSBridgedClass {} +public extension CanvasShadowStyles { + @inlinable var shadowOffsetX: Double { + get { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] = newValue } + } + + @inlinable var shadowOffsetY: Double { + get { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] = newValue } + } + + @inlinable var shadowBlur: Double { + get { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] = newValue } + } + + @inlinable var shadowColor: String { + get { ReadWriteAttribute[Strings.shadowColor, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowColor, in: jsObject] = newValue } + } +} + +public protocol CanvasState: JSBridgedClass {} +public extension CanvasState { + @inlinable func save() { + let this = jsObject + _ = this[Strings.save].function!(this: this, arguments: []) + } + + @inlinable func restore() { + let this = jsObject + _ = this[Strings.restore].function!(this: this, arguments: []) + } + + @inlinable func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable func isContextLost() -> Bool { + let this = jsObject + return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + } +} + +public protocol CanvasText: JSBridgedClass {} +public extension CanvasText { + @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + let this = jsObject + _ = this[Strings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + } + + @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + let this = jsObject + _ = this[Strings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + } + + @inlinable func measureText(text: String) -> TextMetrics { + let this = jsObject + return this[Strings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! + } +} + +public enum CanvasTextAlign: JSString, JSValueCompatible { + case start = "start" + case end = "end" + case left = "left" + case right = "right" + case center = "center" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasTextBaseline: JSString, JSValueCompatible { + case top = "top" + case hanging = "hanging" + case middle = "middle" + case alphabetic = "alphabetic" + case ideographic = "ideographic" + case bottom = "bottom" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTextDrawingStyles: JSBridgedClass {} +public extension CanvasTextDrawingStyles { + @inlinable var font: String { + get { ReadWriteAttribute[Strings.font, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.font, in: jsObject] = newValue } + } + + @inlinable var textAlign: CanvasTextAlign { + get { ReadWriteAttribute[Strings.textAlign, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textAlign, in: jsObject] = newValue } + } + + @inlinable var textBaseline: CanvasTextBaseline { + get { ReadWriteAttribute[Strings.textBaseline, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textBaseline, in: jsObject] = newValue } + } + + @inlinable var direction: CanvasDirection { + get { ReadWriteAttribute[Strings.direction, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.direction, in: jsObject] = newValue } + } + + @inlinable var letterSpacing: String { + get { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] = newValue } + } + + @inlinable var fontKerning: CanvasFontKerning { + get { ReadWriteAttribute[Strings.fontKerning, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontKerning, in: jsObject] = newValue } + } + + @inlinable var fontStretch: CanvasFontStretch { + get { ReadWriteAttribute[Strings.fontStretch, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontStretch, in: jsObject] = newValue } + } + + @inlinable var fontVariantCaps: CanvasFontVariantCaps { + get { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] = newValue } + } + + @inlinable var textRendering: CanvasTextRendering { + get { ReadWriteAttribute[Strings.textRendering, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textRendering, in: jsObject] = newValue } + } + + @inlinable var wordSpacing: String { + get { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] = newValue } + } +} + +public enum CanvasTextRendering: JSString, JSValueCompatible { + case auto = "auto" + case optimizeSpeed = "optimizeSpeed" + case optimizeLegibility = "optimizeLegibility" + case geometricPrecision = "geometricPrecision" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTransform: JSBridgedClass {} +public extension CanvasTransform { + @inlinable func scale(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func rotate(angle: Double) { + let this = jsObject + _ = this[Strings.rotate].function!(this: this, arguments: [angle.jsValue]) + } + + @inlinable func translate(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[Strings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func getTransform() -> DOMMatrix { + let this = jsObject + return this[Strings.getTransform].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } + + @inlinable func resetTransform() { + let this = jsObject + _ = this[Strings.resetTransform].function!(this: this, arguments: []) + } +} + +public protocol CanvasUserInterface: JSBridgedClass {} +public extension CanvasUserInterface { + @inlinable func drawFocusIfNeeded(element: Element) { + let this = jsObject + _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) + } + + @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { + let this = jsObject + _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) + } + + @inlinable func scrollPathIntoView() { + let this = jsObject + _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: []) + } + + @inlinable func scrollPathIntoView(path: Path2D) { + let this = jsObject + _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) + } +} + +public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var data: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { + let this = jsObject + return this[Strings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! + } + + @inlinable public func appendData(data: String) { + let this = jsObject + _ = this[Strings.appendData].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func insertData(offset: UInt32, data: String) { + let this = jsObject + _ = this[Strings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) + } + + @inlinable public func deleteData(offset: UInt32, count: UInt32) { + let this = jsObject + _ = this[Strings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) + } + + @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { + let this = jsObject + _ = this[Strings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) + } +} + +public protocol ChildNode: JSBridgedClass {} +public extension ChildNode { + @inlinable func before(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func after(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceWith(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func remove() { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: []) + } +} + +public class ClientQueryOptions: BridgedDictionary { + public convenience init(includeUncontrolled: Bool, type: ClientType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.includeUncontrolled] = includeUncontrolled.jsValue + object[Strings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: Strings.includeUncontrolled) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var includeUncontrolled: Bool + + @ReadWriteAttribute + public var type: ClientType +} + +public enum ClientType: JSString, JSValueCompatible { + case window = "window" + case worker = "worker" + case sharedworker = "sharedworker" + case all = "all" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ColorSpaceConversion: JSString, JSValueCompatible { + case none = "none" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Comment: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Comment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } +} + +public enum CompositeOperation: JSString, JSValueCompatible { + case replace = "replace" + case add = "add" + case accumulate = "accumulate" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CompositeOperationOrAuto: JSString, JSValueCompatible { + case replace = "replace" + case add = "add" + case accumulate = "accumulate" + case auto = "auto" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CompositionEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CompositionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: CompositionEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: String + + @inlinable public func initCompositionEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: WindowProxy? = nil, dataArg: String? = nil) { + let this = jsObject + _ = this[Strings.initCompositionEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, dataArg?.jsValue ?? .undefined]) + } +} + +public class CompositionEventInit: BridgedDictionary { + public convenience init(data: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: String +} + +public class ComputedEffectTiming: BridgedDictionary { + public convenience init(progress: Double?, currentIteration: Double?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.progress] = progress.jsValue + object[Strings.currentIteration] = currentIteration.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _progress = ReadWriteAttribute(jsObject: object, name: Strings.progress) + _currentIteration = ReadWriteAttribute(jsObject: object, name: Strings.currentIteration) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var progress: Double? + + @ReadWriteAttribute + public var currentIteration: Double? +} + +public class CountQueuingStrategy: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: QueuingStrategyInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var highWaterMark: Double + + @ReadonlyAttribute + public var size: JSFunction +} + +public class CustomElementRegistry: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CustomElementRegistry].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { + let this = jsObject + _ = this[Strings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func get(name: String) -> CustomElementConstructor? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func whenDefined(name: String) -> JSPromise { + let this = jsObject + return this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { + let this = jsObject + let _promise: JSPromise = this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func upgrade(root: Node) { + let this = jsObject + _ = this[Strings.upgrade].function!(this: this, arguments: [root.jsValue]) + } +} + +public class CustomEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CustomEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var detail: JSValue + + @inlinable public func initCustomEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, detail: JSValue? = nil) { + let this = jsObject + _ = this[Strings.initCustomEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined, detail?.jsValue ?? .undefined]) + } +} + +public class CustomEventInit: BridgedDictionary { + public convenience init(detail: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.detail] = detail.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var detail: JSValue +} + +public class DOMException: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + self.jsObject = jsObject + } + + @inlinable public convenience init(message: String? = nil, name: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var code: UInt16 + + public static let INDEX_SIZE_ERR: UInt16 = 1 + + public static let DOMSTRING_SIZE_ERR: UInt16 = 2 + + public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 + + public static let WRONG_DOCUMENT_ERR: UInt16 = 4 + + public static let INVALID_CHARACTER_ERR: UInt16 = 5 + + public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 + + public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 + + public static let NOT_FOUND_ERR: UInt16 = 8 + + public static let NOT_SUPPORTED_ERR: UInt16 = 9 + + public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 + + public static let INVALID_STATE_ERR: UInt16 = 11 + + public static let SYNTAX_ERR: UInt16 = 12 + + public static let INVALID_MODIFICATION_ERR: UInt16 = 13 + + public static let NAMESPACE_ERR: UInt16 = 14 + + public static let INVALID_ACCESS_ERR: UInt16 = 15 + + public static let VALIDATION_ERR: UInt16 = 16 + + public static let TYPE_MISMATCH_ERR: UInt16 = 17 + + public static let SECURITY_ERR: UInt16 = 18 + + public static let NETWORK_ERR: UInt16 = 19 + + public static let ABORT_ERR: UInt16 = 20 + + public static let URL_MISMATCH_ERR: UInt16 = 21 + + public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 + + public static let TIMEOUT_ERR: UInt16 = 23 + + public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 + + public static let DATA_CLONE_ERR: UInt16 = 25 +} + +public class DOMImplementation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMImplementation].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func createDocumentType(qualifiedName: String, publicId: String, systemId: String) -> DocumentType { + let this = jsObject + return this[Strings.createDocumentType].function!(this: this, arguments: [qualifiedName.jsValue, publicId.jsValue, systemId.jsValue]).fromJSValue()! + } + + @inlinable public func createDocument(namespace: String?, qualifiedName: String, doctype: DocumentType? = nil) -> XMLDocument { + let this = jsObject + return this[Strings.createDocument].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, doctype?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createHTMLDocument(title: String? = nil) -> Document { + let this = jsObject + return this[Strings.createHTMLDocument].function!(this: this, arguments: [title?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func hasFeature() -> Bool { + let this = jsObject + return this[Strings.hasFeature].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMMatrix: DOMMatrixReadOnly { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrix].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _a = ReadWriteAttribute(jsObject: jsObject, name: Strings.a) + _b = ReadWriteAttribute(jsObject: jsObject, name: Strings.b) + _c = ReadWriteAttribute(jsObject: jsObject, name: Strings.c) + _d = ReadWriteAttribute(jsObject: jsObject, name: Strings.d) + _e = ReadWriteAttribute(jsObject: jsObject, name: Strings.e) + _f = ReadWriteAttribute(jsObject: jsObject, name: Strings.f) + _m11 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m11) + _m12 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m12) + _m13 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m13) + _m14 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m14) + _m21 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m21) + _m22 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m22) + _m23 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m23) + _m24 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m24) + _m31 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m31) + _m32 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m32) + _m33 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m33) + _m34 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m34) + _m41 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m41) + _m42 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m42) + _m43 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m43) + _m44 = ReadWriteAttribute(jsObject: jsObject, name: Strings.m44) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(init: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + // XXX: illegal static override + // override public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self + + // XXX: illegal static override + // override public static func fromFloat32Array(array32: Float32Array) -> Self + + // XXX: illegal static override + // override public static func fromFloat64Array(array64: Float64Array) -> Self + + @usableFromInline let _a: ReadWriteAttribute + @inlinable override public var a: Double { + get { _a.wrappedValue } + set { _a.wrappedValue = newValue } + } + + @usableFromInline let _b: ReadWriteAttribute + @inlinable override public var b: Double { + get { _b.wrappedValue } + set { _b.wrappedValue = newValue } + } + + @usableFromInline let _c: ReadWriteAttribute + @inlinable override public var c: Double { + get { _c.wrappedValue } + set { _c.wrappedValue = newValue } + } + + @usableFromInline let _d: ReadWriteAttribute + @inlinable override public var d: Double { + get { _d.wrappedValue } + set { _d.wrappedValue = newValue } + } + + @usableFromInline let _e: ReadWriteAttribute + @inlinable override public var e: Double { + get { _e.wrappedValue } + set { _e.wrappedValue = newValue } + } + + @usableFromInline let _f: ReadWriteAttribute + @inlinable override public var f: Double { + get { _f.wrappedValue } + set { _f.wrappedValue = newValue } + } + + @usableFromInline let _m11: ReadWriteAttribute + @inlinable override public var m11: Double { + get { _m11.wrappedValue } + set { _m11.wrappedValue = newValue } + } + + @usableFromInline let _m12: ReadWriteAttribute + @inlinable override public var m12: Double { + get { _m12.wrappedValue } + set { _m12.wrappedValue = newValue } + } + + @usableFromInline let _m13: ReadWriteAttribute + @inlinable override public var m13: Double { + get { _m13.wrappedValue } + set { _m13.wrappedValue = newValue } + } + + @usableFromInline let _m14: ReadWriteAttribute + @inlinable override public var m14: Double { + get { _m14.wrappedValue } + set { _m14.wrappedValue = newValue } + } + + @usableFromInline let _m21: ReadWriteAttribute + @inlinable override public var m21: Double { + get { _m21.wrappedValue } + set { _m21.wrappedValue = newValue } + } + + @usableFromInline let _m22: ReadWriteAttribute + @inlinable override public var m22: Double { + get { _m22.wrappedValue } + set { _m22.wrappedValue = newValue } + } + + @usableFromInline let _m23: ReadWriteAttribute + @inlinable override public var m23: Double { + get { _m23.wrappedValue } + set { _m23.wrappedValue = newValue } + } + + @usableFromInline let _m24: ReadWriteAttribute + @inlinable override public var m24: Double { + get { _m24.wrappedValue } + set { _m24.wrappedValue = newValue } + } + + @usableFromInline let _m31: ReadWriteAttribute + @inlinable override public var m31: Double { + get { _m31.wrappedValue } + set { _m31.wrappedValue = newValue } + } + + @usableFromInline let _m32: ReadWriteAttribute + @inlinable override public var m32: Double { + get { _m32.wrappedValue } + set { _m32.wrappedValue = newValue } + } + + @usableFromInline let _m33: ReadWriteAttribute + @inlinable override public var m33: Double { + get { _m33.wrappedValue } + set { _m33.wrappedValue = newValue } + } + + @usableFromInline let _m34: ReadWriteAttribute + @inlinable override public var m34: Double { + get { _m34.wrappedValue } + set { _m34.wrappedValue = newValue } + } + + @usableFromInline let _m41: ReadWriteAttribute + @inlinable override public var m41: Double { + get { _m41.wrappedValue } + set { _m41.wrappedValue = newValue } + } + + @usableFromInline let _m42: ReadWriteAttribute + @inlinable override public var m42: Double { + get { _m42.wrappedValue } + set { _m42.wrappedValue = newValue } + } + + @usableFromInline let _m43: ReadWriteAttribute + @inlinable override public var m43: Double { + get { _m43.wrappedValue } + set { _m43.wrappedValue = newValue } + } + + @usableFromInline let _m44: ReadWriteAttribute + @inlinable override public var m44: Double { + get { _m44.wrappedValue } + set { _m44.wrappedValue = newValue } + } + + @inlinable public func multiplySelf(other: DOMMatrixInit? = nil) -> Self { + let this = jsObject + return this[Strings.multiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func preMultiplySelf(other: DOMMatrixInit? = nil) -> Self { + let this = jsObject + return this[Strings.preMultiplySelf].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func translateSelf(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> Self { + let this = jsObject + return this[Strings.translateSelf].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scaleSelf(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { + let _arg0 = scaleX?.jsValue ?? .undefined + let _arg1 = scaleY?.jsValue ?? .undefined + let _arg2 = scaleZ?.jsValue ?? .undefined + let _arg3 = originX?.jsValue ?? .undefined + let _arg4 = originY?.jsValue ?? .undefined + let _arg5 = originZ?.jsValue ?? .undefined + let this = jsObject + return this[Strings.scaleSelf].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable public func scale3dSelf(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> Self { + let this = jsObject + return this[Strings.scale3dSelf].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateSelf(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> Self { + let this = jsObject + return this[Strings.rotateSelf].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateFromVectorSelf(x: Double? = nil, y: Double? = nil) -> Self { + let this = jsObject + return this[Strings.rotateFromVectorSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateAxisAngleSelf(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> Self { + let this = jsObject + return this[Strings.rotateAxisAngleSelf].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewXSelf(sx: Double? = nil) -> Self { + let this = jsObject + return this[Strings.skewXSelf].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewYSelf(sy: Double? = nil) -> Self { + let this = jsObject + return this[Strings.skewYSelf].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func invertSelf() -> Self { + let this = jsObject + return this[Strings.invertSelf].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setMatrixValue(transformList: String) -> Self { + let this = jsObject + return this[Strings.setMatrixValue].function!(this: this, arguments: [transformList.jsValue]).fromJSValue()! + } +} + +public class DOMMatrix2DInit: BridgedDictionary { + public convenience init(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double, m11: Double, m12: Double, m21: Double, m22: Double, m41: Double, m42: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.a] = a.jsValue + object[Strings.b] = b.jsValue + object[Strings.c] = c.jsValue + object[Strings.d] = d.jsValue + object[Strings.e] = e.jsValue + object[Strings.f] = f.jsValue + object[Strings.m11] = m11.jsValue + object[Strings.m12] = m12.jsValue + object[Strings.m21] = m21.jsValue + object[Strings.m22] = m22.jsValue + object[Strings.m41] = m41.jsValue + object[Strings.m42] = m42.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _a = ReadWriteAttribute(jsObject: object, name: Strings.a) + _b = ReadWriteAttribute(jsObject: object, name: Strings.b) + _c = ReadWriteAttribute(jsObject: object, name: Strings.c) + _d = ReadWriteAttribute(jsObject: object, name: Strings.d) + _e = ReadWriteAttribute(jsObject: object, name: Strings.e) + _f = ReadWriteAttribute(jsObject: object, name: Strings.f) + _m11 = ReadWriteAttribute(jsObject: object, name: Strings.m11) + _m12 = ReadWriteAttribute(jsObject: object, name: Strings.m12) + _m21 = ReadWriteAttribute(jsObject: object, name: Strings.m21) + _m22 = ReadWriteAttribute(jsObject: object, name: Strings.m22) + _m41 = ReadWriteAttribute(jsObject: object, name: Strings.m41) + _m42 = ReadWriteAttribute(jsObject: object, name: Strings.m42) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var a: Double + + @ReadWriteAttribute + public var b: Double + + @ReadWriteAttribute + public var c: Double + + @ReadWriteAttribute + public var d: Double + + @ReadWriteAttribute + public var e: Double + + @ReadWriteAttribute + public var f: Double + + @ReadWriteAttribute + public var m11: Double + + @ReadWriteAttribute + public var m12: Double + + @ReadWriteAttribute + public var m21: Double + + @ReadWriteAttribute + public var m22: Double + + @ReadWriteAttribute + public var m41: Double + + @ReadWriteAttribute + public var m42: Double +} + +public class DOMMatrixInit: BridgedDictionary { + public convenience init(m13: Double, m14: Double, m23: Double, m24: Double, m31: Double, m32: Double, m33: Double, m34: Double, m43: Double, m44: Double, is2D: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.m13] = m13.jsValue + object[Strings.m14] = m14.jsValue + object[Strings.m23] = m23.jsValue + object[Strings.m24] = m24.jsValue + object[Strings.m31] = m31.jsValue + object[Strings.m32] = m32.jsValue + object[Strings.m33] = m33.jsValue + object[Strings.m34] = m34.jsValue + object[Strings.m43] = m43.jsValue + object[Strings.m44] = m44.jsValue + object[Strings.is2D] = is2D.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _m13 = ReadWriteAttribute(jsObject: object, name: Strings.m13) + _m14 = ReadWriteAttribute(jsObject: object, name: Strings.m14) + _m23 = ReadWriteAttribute(jsObject: object, name: Strings.m23) + _m24 = ReadWriteAttribute(jsObject: object, name: Strings.m24) + _m31 = ReadWriteAttribute(jsObject: object, name: Strings.m31) + _m32 = ReadWriteAttribute(jsObject: object, name: Strings.m32) + _m33 = ReadWriteAttribute(jsObject: object, name: Strings.m33) + _m34 = ReadWriteAttribute(jsObject: object, name: Strings.m34) + _m43 = ReadWriteAttribute(jsObject: object, name: Strings.m43) + _m44 = ReadWriteAttribute(jsObject: object, name: Strings.m44) + _is2D = ReadWriteAttribute(jsObject: object, name: Strings.is2D) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var m13: Double + + @ReadWriteAttribute + public var m14: Double + + @ReadWriteAttribute + public var m23: Double + + @ReadWriteAttribute + public var m24: Double + + @ReadWriteAttribute + public var m31: Double + + @ReadWriteAttribute + public var m32: Double + + @ReadWriteAttribute + public var m33: Double + + @ReadWriteAttribute + public var m34: Double + + @ReadWriteAttribute + public var m43: Double + + @ReadWriteAttribute + public var m44: Double + + @ReadWriteAttribute + public var is2D: Bool +} + +public class DOMMatrixReadOnly: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMMatrixReadOnly].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _a = ReadonlyAttribute(jsObject: jsObject, name: Strings.a) + _b = ReadonlyAttribute(jsObject: jsObject, name: Strings.b) + _c = ReadonlyAttribute(jsObject: jsObject, name: Strings.c) + _d = ReadonlyAttribute(jsObject: jsObject, name: Strings.d) + _e = ReadonlyAttribute(jsObject: jsObject, name: Strings.e) + _f = ReadonlyAttribute(jsObject: jsObject, name: Strings.f) + _m11 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m11) + _m12 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m12) + _m13 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m13) + _m14 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m14) + _m21 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m21) + _m22 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m22) + _m23 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m23) + _m24 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m24) + _m31 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m31) + _m32 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m32) + _m33 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m33) + _m34 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m34) + _m41 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m41) + _m42 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m42) + _m43 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m43) + _m44 = ReadonlyAttribute(jsObject: jsObject, name: Strings.m44) + _is2D = ReadonlyAttribute(jsObject: jsObject, name: Strings.is2D) + _isIdentity = ReadonlyAttribute(jsObject: jsObject, name: Strings.isIdentity) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public static func fromMatrix(other: DOMMatrixInit? = nil) -> Self { + let this = constructor + return this[Strings.fromMatrix].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func fromFloat32Array(array32: Float32Array) -> Self { + let this = constructor + return this[Strings.fromFloat32Array].function!(this: this, arguments: [array32.jsValue]).fromJSValue()! + } + + @inlinable public static func fromFloat64Array(array64: Float64Array) -> Self { + let this = constructor + return this[Strings.fromFloat64Array].function!(this: this, arguments: [array64.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var a: Double + + @ReadonlyAttribute + public var b: Double + + @ReadonlyAttribute + public var c: Double + + @ReadonlyAttribute + public var d: Double + + @ReadonlyAttribute + public var e: Double + + @ReadonlyAttribute + public var f: Double + + @ReadonlyAttribute + public var m11: Double + + @ReadonlyAttribute + public var m12: Double + + @ReadonlyAttribute + public var m13: Double + + @ReadonlyAttribute + public var m14: Double + + @ReadonlyAttribute + public var m21: Double + + @ReadonlyAttribute + public var m22: Double + + @ReadonlyAttribute + public var m23: Double + + @ReadonlyAttribute + public var m24: Double + + @ReadonlyAttribute + public var m31: Double + + @ReadonlyAttribute + public var m32: Double + + @ReadonlyAttribute + public var m33: Double + + @ReadonlyAttribute + public var m34: Double + + @ReadonlyAttribute + public var m41: Double + + @ReadonlyAttribute + public var m42: Double + + @ReadonlyAttribute + public var m43: Double + + @ReadonlyAttribute + public var m44: Double + + @ReadonlyAttribute + public var is2D: Bool + + @ReadonlyAttribute + public var isIdentity: Bool + + @inlinable public func translate(tx: Double? = nil, ty: Double? = nil, tz: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.translate].function!(this: this, arguments: [tx?.jsValue ?? .undefined, ty?.jsValue ?? .undefined, tz?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scale(scaleX: Double? = nil, scaleY: Double? = nil, scaleZ: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { + let _arg0 = scaleX?.jsValue ?? .undefined + let _arg1 = scaleY?.jsValue ?? .undefined + let _arg2 = scaleZ?.jsValue ?? .undefined + let _arg3 = originX?.jsValue ?? .undefined + let _arg4 = originY?.jsValue ?? .undefined + let _arg5 = originZ?.jsValue ?? .undefined + let this = jsObject + return this[Strings.scale].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @inlinable public func scaleNonUniform(scaleX: Double? = nil, scaleY: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.scaleNonUniform].function!(this: this, arguments: [scaleX?.jsValue ?? .undefined, scaleY?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scale3d(scale: Double? = nil, originX: Double? = nil, originY: Double? = nil, originZ: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.scale3d].function!(this: this, arguments: [scale?.jsValue ?? .undefined, originX?.jsValue ?? .undefined, originY?.jsValue ?? .undefined, originZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotate(rotX: Double? = nil, rotY: Double? = nil, rotZ: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.rotate].function!(this: this, arguments: [rotX?.jsValue ?? .undefined, rotY?.jsValue ?? .undefined, rotZ?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateFromVector(x: Double? = nil, y: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.rotateFromVector].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func rotateAxisAngle(x: Double? = nil, y: Double? = nil, z: Double? = nil, angle: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.rotateAxisAngle].function!(this: this, arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, angle?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewX(sx: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.skewX].function!(this: this, arguments: [sx?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func skewY(sy: Double? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.skewY].function!(this: this, arguments: [sy?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func multiply(other: DOMMatrixInit? = nil) -> DOMMatrix { + let this = jsObject + return this[Strings.multiply].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func flipX() -> DOMMatrix { + let this = jsObject + return this[Strings.flipX].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func flipY() -> DOMMatrix { + let this = jsObject + return this[Strings.flipY].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func inverse() -> DOMMatrix { + let this = jsObject + return this[Strings.inverse].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func transformPoint(point: DOMPointInit? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.transformPoint].function!(this: this, arguments: [point?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toFloat32Array() -> Float32Array { + let this = jsObject + return this[Strings.toFloat32Array].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func toFloat64Array() -> Float64Array { + let this = jsObject + return this[Strings.toFloat64Array].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMParser: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMParser].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func parseFromString(string: String, type: DOMParserSupportedType) -> Document { + let this = jsObject + return this[Strings.parseFromString].function!(this: this, arguments: [string.jsValue, type.jsValue]).fromJSValue()! + } +} + +public enum DOMParserSupportedType: JSString, JSValueCompatible { + case textHtml = "text/html" + case textXml = "text/xml" + case applicationXml = "application/xml" + case applicationXhtmlXml = "application/xhtml+xml" + case imageSvgXml = "image/svg+xml" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DOMPoint: DOMPointReadOnly { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMPoint].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) + _z = ReadWriteAttribute(jsObject: jsObject, name: Strings.z) + _w = ReadWriteAttribute(jsObject: jsObject, name: Strings.w) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) + } + + // XXX: illegal static override + // override public static func fromPoint(other: DOMPointInit? = nil) -> Self + + @usableFromInline let _x: ReadWriteAttribute + @inlinable override public var x: Double { + get { _x.wrappedValue } + set { _x.wrappedValue = newValue } + } + + @usableFromInline let _y: ReadWriteAttribute + @inlinable override public var y: Double { + get { _y.wrappedValue } + set { _y.wrappedValue = newValue } + } + + @usableFromInline let _z: ReadWriteAttribute + @inlinable override public var z: Double { + get { _z.wrappedValue } + set { _z.wrappedValue = newValue } + } + + @usableFromInline let _w: ReadWriteAttribute + @inlinable override public var w: Double { + get { _w.wrappedValue } + set { _w.wrappedValue = newValue } + } +} + +public class DOMPointInit: BridgedDictionary { + public convenience init(x: Double, y: Double, z: Double, w: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.x] = x.jsValue + object[Strings.y] = y.jsValue + object[Strings.z] = z.jsValue + object[Strings.w] = w.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _x = ReadWriteAttribute(jsObject: object, name: Strings.x) + _y = ReadWriteAttribute(jsObject: object, name: Strings.y) + _z = ReadWriteAttribute(jsObject: object, name: Strings.z) + _w = ReadWriteAttribute(jsObject: object, name: Strings.w) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var x: Double + + @ReadWriteAttribute + public var y: Double + + @ReadWriteAttribute + public var z: Double + + @ReadWriteAttribute + public var w: Double +} + +public class DOMPointReadOnly: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMPointReadOnly].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) + _z = ReadonlyAttribute(jsObject: jsObject, name: Strings.z) + _w = ReadonlyAttribute(jsObject: jsObject, name: Strings.w) + self.jsObject = jsObject + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, z: Double? = nil, w: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, z?.jsValue ?? .undefined, w?.jsValue ?? .undefined])) + } + + @inlinable public static func fromPoint(other: DOMPointInit? = nil) -> Self { + let this = constructor + return this[Strings.fromPoint].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var x: Double + + @ReadonlyAttribute + public var y: Double + + @ReadonlyAttribute + public var z: Double + + @ReadonlyAttribute + public var w: Double + + @inlinable public func matrixTransform(matrix: DOMMatrixInit? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.matrixTransform].function!(this: this, arguments: [matrix?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMQuad: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMQuad].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _p1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p1) + _p2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p2) + _p3 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p3) + _p4 = ReadonlyAttribute(jsObject: jsObject, name: Strings.p4) + self.jsObject = jsObject + } + + @inlinable public convenience init(p1: DOMPointInit? = nil, p2: DOMPointInit? = nil, p3: DOMPointInit? = nil, p4: DOMPointInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [p1?.jsValue ?? .undefined, p2?.jsValue ?? .undefined, p3?.jsValue ?? .undefined, p4?.jsValue ?? .undefined])) + } + + @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { + let this = constructor + return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public static func fromQuad(other: DOMQuadInit? = nil) -> Self { + let this = constructor + return this[Strings.fromQuad].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var p1: DOMPoint + + @ReadonlyAttribute + public var p2: DOMPoint + + @ReadonlyAttribute + public var p3: DOMPoint + + @ReadonlyAttribute + public var p4: DOMPoint + + @inlinable public func getBounds() -> DOMRect { + let this = jsObject + return this[Strings.getBounds].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMQuadInit: BridgedDictionary { + public convenience init(p1: DOMPointInit, p2: DOMPointInit, p3: DOMPointInit, p4: DOMPointInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.p1] = p1.jsValue + object[Strings.p2] = p2.jsValue + object[Strings.p3] = p3.jsValue + object[Strings.p4] = p4.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _p1 = ReadWriteAttribute(jsObject: object, name: Strings.p1) + _p2 = ReadWriteAttribute(jsObject: object, name: Strings.p2) + _p3 = ReadWriteAttribute(jsObject: object, name: Strings.p3) + _p4 = ReadWriteAttribute(jsObject: object, name: Strings.p4) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var p1: DOMPointInit + + @ReadWriteAttribute + public var p2: DOMPointInit + + @ReadWriteAttribute + public var p3: DOMPointInit + + @ReadWriteAttribute + public var p4: DOMPointInit +} + +public class DOMRect: DOMRectReadOnly { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DOMRect].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadWriteAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadWriteAttribute(jsObject: jsObject, name: Strings.y) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) + } + + // XXX: illegal static override + // override public static func fromRect(other: DOMRectInit? = nil) -> Self + + @usableFromInline let _x: ReadWriteAttribute + @inlinable override public var x: Double { + get { _x.wrappedValue } + set { _x.wrappedValue = newValue } + } + + @usableFromInline let _y: ReadWriteAttribute + @inlinable override public var y: Double { + get { _y.wrappedValue } + set { _y.wrappedValue = newValue } + } + + @usableFromInline let _width: ReadWriteAttribute + @inlinable override public var width: Double { + get { _width.wrappedValue } + set { _width.wrappedValue = newValue } + } + + @usableFromInline let _height: ReadWriteAttribute + @inlinable override public var height: Double { + get { _height.wrappedValue } + set { _height.wrappedValue = newValue } + } +} + +public class DOMRectInit: BridgedDictionary { + public convenience init(x: Double, y: Double, width: Double, height: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.x] = x.jsValue + object[Strings.y] = y.jsValue + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _x = ReadWriteAttribute(jsObject: object, name: Strings.x) + _y = ReadWriteAttribute(jsObject: object, name: Strings.y) + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var x: Double + + @ReadWriteAttribute + public var y: Double + + @ReadWriteAttribute + public var width: Double + + @ReadWriteAttribute + public var height: Double +} + +public class DOMRectList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> DOMRect? { + jsObject[key].fromJSValue() + } +} + +public class DOMRectReadOnly: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMRectReadOnly].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) + _right = ReadonlyAttribute(jsObject: jsObject, name: Strings.right) + _bottom = ReadonlyAttribute(jsObject: jsObject, name: Strings.bottom) + _left = ReadonlyAttribute(jsObject: jsObject, name: Strings.left) + self.jsObject = jsObject + } + + @inlinable public convenience init(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [x?.jsValue ?? .undefined, y?.jsValue ?? .undefined, width?.jsValue ?? .undefined, height?.jsValue ?? .undefined])) + } + + @inlinable public static func fromRect(other: DOMRectInit? = nil) -> Self { + let this = constructor + return this[Strings.fromRect].function!(this: this, arguments: [other?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var x: Double + + @ReadonlyAttribute + public var y: Double + + @ReadonlyAttribute + public var width: Double + + @ReadonlyAttribute + public var height: Double + + @ReadonlyAttribute + public var top: Double + + @ReadonlyAttribute + public var right: Double + + @ReadonlyAttribute + public var bottom: Double + + @ReadonlyAttribute + public var left: Double + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DOMStringList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> String? { + jsObject[key].fromJSValue() + } + + @inlinable public func contains(string: String) -> Bool { + let this = jsObject + return this[Strings.contains].function!(this: this, arguments: [string.jsValue]).fromJSValue()! + } +} + +public class DOMStringMap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMStringMap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public subscript(key: String) -> String { + jsObject[key].fromJSValue()! + } + + // XXX: unsupported setter for keys of type String + + // XXX: unsupported deleter for keys of type String +} + +public class DOMTokenList: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMTokenList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> String? { + jsObject[key].fromJSValue() + } + + @inlinable public func contains(token: String) -> Bool { + let this = jsObject + return this[Strings.contains].function!(this: this, arguments: [token.jsValue]).fromJSValue()! + } + + @inlinable public func add(tokens: String...) { + let this = jsObject + _ = this[Strings.add].function!(this: this, arguments: tokens.map(\.jsValue)) + } + + @inlinable public func remove(tokens: String...) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: tokens.map(\.jsValue)) + } + + @inlinable public func toggle(token: String, force: Bool? = nil) -> Bool { + let this = jsObject + return this[Strings.toggle].function!(this: this, arguments: [token.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func replace(token: String, newToken: String) -> Bool { + let this = jsObject + return this[Strings.replace].function!(this: this, arguments: [token.jsValue, newToken.jsValue]).fromJSValue()! + } + + @inlinable public func supports(token: String) -> Bool { + let this = jsObject + return this[Strings.supports].function!(this: this, arguments: [token.jsValue]).fromJSValue()! + } + + @ReadWriteAttribute + public var value: String + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class DataTransfer: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransfer].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _dropEffect = ReadWriteAttribute(jsObject: jsObject, name: Strings.dropEffect) + _effectAllowed = ReadWriteAttribute(jsObject: jsObject, name: Strings.effectAllowed) + _items = ReadonlyAttribute(jsObject: jsObject, name: Strings.items) + _types = ReadonlyAttribute(jsObject: jsObject, name: Strings.types) + _files = ReadonlyAttribute(jsObject: jsObject, name: Strings.files) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var dropEffect: String + + @ReadWriteAttribute + public var effectAllowed: String + + @ReadonlyAttribute + public var items: DataTransferItemList + + @inlinable public func setDragImage(image: Element, x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.setDragImage].function!(this: this, arguments: [image.jsValue, x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var types: [String] + + @inlinable public func getData(format: String) -> String { + let this = jsObject + return this[Strings.getData].function!(this: this, arguments: [format.jsValue]).fromJSValue()! + } + + @inlinable public func setData(format: String, data: String) { + let this = jsObject + _ = this[Strings.setData].function!(this: this, arguments: [format.jsValue, data.jsValue]) + } + + @inlinable public func clearData(format: String? = nil) { + let this = jsObject + _ = this[Strings.clearData].function!(this: this, arguments: [format?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var files: FileList +} + +public class DataTransferItem: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItem].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var type: String + + // XXX: member 'getAsString' is ignored + + @inlinable public func getAsFile() -> File? { + let this = jsObject + return this[Strings.getAsFile].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class DataTransferItemList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DataTransferItemList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> DataTransferItem { + jsObject[key].fromJSValue()! + } + + @inlinable public func add(data: String, type: String) -> DataTransferItem? { + let this = jsObject + return this[Strings.add].function!(this: this, arguments: [data.jsValue, type.jsValue]).fromJSValue()! + } + + @inlinable public func add(data: File) -> DataTransferItem? { + let this = jsObject + return this[Strings.add].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func remove(index: UInt32) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable public func clear() { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: []) + } +} + +public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) + _implementation = ReadonlyAttribute(jsObject: jsObject, name: Strings.implementation) + _URL = ReadonlyAttribute(jsObject: jsObject, name: Strings.URL) + _documentURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentURI) + _compatMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.compatMode) + _characterSet = ReadonlyAttribute(jsObject: jsObject, name: Strings.characterSet) + _charset = ReadonlyAttribute(jsObject: jsObject, name: Strings.charset) + _inputEncoding = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputEncoding) + _contentType = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentType) + _doctype = ReadonlyAttribute(jsObject: jsObject, name: Strings.doctype) + _documentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.documentElement) + _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) + _domain = ReadWriteAttribute(jsObject: jsObject, name: Strings.domain) + _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) + _cookie = ReadWriteAttribute(jsObject: jsObject, name: Strings.cookie) + _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) + _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) + _body = ReadWriteAttribute(jsObject: jsObject, name: Strings.body) + _head = ReadonlyAttribute(jsObject: jsObject, name: Strings.head) + _images = ReadonlyAttribute(jsObject: jsObject, name: Strings.images) + _embeds = ReadonlyAttribute(jsObject: jsObject, name: Strings.embeds) + _plugins = ReadonlyAttribute(jsObject: jsObject, name: Strings.plugins) + _links = ReadonlyAttribute(jsObject: jsObject, name: Strings.links) + _forms = ReadonlyAttribute(jsObject: jsObject, name: Strings.forms) + _scripts = ReadonlyAttribute(jsObject: jsObject, name: Strings.scripts) + _currentScript = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentScript) + _defaultView = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultView) + _designMode = ReadWriteAttribute(jsObject: jsObject, name: Strings.designMode) + _hidden = ReadonlyAttribute(jsObject: jsObject, name: Strings.hidden) + _visibilityState = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibilityState) + _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) + _onvisibilitychange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onvisibilitychange) + _fgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.fgColor) + _linkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.linkColor) + _vlinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.vlinkColor) + _alinkColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.alinkColor) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _anchors = ReadonlyAttribute(jsObject: jsObject, name: Strings.anchors) + _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) + _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var timeline: DocumentTimeline + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var implementation: DOMImplementation + + @ReadonlyAttribute + public var URL: String + + @ReadonlyAttribute + public var documentURI: String + + @ReadonlyAttribute + public var compatMode: String + + @ReadonlyAttribute + public var characterSet: String + + @ReadonlyAttribute + public var charset: String + + @ReadonlyAttribute + public var inputEncoding: String + + @ReadonlyAttribute + public var contentType: String + + @ReadonlyAttribute + public var doctype: DocumentType? + + @ReadonlyAttribute + public var documentElement: Element? + + @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! + } + + @inlinable public func createElement(localName: String, options: JSValue? = nil) -> Element { + let this = jsObject + return this[Strings.createElement].function!(this: this, arguments: [localName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createElementNS(namespace: String?, qualifiedName: String, options: JSValue? = nil) -> Element { + let this = jsObject + return this[Strings.createElementNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createDocumentFragment() -> DocumentFragment { + let this = jsObject + return this[Strings.createDocumentFragment].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func createTextNode(data: String) -> Text { + let this = jsObject + return this[Strings.createTextNode].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createCDATASection(data: String) -> CDATASection { + let this = jsObject + return this[Strings.createCDATASection].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createComment(data: String) -> Comment { + let this = jsObject + return this[Strings.createComment].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable public func createProcessingInstruction(target: String, data: String) -> ProcessingInstruction { + let this = jsObject + return this[Strings.createProcessingInstruction].function!(this: this, arguments: [target.jsValue, data.jsValue]).fromJSValue()! + } + + @inlinable public func importNode(node: Node, deep: Bool? = nil) -> Node { + let this = jsObject + return this[Strings.importNode].function!(this: this, arguments: [node.jsValue, deep?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func adoptNode(node: Node) -> Node { + let this = jsObject + return this[Strings.adoptNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public func createAttribute(localName: String) -> Attr { + let this = jsObject + return this[Strings.createAttribute].function!(this: this, arguments: [localName.jsValue]).fromJSValue()! + } + + @inlinable public func createAttributeNS(namespace: String?, qualifiedName: String) -> Attr { + let this = jsObject + return this[Strings.createAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func createEvent(interface: String) -> Event { + let this = jsObject + return this[Strings.createEvent].function!(this: this, arguments: [interface.jsValue]).fromJSValue()! + } + + @inlinable public func createRange() -> Range { + let this = jsObject + return this[Strings.createRange].function!(this: this, arguments: []).fromJSValue()! + } + + // XXX: member 'createNodeIterator' is ignored + + // XXX: member 'createTreeWalker' is ignored + + @ReadonlyAttribute + public var location: Location? + + @ReadWriteAttribute + public var domain: String + + @ReadonlyAttribute + public var referrer: String + + @ReadWriteAttribute + public var cookie: String + + @ReadonlyAttribute + public var lastModified: String + + @ReadonlyAttribute + public var readyState: DocumentReadyState + + @inlinable public subscript(key: String) -> JSObject { + jsObject[key].fromJSValue()! + } + + @ReadWriteAttribute + public var title: String + + @ReadWriteAttribute + public var dir: String + + @ReadWriteAttribute + public var body: HTMLElement? + + @ReadonlyAttribute + public var head: HTMLHeadElement? + + @ReadonlyAttribute + public var images: HTMLCollection + + @ReadonlyAttribute + public var embeds: HTMLCollection + + @ReadonlyAttribute + public var plugins: HTMLCollection + + @ReadonlyAttribute + public var links: HTMLCollection + + @ReadonlyAttribute + public var forms: HTMLCollection + + @ReadonlyAttribute + public var scripts: HTMLCollection + + @inlinable public func getElementsByName(elementName: String) -> NodeList { + let this = jsObject + return this[Strings.getElementsByName].function!(this: this, arguments: [elementName.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var currentScript: HTMLOrSVGScriptElement? + + @inlinable public func open(unused1: String? = nil, unused2: String? = nil) -> Self { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [unused1?.jsValue ?? .undefined, unused2?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func open(url: String, name: String, features: String) -> WindowProxy? { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [url.jsValue, name.jsValue, features.jsValue]).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public func write(text: String...) { + let this = jsObject + _ = this[Strings.write].function!(this: this, arguments: text.map(\.jsValue)) + } + + @inlinable public func writeln(text: String...) { + let this = jsObject + _ = this[Strings.writeln].function!(this: this, arguments: text.map(\.jsValue)) + } + + @ReadonlyAttribute + public var defaultView: WindowProxy? + + @inlinable public func hasFocus() -> Bool { + let this = jsObject + return this[Strings.hasFocus].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var designMode: String + + @inlinable public func execCommand(commandId: String, showUI: Bool? = nil, value: String? = nil) -> Bool { + let this = jsObject + return this[Strings.execCommand].function!(this: this, arguments: [commandId.jsValue, showUI?.jsValue ?? .undefined, value?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func queryCommandEnabled(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandEnabled].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandIndeterm(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandIndeterm].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandState(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandState].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandSupported(commandId: String) -> Bool { + let this = jsObject + return this[Strings.queryCommandSupported].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @inlinable public func queryCommandValue(commandId: String) -> String { + let this = jsObject + return this[Strings.queryCommandValue].function!(this: this, arguments: [commandId.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var hidden: Bool + + @ReadonlyAttribute + public var visibilityState: DocumentVisibilityState + + @ClosureAttribute1Optional + public var onreadystatechange: EventHandler + + @ClosureAttribute1Optional + public var onvisibilitychange: EventHandler + + @ReadWriteAttribute + public var fgColor: String + + @ReadWriteAttribute + public var linkColor: String + + @ReadWriteAttribute + public var vlinkColor: String + + @ReadWriteAttribute + public var alinkColor: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadonlyAttribute + public var anchors: HTMLCollection + + @ReadonlyAttribute + public var applets: HTMLCollection + + @inlinable public func clear() { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public func captureEvents() { + let this = jsObject + _ = this[Strings.captureEvents].function!(this: this, arguments: []) + } + + @inlinable public func releaseEvents() { + let this = jsObject + _ = this[Strings.releaseEvents].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var all: HTMLAllCollection +} + +public protocol DocumentAndElementEventHandlers: JSBridgedClass {} +public extension DocumentAndElementEventHandlers { + @inlinable var oncopy: EventHandler { + get { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncopy, in: jsObject] = newValue } + } + + @inlinable var oncut: EventHandler { + get { ClosureAttribute1Optional[Strings.oncut, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncut, in: jsObject] = newValue } + } + + @inlinable var onpaste: EventHandler { + get { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpaste, in: jsObject] = newValue } + } +} + +public class DocumentFragment: Node, NonElementParentNode, ParentNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentFragment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol DocumentOrShadowRoot: JSBridgedClass {} +public extension DocumentOrShadowRoot { + @inlinable func getAnimations() -> [Animation] { + let this = jsObject + return this[Strings.getAnimations].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var activeElement: Element? { ReadonlyAttribute[Strings.activeElement, in: jsObject] } +} + +public enum DocumentReadyState: JSString, JSValueCompatible { + case loading = "loading" + case interactive = "interactive" + case complete = "complete" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DocumentTimeline: AnimationTimeline { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentTimeline].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(options: DocumentTimelineOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [options?.jsValue ?? .undefined])) + } +} + +public class DocumentTimelineOptions: BridgedDictionary { + public convenience init(originTime: DOMHighResTimeStamp) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.originTime] = originTime.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _originTime = ReadWriteAttribute(jsObject: object, name: Strings.originTime) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var originTime: DOMHighResTimeStamp +} + +public class DocumentType: Node, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DocumentType].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _publicId = ReadonlyAttribute(jsObject: jsObject, name: Strings.publicId) + _systemId = ReadonlyAttribute(jsObject: jsObject, name: Strings.systemId) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var publicId: String + + @ReadonlyAttribute + public var systemId: String +} + +public enum DocumentVisibilityState: JSString, JSValueCompatible { + case visible = "visible" + case hidden = "hidden" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class DragEvent: MouseEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DragEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _dataTransfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.dataTransfer) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: DragEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var dataTransfer: DataTransfer? +} + +public class DragEventInit: BridgedDictionary { + public convenience init(dataTransfer: DataTransfer?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.dataTransfer] = dataTransfer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _dataTransfer = ReadWriteAttribute(jsObject: object, name: Strings.dataTransfer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var dataTransfer: DataTransfer? +} + +public class EffectTiming: BridgedDictionary { + public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, direction: PlaybackDirection, easing: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.delay] = delay.jsValue + object[Strings.endDelay] = endDelay.jsValue + object[Strings.fill] = fill.jsValue + object[Strings.iterationStart] = iterationStart.jsValue + object[Strings.iterations] = iterations.jsValue + object[Strings.direction] = direction.jsValue + object[Strings.easing] = easing.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) + _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) + _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) + _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) + _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) + _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var delay: Double + + @ReadWriteAttribute + public var endDelay: Double + + @ReadWriteAttribute + public var fill: FillMode + + @ReadWriteAttribute + public var iterationStart: Double + + @ReadWriteAttribute + public var iterations: Double + + @ReadWriteAttribute + public var direction: PlaybackDirection + + @ReadWriteAttribute + public var easing: String +} + +public class Element: Node, ARIAMixin, Animatable, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.namespaceURI) + _prefix = ReadonlyAttribute(jsObject: jsObject, name: Strings.prefix) + _localName = ReadonlyAttribute(jsObject: jsObject, name: Strings.localName) + _tagName = ReadonlyAttribute(jsObject: jsObject, name: Strings.tagName) + _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) + _className = ReadWriteAttribute(jsObject: jsObject, name: Strings.className) + _classList = ReadonlyAttribute(jsObject: jsObject, name: Strings.classList) + _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) + _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var namespaceURI: String? + + @ReadonlyAttribute + public var prefix: String? + + @ReadonlyAttribute + public var localName: String + + @ReadonlyAttribute + public var tagName: String + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var className: String + + @ReadonlyAttribute + public var classList: DOMTokenList + + @ReadWriteAttribute + public var slot: String + + @inlinable public func hasAttributes() -> Bool { + let this = jsObject + return this[Strings.hasAttributes].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var attributes: NamedNodeMap + + @inlinable public func getAttributeNames() -> [String] { + let this = jsObject + return this[Strings.getAttributeNames].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getAttribute(qualifiedName: String) -> String? { + let this = jsObject + return this[Strings.getAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNS(namespace: String?, localName: String) -> String? { + let this = jsObject + return this[Strings.getAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setAttribute(qualifiedName: String, value: String) { + let this = jsObject + _ = this[Strings.setAttribute].function!(this: this, arguments: [qualifiedName.jsValue, value.jsValue]) + } + + @inlinable public func setAttributeNS(namespace: String?, qualifiedName: String, value: String) { + let this = jsObject + _ = this[Strings.setAttributeNS].function!(this: this, arguments: [namespace.jsValue, qualifiedName.jsValue, value.jsValue]) + } + + @inlinable public func removeAttribute(qualifiedName: String) { + let this = jsObject + _ = this[Strings.removeAttribute].function!(this: this, arguments: [qualifiedName.jsValue]) + } + + @inlinable public func removeAttributeNS(namespace: String?, localName: String) { + let this = jsObject + _ = this[Strings.removeAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]) + } + + @inlinable public func toggleAttribute(qualifiedName: String, force: Bool? = nil) -> Bool { + let this = jsObject + return this[Strings.toggleAttribute].function!(this: this, arguments: [qualifiedName.jsValue, force?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func hasAttribute(qualifiedName: String) -> Bool { + let this = jsObject + return this[Strings.hasAttribute].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func hasAttributeNS(namespace: String?, localName: String) -> Bool { + let this = jsObject + return this[Strings.hasAttributeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNode(qualifiedName: String) -> Attr? { + let this = jsObject + return this[Strings.getAttributeNode].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getAttributeNodeNS(namespace: String?, localName: String) -> Attr? { + let this = jsObject + return this[Strings.getAttributeNodeNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setAttributeNode(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func setAttributeNodeNS(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setAttributeNodeNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func removeAttributeNode(attr: Attr) -> Attr { + let this = jsObject + return this[Strings.removeAttributeNode].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func attachShadow(init: ShadowRootInit) -> ShadowRoot { + let this = jsObject + return this[Strings.attachShadow].function!(this: this, arguments: [`init`.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func closest(selectors: String) -> Element? { + let this = jsObject + return this[Strings.closest].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func matches(selectors: String) -> Bool { + let this = jsObject + return this[Strings.matches].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func webkitMatchesSelector(selectors: String) -> Bool { + let this = jsObject + return this[Strings.webkitMatchesSelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagName(qualifiedName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagName].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByTagNameNS(namespace: String?, localName: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByTagNameNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func getElementsByClassName(classNames: String) -> HTMLCollection { + let this = jsObject + return this[Strings.getElementsByClassName].function!(this: this, arguments: [classNames.jsValue]).fromJSValue()! + } + + @inlinable public func insertAdjacentElement(where: String, element: Element) -> Element? { + let this = jsObject + return this[Strings.insertAdjacentElement].function!(this: this, arguments: [`where`.jsValue, element.jsValue]).fromJSValue()! + } + + @inlinable public func insertAdjacentText(where: String, data: String) { + let this = jsObject + _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) + } +} + +public protocol ElementContentEditable: JSBridgedClass {} +public extension ElementContentEditable { + @inlinable var contentEditable: String { + get { ReadWriteAttribute[Strings.contentEditable, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.contentEditable, in: jsObject] = newValue } + } + + @inlinable var enterKeyHint: String { + get { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] = newValue } + } + + @inlinable var isContentEditable: Bool { ReadonlyAttribute[Strings.isContentEditable, in: jsObject] } + + @inlinable var inputMode: String { + get { ReadWriteAttribute[Strings.inputMode, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.inputMode, in: jsObject] = newValue } + } +} + +public class ElementCreationOptions: BridgedDictionary { + public convenience init(is: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.is] = `is`.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _is = ReadWriteAttribute(jsObject: object, name: Strings.is) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var `is`: String +} + +public class ElementDefinitionOptions: BridgedDictionary { + public convenience init(extends: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.extends] = extends.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _extends = ReadWriteAttribute(jsObject: object, name: Strings.extends) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var extends: String +} + +public class ElementInternals: JSBridgedClass, ARIAMixin { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ElementInternals].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func setFormValue(value: JSValue?, state: JSValue? = nil) { + let this = jsObject + _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { + let this = jsObject + _ = this[Strings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public enum EndingType: JSString, JSValueCompatible { + case transparent = "transparent" + case native = "native" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) + _lineno = ReadonlyAttribute(jsObject: jsObject, name: Strings.lineno) + _colno = ReadonlyAttribute(jsObject: jsObject, name: Strings.colno) + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: ErrorEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var filename: String + + @ReadonlyAttribute + public var lineno: UInt32 + + @ReadonlyAttribute + public var colno: UInt32 + + @ReadonlyAttribute + public var error: JSValue +} + +public class ErrorEventInit: BridgedDictionary { + public convenience init(message: String, filename: String, lineno: UInt32, colno: UInt32, error: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.message] = message.jsValue + object[Strings.filename] = filename.jsValue + object[Strings.lineno] = lineno.jsValue + object[Strings.colno] = colno.jsValue + object[Strings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _message = ReadWriteAttribute(jsObject: object, name: Strings.message) + _filename = ReadWriteAttribute(jsObject: object, name: Strings.filename) + _lineno = ReadWriteAttribute(jsObject: object, name: Strings.lineno) + _colno = ReadWriteAttribute(jsObject: object, name: Strings.colno) + _error = ReadWriteAttribute(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var message: String + + @ReadWriteAttribute + public var filename: String + + @ReadWriteAttribute + public var lineno: UInt32 + + @ReadWriteAttribute + public var colno: UInt32 + + @ReadWriteAttribute + public var error: JSValue +} + +public class Event: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Event].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) + _srcElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.srcElement) + _currentTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentTarget) + _eventPhase = ReadonlyAttribute(jsObject: jsObject, name: Strings.eventPhase) + _cancelBubble = ReadWriteAttribute(jsObject: jsObject, name: Strings.cancelBubble) + _bubbles = ReadonlyAttribute(jsObject: jsObject, name: Strings.bubbles) + _cancelable = ReadonlyAttribute(jsObject: jsObject, name: Strings.cancelable) + _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) + _defaultPrevented = ReadonlyAttribute(jsObject: jsObject, name: Strings.defaultPrevented) + _composed = ReadonlyAttribute(jsObject: jsObject, name: Strings.composed) + _isTrusted = ReadonlyAttribute(jsObject: jsObject, name: Strings.isTrusted) + _timeStamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeStamp) + self.jsObject = jsObject + } + + @inlinable public convenience init(type: String, eventInitDict: EventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var target: EventTarget? + + @ReadonlyAttribute + public var srcElement: EventTarget? + + @ReadonlyAttribute + public var currentTarget: EventTarget? + + @inlinable public func composedPath() -> [EventTarget] { + let this = jsObject + return this[Strings.composedPath].function!(this: this, arguments: []).fromJSValue()! + } + + public static let NONE: UInt16 = 0 + + public static let CAPTURING_PHASE: UInt16 = 1 + + public static let AT_TARGET: UInt16 = 2 + + public static let BUBBLING_PHASE: UInt16 = 3 + + @ReadonlyAttribute + public var eventPhase: UInt16 + + @inlinable public func stopPropagation() { + let this = jsObject + _ = this[Strings.stopPropagation].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var cancelBubble: Bool + + @inlinable public func stopImmediatePropagation() { + let this = jsObject + _ = this[Strings.stopImmediatePropagation].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var bubbles: Bool + + @ReadonlyAttribute + public var cancelable: Bool + + @ReadWriteAttribute + public var returnValue: Bool + + @inlinable public func preventDefault() { + let this = jsObject + _ = this[Strings.preventDefault].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var defaultPrevented: Bool + + @ReadonlyAttribute + public var composed: Bool + + @ReadonlyAttribute + public var isTrusted: Bool + + @ReadonlyAttribute + public var timeStamp: DOMHighResTimeStamp + + @inlinable public func initEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil) { + let this = jsObject + _ = this[Strings.initEvent].function!(this: this, arguments: [type.jsValue, bubbles?.jsValue ?? .undefined, cancelable?.jsValue ?? .undefined]) + } +} + +public class EventInit: BridgedDictionary { + public convenience init(bubbles: Bool, cancelable: Bool, composed: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.bubbles] = bubbles.jsValue + object[Strings.cancelable] = cancelable.jsValue + object[Strings.composed] = composed.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _bubbles = ReadWriteAttribute(jsObject: object, name: Strings.bubbles) + _cancelable = ReadWriteAttribute(jsObject: object, name: Strings.cancelable) + _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var bubbles: Bool + + @ReadWriteAttribute + public var cancelable: Bool + + @ReadWriteAttribute + public var composed: Bool +} + +public class EventListenerOptions: BridgedDictionary { + public convenience init(capture: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.capture] = capture.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _capture = ReadWriteAttribute(jsObject: object, name: Strings.capture) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var capture: Bool +} + +public class EventModifierInit: BridgedDictionary { + public convenience init(ctrlKey: Bool, shiftKey: Bool, altKey: Bool, metaKey: Bool, modifierAltGraph: Bool, modifierCapsLock: Bool, modifierFn: Bool, modifierFnLock: Bool, modifierHyper: Bool, modifierNumLock: Bool, modifierScrollLock: Bool, modifierSuper: Bool, modifierSymbol: Bool, modifierSymbolLock: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.ctrlKey] = ctrlKey.jsValue + object[Strings.shiftKey] = shiftKey.jsValue + object[Strings.altKey] = altKey.jsValue + object[Strings.metaKey] = metaKey.jsValue + object[Strings.modifierAltGraph] = modifierAltGraph.jsValue + object[Strings.modifierCapsLock] = modifierCapsLock.jsValue + object[Strings.modifierFn] = modifierFn.jsValue + object[Strings.modifierFnLock] = modifierFnLock.jsValue + object[Strings.modifierHyper] = modifierHyper.jsValue + object[Strings.modifierNumLock] = modifierNumLock.jsValue + object[Strings.modifierScrollLock] = modifierScrollLock.jsValue + object[Strings.modifierSuper] = modifierSuper.jsValue + object[Strings.modifierSymbol] = modifierSymbol.jsValue + object[Strings.modifierSymbolLock] = modifierSymbolLock.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _ctrlKey = ReadWriteAttribute(jsObject: object, name: Strings.ctrlKey) + _shiftKey = ReadWriteAttribute(jsObject: object, name: Strings.shiftKey) + _altKey = ReadWriteAttribute(jsObject: object, name: Strings.altKey) + _metaKey = ReadWriteAttribute(jsObject: object, name: Strings.metaKey) + _modifierAltGraph = ReadWriteAttribute(jsObject: object, name: Strings.modifierAltGraph) + _modifierCapsLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierCapsLock) + _modifierFn = ReadWriteAttribute(jsObject: object, name: Strings.modifierFn) + _modifierFnLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierFnLock) + _modifierHyper = ReadWriteAttribute(jsObject: object, name: Strings.modifierHyper) + _modifierNumLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierNumLock) + _modifierScrollLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierScrollLock) + _modifierSuper = ReadWriteAttribute(jsObject: object, name: Strings.modifierSuper) + _modifierSymbol = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbol) + _modifierSymbolLock = ReadWriteAttribute(jsObject: object, name: Strings.modifierSymbolLock) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var ctrlKey: Bool + + @ReadWriteAttribute + public var shiftKey: Bool + + @ReadWriteAttribute + public var altKey: Bool + + @ReadWriteAttribute + public var metaKey: Bool + + @ReadWriteAttribute + public var modifierAltGraph: Bool + + @ReadWriteAttribute + public var modifierCapsLock: Bool + + @ReadWriteAttribute + public var modifierFn: Bool + + @ReadWriteAttribute + public var modifierFnLock: Bool + + @ReadWriteAttribute + public var modifierHyper: Bool + + @ReadWriteAttribute + public var modifierNumLock: Bool + + @ReadWriteAttribute + public var modifierScrollLock: Bool + + @ReadWriteAttribute + public var modifierSuper: Bool + + @ReadWriteAttribute + public var modifierSymbol: Bool + + @ReadWriteAttribute + public var modifierSymbolLock: Bool +} + +public class EventSource: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.EventSource].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _withCredentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.withCredentials) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _onopen = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onopen) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, eventSourceInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var withCredentials: Bool + + public static let CONNECTING: UInt16 = 0 + + public static let OPEN: UInt16 = 1 + + public static let CLOSED: UInt16 = 2 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ClosureAttribute1Optional + public var onopen: EventHandler + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} + +public class EventSourceInit: BridgedDictionary { + public convenience init(withCredentials: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.withCredentials] = withCredentials.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _withCredentials = ReadWriteAttribute(jsObject: object, name: Strings.withCredentials) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var withCredentials: Bool +} + +public class EventTarget: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EventTarget].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + // XXX: member 'addEventListener' is ignored + + // XXX: member 'removeEventListener' is ignored + + @inlinable public func dispatchEvent(event: Event) -> Bool { + let this = jsObject + return this[Strings.dispatchEvent].function!(this: this, arguments: [event.jsValue]).fromJSValue()! + } +} + +public class ExtendableEventInit: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class External: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.External].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func AddSearchProvider() { + let this = jsObject + _ = this[Strings.AddSearchProvider].function!(this: this, arguments: []) + } + + @inlinable public func IsSearchProviderInstalled() { + let this = jsObject + _ = this[Strings.IsSearchProviderInstalled].function!(this: this, arguments: []) + } +} + +public class FetchEventInit: BridgedDictionary { + public convenience init(request: Request, preloadResponse: JSPromise, clientId: String, resultingClientId: String, replacesClientId: String, handled: JSPromise) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.request] = request.jsValue + object[Strings.preloadResponse] = preloadResponse.jsValue + object[Strings.clientId] = clientId.jsValue + object[Strings.resultingClientId] = resultingClientId.jsValue + object[Strings.replacesClientId] = replacesClientId.jsValue + object[Strings.handled] = handled.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _request = ReadWriteAttribute(jsObject: object, name: Strings.request) + _preloadResponse = ReadWriteAttribute(jsObject: object, name: Strings.preloadResponse) + _clientId = ReadWriteAttribute(jsObject: object, name: Strings.clientId) + _resultingClientId = ReadWriteAttribute(jsObject: object, name: Strings.resultingClientId) + _replacesClientId = ReadWriteAttribute(jsObject: object, name: Strings.replacesClientId) + _handled = ReadWriteAttribute(jsObject: object, name: Strings.handled) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var request: Request + + @ReadWriteAttribute + public var preloadResponse: JSPromise + + @ReadWriteAttribute + public var clientId: String + + @ReadWriteAttribute + public var resultingClientId: String + + @ReadWriteAttribute + public var replacesClientId: String + + @ReadWriteAttribute + public var handled: JSPromise +} + +public class File: Blob { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var lastModified: Int64 +} + +public class FileList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> File? { + jsObject[key].fromJSValue() + } + + @ReadonlyAttribute + public var length: UInt32 +} + +public class FilePropertyBag: BridgedDictionary { + public convenience init(lastModified: Int64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.lastModified] = lastModified.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var lastModified: Int64 +} + +public class FileReader: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) + _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) + _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) + _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func readAsArrayBuffer(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func readAsBinaryString(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { + let this = jsObject + _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) + } + + @inlinable public func readAsDataURL(blob: Blob) { + let this = jsObject + _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) + } + + @inlinable public func abort() { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: []) + } + + public static let EMPTY: UInt16 = 0 + + public static let LOADING: UInt16 = 1 + + public static let DONE: UInt16 = 2 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var result: JSValue? + + @ReadonlyAttribute + public var error: DOMException? + + @ClosureAttribute1Optional + public var onloadstart: EventHandler + + @ClosureAttribute1Optional + public var onprogress: EventHandler + + @ClosureAttribute1Optional + public var onload: EventHandler + + @ClosureAttribute1Optional + public var onabort: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ClosureAttribute1Optional + public var onloadend: EventHandler +} + +public enum FillMode: JSString, JSValueCompatible { + case none = "none" + case forwards = "forwards" + case backwards = "backwards" + case both = "both" + case auto = "auto" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class FocusEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FocusEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: FocusEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var relatedTarget: EventTarget? +} + +public class FocusEventInit: BridgedDictionary { + public convenience init(relatedTarget: EventTarget?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.relatedTarget] = relatedTarget.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var relatedTarget: EventTarget? +} + +public class FocusOptions: BridgedDictionary { + public convenience init(preventScroll: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.preventScroll] = preventScroll.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventScroll = ReadWriteAttribute(jsObject: object, name: Strings.preventScroll) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventScroll: Bool +} + +public class FormData: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FormData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(form: HTMLFormElement? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [form?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func append(name: String, blobValue: Blob, filename: String? = nil) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> FormDataEntryValue? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAll(name: String) -> [FormDataEntryValue] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func set(name: String, blobValue: Blob, filename: String? = nil) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, blobValue.jsValue, filename?.jsValue ?? .undefined]) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class FormDataEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FormDataEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _formData = ReadonlyAttribute(jsObject: jsObject, name: Strings.formData) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: FormDataEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var formData: FormData +} + +public class FormDataEventInit: BridgedDictionary { + public convenience init(formData: FormData) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.formData] = formData.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _formData = ReadWriteAttribute(jsObject: object, name: Strings.formData) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var formData: FormData +} + +public enum FrameType: JSString, JSValueCompatible { + case auxiliary = "auxiliary" + case topLevel = "top-level" + case nested = "nested" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol GenericTransformStream: JSBridgedClass {} +public extension GenericTransformStream { + @inlinable var readable: ReadableStream { ReadonlyAttribute[Strings.readable, in: jsObject] } + + @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } +} + +public class GetAnimationsOptions: BridgedDictionary { + public convenience init(subtree: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.subtree] = subtree.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var subtree: Bool +} + +public class GetRootNodeOptions: BridgedDictionary { + public convenience init(composed: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.composed] = composed.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _composed = ReadWriteAttribute(jsObject: object, name: Strings.composed) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var composed: Bool +} + +public protocol GlobalEventHandlers: JSBridgedClass {} +public extension GlobalEventHandlers { + @inlinable var onabort: EventHandler { + get { ClosureAttribute1Optional[Strings.onabort, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onabort, in: jsObject] = newValue } + } + + @inlinable var onauxclick: EventHandler { + get { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onauxclick, in: jsObject] = newValue } + } + + @inlinable var onblur: EventHandler { + get { ClosureAttribute1Optional[Strings.onblur, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onblur, in: jsObject] = newValue } + } + + @inlinable var oncancel: EventHandler { + get { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncancel, in: jsObject] = newValue } + } + + @inlinable var oncanplay: EventHandler { + get { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncanplay, in: jsObject] = newValue } + } + + @inlinable var oncanplaythrough: EventHandler { + get { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncanplaythrough, in: jsObject] = newValue } + } + + @inlinable var onchange: EventHandler { + get { ClosureAttribute1Optional[Strings.onchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onchange, in: jsObject] = newValue } + } + + @inlinable var onclick: EventHandler { + get { ClosureAttribute1Optional[Strings.onclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onclick, in: jsObject] = newValue } + } + + @inlinable var onclose: EventHandler { + get { ClosureAttribute1Optional[Strings.onclose, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onclose, in: jsObject] = newValue } + } + + @inlinable var oncontextlost: EventHandler { + get { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncontextlost, in: jsObject] = newValue } + } + + @inlinable var oncontextmenu: EventHandler { + get { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncontextmenu, in: jsObject] = newValue } + } + + @inlinable var oncontextrestored: EventHandler { + get { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncontextrestored, in: jsObject] = newValue } + } + + @inlinable var oncuechange: EventHandler { + get { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oncuechange, in: jsObject] = newValue } + } + + @inlinable var ondblclick: EventHandler { + get { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondblclick, in: jsObject] = newValue } + } + + @inlinable var ondrag: EventHandler { + get { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondrag, in: jsObject] = newValue } + } + + @inlinable var ondragend: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragend, in: jsObject] = newValue } + } + + @inlinable var ondragenter: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragenter, in: jsObject] = newValue } + } + + @inlinable var ondragleave: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragleave, in: jsObject] = newValue } + } + + @inlinable var ondragover: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragover, in: jsObject] = newValue } + } + + @inlinable var ondragstart: EventHandler { + get { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondragstart, in: jsObject] = newValue } + } + + @inlinable var ondrop: EventHandler { + get { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondrop, in: jsObject] = newValue } + } + + @inlinable var ondurationchange: EventHandler { + get { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ondurationchange, in: jsObject] = newValue } + } + + @inlinable var onemptied: EventHandler { + get { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onemptied, in: jsObject] = newValue } + } + + @inlinable var onended: EventHandler { + get { ClosureAttribute1Optional[Strings.onended, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onended, in: jsObject] = newValue } + } + + @inlinable var onerror: OnErrorEventHandler { + get { ClosureAttribute5Optional[Strings.onerror, in: jsObject] } + nonmutating set { ClosureAttribute5Optional[Strings.onerror, in: jsObject] = newValue } + } + + @inlinable var onfocus: EventHandler { + get { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onfocus, in: jsObject] = newValue } + } + + @inlinable var onformdata: EventHandler { + get { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onformdata, in: jsObject] = newValue } + } + + @inlinable var oninput: EventHandler { + get { ClosureAttribute1Optional[Strings.oninput, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oninput, in: jsObject] = newValue } + } + + @inlinable var oninvalid: EventHandler { + get { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.oninvalid, in: jsObject] = newValue } + } + + @inlinable var onkeydown: EventHandler { + get { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onkeydown, in: jsObject] = newValue } + } + + @inlinable var onkeypress: EventHandler { + get { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onkeypress, in: jsObject] = newValue } + } + + @inlinable var onkeyup: EventHandler { + get { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onkeyup, in: jsObject] = newValue } + } + + @inlinable var onload: EventHandler { + get { ClosureAttribute1Optional[Strings.onload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onload, in: jsObject] = newValue } + } + + @inlinable var onloadeddata: EventHandler { + get { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onloadeddata, in: jsObject] = newValue } + } + + @inlinable var onloadedmetadata: EventHandler { + get { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onloadedmetadata, in: jsObject] = newValue } + } + + @inlinable var onloadstart: EventHandler { + get { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onloadstart, in: jsObject] = newValue } + } + + @inlinable var onmousedown: EventHandler { + get { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmousedown, in: jsObject] = newValue } + } + + @inlinable var onmouseenter: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseenter, in: jsObject] = newValue } + } + + @inlinable var onmouseleave: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseleave, in: jsObject] = newValue } + } + + @inlinable var onmousemove: EventHandler { + get { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmousemove, in: jsObject] = newValue } + } + + @inlinable var onmouseout: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseout, in: jsObject] = newValue } + } + + @inlinable var onmouseover: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseover, in: jsObject] = newValue } + } + + @inlinable var onmouseup: EventHandler { + get { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmouseup, in: jsObject] = newValue } + } + + @inlinable var onpause: EventHandler { + get { ClosureAttribute1Optional[Strings.onpause, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpause, in: jsObject] = newValue } + } + + @inlinable var onplay: EventHandler { + get { ClosureAttribute1Optional[Strings.onplay, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onplay, in: jsObject] = newValue } + } + + @inlinable var onplaying: EventHandler { + get { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onplaying, in: jsObject] = newValue } + } + + @inlinable var onprogress: EventHandler { + get { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onprogress, in: jsObject] = newValue } + } + + @inlinable var onratechange: EventHandler { + get { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onratechange, in: jsObject] = newValue } + } + + @inlinable var onreset: EventHandler { + get { ClosureAttribute1Optional[Strings.onreset, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onreset, in: jsObject] = newValue } + } + + @inlinable var onresize: EventHandler { + get { ClosureAttribute1Optional[Strings.onresize, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onresize, in: jsObject] = newValue } + } + + @inlinable var onscroll: EventHandler { + get { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onscroll, in: jsObject] = newValue } + } + + @inlinable var onsecuritypolicyviolation: EventHandler { + get { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onsecuritypolicyviolation, in: jsObject] = newValue } + } + + @inlinable var onseeked: EventHandler { + get { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onseeked, in: jsObject] = newValue } + } + + @inlinable var onseeking: EventHandler { + get { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onseeking, in: jsObject] = newValue } + } + + @inlinable var onselect: EventHandler { + get { ClosureAttribute1Optional[Strings.onselect, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onselect, in: jsObject] = newValue } + } + + @inlinable var onslotchange: EventHandler { + get { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onslotchange, in: jsObject] = newValue } + } + + @inlinable var onstalled: EventHandler { + get { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onstalled, in: jsObject] = newValue } + } + + @inlinable var onsubmit: EventHandler { + get { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onsubmit, in: jsObject] = newValue } + } + + @inlinable var onsuspend: EventHandler { + get { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onsuspend, in: jsObject] = newValue } + } + + @inlinable var ontimeupdate: EventHandler { + get { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ontimeupdate, in: jsObject] = newValue } + } + + @inlinable var ontoggle: EventHandler { + get { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ontoggle, in: jsObject] = newValue } + } + + @inlinable var onvolumechange: EventHandler { + get { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onvolumechange, in: jsObject] = newValue } + } + + @inlinable var onwaiting: EventHandler { + get { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwaiting, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationend: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationend, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationiteration: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationiteration, in: jsObject] = newValue } + } + + @inlinable var onwebkitanimationstart: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkitanimationstart, in: jsObject] = newValue } + } + + @inlinable var onwebkittransitionend: EventHandler { + get { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwebkittransitionend, in: jsObject] = newValue } + } + + @inlinable var onwheel: EventHandler { + get { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onwheel, in: jsObject] = newValue } + } +} + +public class HTMLAllCollection: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLAllCollection].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element { + jsObject[key].fromJSValue()! + } + + @inlinable public subscript(key: String) -> JSValue? { + jsObject[key].fromJSValue() + } + + @inlinable public func item(nameOrIndex: String? = nil) -> JSValue? { + let this = jsObject + return this[Strings.item].function!(this: this, arguments: [nameOrIndex?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class HTMLAnchorElement: HTMLElement, HTMLHyperlinkElementUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAnchorElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) + _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) + _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) + _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var download: String + + @ReadWriteAttribute + public var ping: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var hreflang: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var coords: String + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var rev: String + + @ReadWriteAttribute + public var shape: String +} + +public class HTMLAreaElement: HTMLElement, HTMLHyperlinkElementUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAreaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) + _coords = ReadWriteAttribute(jsObject: jsObject, name: Strings.coords) + _shape = ReadWriteAttribute(jsObject: jsObject, name: Strings.shape) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _download = ReadWriteAttribute(jsObject: jsObject, name: Strings.download) + _ping = ReadWriteAttribute(jsObject: jsObject, name: Strings.ping) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _noHref = ReadWriteAttribute(jsObject: jsObject, name: Strings.noHref) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var coords: String + + @ReadWriteAttribute + public var shape: String + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var download: String + + @ReadWriteAttribute + public var ping: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var noHref: Bool +} + +public class HTMLAudioElement: HTMLMediaElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLAudioElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLBRElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBRElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _clear = ReadWriteAttribute(jsObject: jsObject, name: Strings.clear) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var clear: String +} + +public class HTMLBaseElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBaseElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var href: String + + @ReadWriteAttribute + public var target: String +} + +public class HTMLBodyElement: HTMLElement, WindowEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLBodyElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _link = ReadWriteAttribute(jsObject: jsObject, name: Strings.link) + _vLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.vLink) + _aLink = ReadWriteAttribute(jsObject: jsObject, name: Strings.aLink) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _background = ReadWriteAttribute(jsObject: jsObject, name: Strings.background) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var link: String + + @ReadWriteAttribute + public var vLink: String + + @ReadWriteAttribute + public var aLink: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var background: String +} + +public class HTMLButtonElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLButtonElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) + _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) + _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) + _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) + _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var formAction: String + + @ReadWriteAttribute + public var formEnctype: String + + @ReadWriteAttribute + public var formMethod: String + + @ReadWriteAttribute + public var formNoValidate: Bool + + @ReadWriteAttribute + public var formTarget: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLCanvasElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLCanvasElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @inlinable public func getContext(contextId: String, options: JSValue? = nil) -> RenderingContext? { + let this = jsObject + return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func toDataURL(type: String? = nil, quality: JSValue? = nil) -> String { + let this = jsObject + return this[Strings.toDataURL].function!(this: this, arguments: [type?.jsValue ?? .undefined, quality?.jsValue ?? .undefined]).fromJSValue()! + } + + // XXX: member 'toBlob' is ignored + + @inlinable public func transferControlToOffscreen() -> OffscreenCanvas { + let this = jsObject + return this[Strings.transferControlToOffscreen].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLCollection: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.HTMLCollection].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Element? { + jsObject[key].fromJSValue() + } +} + +public class HTMLDListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLDataElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: String +} + +public class HTMLDataListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDataListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var options: HTMLCollection +} + +public class HTMLDetailsElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDetailsElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var open: Bool +} + +public class HTMLDialogElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDialogElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _open = ReadWriteAttribute(jsObject: jsObject, name: Strings.open) + _returnValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.returnValue) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var open: Bool + + @ReadWriteAttribute + public var returnValue: String + + @inlinable public func show() { + let this = jsObject + _ = this[Strings.show].function!(this: this, arguments: []) + } + + @inlinable public func showModal() { + let this = jsObject + _ = this[Strings.showModal].function!(this: this, arguments: []) + } + + @inlinable public func close(returnValue: String? = nil) { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: [returnValue?.jsValue ?? .undefined]) + } +} + +public class HTMLDirectoryElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDirectoryElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLDivElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLDivElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _title = ReadWriteAttribute(jsObject: jsObject, name: Strings.title) + _lang = ReadWriteAttribute(jsObject: jsObject, name: Strings.lang) + _translate = ReadWriteAttribute(jsObject: jsObject, name: Strings.translate) + _dir = ReadWriteAttribute(jsObject: jsObject, name: Strings.dir) + _hidden = ReadWriteAttribute(jsObject: jsObject, name: Strings.hidden) + _inert = ReadWriteAttribute(jsObject: jsObject, name: Strings.inert) + _accessKey = ReadWriteAttribute(jsObject: jsObject, name: Strings.accessKey) + _accessKeyLabel = ReadonlyAttribute(jsObject: jsObject, name: Strings.accessKeyLabel) + _draggable = ReadWriteAttribute(jsObject: jsObject, name: Strings.draggable) + _spellcheck = ReadWriteAttribute(jsObject: jsObject, name: Strings.spellcheck) + _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) + _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) + _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var title: String + + @ReadWriteAttribute + public var lang: String + + @ReadWriteAttribute + public var translate: Bool + + @ReadWriteAttribute + public var dir: String + + @ReadWriteAttribute + public var hidden: Bool + + @ReadWriteAttribute + public var inert: Bool + + @inlinable public func click() { + let this = jsObject + _ = this[Strings.click].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var accessKey: String + + @ReadonlyAttribute + public var accessKeyLabel: String + + @ReadWriteAttribute + public var draggable: Bool + + @ReadWriteAttribute + public var spellcheck: Bool + + @ReadWriteAttribute + public var autocapitalize: String + + @ReadWriteAttribute + public var innerText: String + + @ReadWriteAttribute + public var outerText: String + + @inlinable public func attachInternals() -> ElementInternals { + let this = jsObject + return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLEmbedElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLEmbedElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var name: String +} + +public class HTMLFieldSetElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFieldSetElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var elements: HTMLCollection + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } +} + +public class HTMLFontElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFontElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) + _face = ReadWriteAttribute(jsObject: jsObject, name: Strings.face) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var color: String + + @ReadWriteAttribute + public var face: String + + @ReadWriteAttribute + public var size: String +} + +public class HTMLFormControlsCollection: HTMLCollection { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormControlsCollection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public subscript(key: String) -> JSValue? { + jsObject[key].fromJSValue() + } +} + +public class HTMLFormElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFormElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _acceptCharset = ReadWriteAttribute(jsObject: jsObject, name: Strings.acceptCharset) + _action = ReadWriteAttribute(jsObject: jsObject, name: Strings.action) + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _enctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.enctype) + _encoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.encoding) + _method = ReadWriteAttribute(jsObject: jsObject, name: Strings.method) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _noValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.noValidate) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _elements = ReadonlyAttribute(jsObject: jsObject, name: Strings.elements) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var acceptCharset: String + + @ReadWriteAttribute + public var action: String + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var enctype: String + + @ReadWriteAttribute + public var encoding: String + + @ReadWriteAttribute + public var method: String + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var noValidate: Bool + + @ReadWriteAttribute + public var target: String + + @ReadWriteAttribute + public var rel: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadonlyAttribute + public var elements: HTMLFormControlsCollection + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Element { + jsObject[key].fromJSValue()! + } + + @inlinable public subscript(key: String) -> JSValue { + jsObject[key].fromJSValue()! + } + + @inlinable public func submit() { + let this = jsObject + _ = this[Strings.submit].function!(this: this, arguments: []) + } + + @inlinable public func requestSubmit(submitter: HTMLElement? = nil) { + let this = jsObject + _ = this[Strings.requestSubmit].function!(this: this, arguments: [submitter?.jsValue ?? .undefined]) + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class HTMLFrameElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) + _noResize = ReadWriteAttribute(jsObject: jsObject, name: Strings.noResize) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) + _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) + _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var scrolling: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var frameBorder: String + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var noResize: Bool + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @ReadWriteAttribute + public var marginHeight: String + + @ReadWriteAttribute + public var marginWidth: String +} + +public class HTMLFrameSetElement: HTMLElement, WindowEventHandlers { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLFrameSetElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) + _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cols: String + + @ReadWriteAttribute + public var rows: String +} + +public class HTMLHRElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHRElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _color = ReadWriteAttribute(jsObject: jsObject, name: Strings.color) + _noShade = ReadWriteAttribute(jsObject: jsObject, name: Strings.noShade) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var color: String + + @ReadWriteAttribute + public var noShade: Bool + + @ReadWriteAttribute + public var size: String + + @ReadWriteAttribute + public var width: String +} + +public class HTMLHeadElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLHeadingElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHeadingElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLHtmlElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLHtmlElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _version = ReadWriteAttribute(jsObject: jsObject, name: Strings.version) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var version: String +} + +public protocol HTMLHyperlinkElementUtils: JSBridgedClass {} +public extension HTMLHyperlinkElementUtils { + @inlinable var href: String { + get { ReadWriteAttribute[Strings.href, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.href, in: jsObject] = newValue } + } + + @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } + + @inlinable var `protocol`: String { + get { ReadWriteAttribute[Strings.protocol, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.protocol, in: jsObject] = newValue } + } + + @inlinable var username: String { + get { ReadWriteAttribute[Strings.username, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.username, in: jsObject] = newValue } + } + + @inlinable var password: String { + get { ReadWriteAttribute[Strings.password, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.password, in: jsObject] = newValue } + } + + @inlinable var host: String { + get { ReadWriteAttribute[Strings.host, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.host, in: jsObject] = newValue } + } + + @inlinable var hostname: String { + get { ReadWriteAttribute[Strings.hostname, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.hostname, in: jsObject] = newValue } + } + + @inlinable var port: String { + get { ReadWriteAttribute[Strings.port, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.port, in: jsObject] = newValue } + } + + @inlinable var pathname: String { + get { ReadWriteAttribute[Strings.pathname, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.pathname, in: jsObject] = newValue } + } + + @inlinable var search: String { + get { ReadWriteAttribute[Strings.search, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.search, in: jsObject] = newValue } + } + + @inlinable var hash: String { + get { ReadWriteAttribute[Strings.hash, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.hash, in: jsObject] = newValue } + } +} + +public class HTMLIFrameElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLIFrameElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _srcdoc = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcdoc) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _sandbox = ReadonlyAttribute(jsObject: jsObject, name: Strings.sandbox) + _allow = ReadWriteAttribute(jsObject: jsObject, name: Strings.allow) + _allowFullscreen = ReadWriteAttribute(jsObject: jsObject, name: Strings.allowFullscreen) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _scrolling = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrolling) + _frameBorder = ReadWriteAttribute(jsObject: jsObject, name: Strings.frameBorder) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) + _marginHeight = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginHeight) + _marginWidth = ReadWriteAttribute(jsObject: jsObject, name: Strings.marginWidth) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srcdoc: String + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var sandbox: DOMTokenList + + @ReadWriteAttribute + public var allow: String + + @ReadWriteAttribute + public var allowFullscreen: Bool + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var loading: String + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var scrolling: String + + @ReadWriteAttribute + public var frameBorder: String + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var marginHeight: String + + @ReadWriteAttribute + public var marginWidth: String +} + +public class HTMLImageElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLImageElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) + _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) + _isMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.isMap) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _naturalWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalWidth) + _naturalHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.naturalHeight) + _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) + _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _decoding = ReadWriteAttribute(jsObject: jsObject, name: Strings.decoding) + _loading = ReadWriteAttribute(jsObject: jsObject, name: Strings.loading) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _lowsrc = ReadWriteAttribute(jsObject: jsObject, name: Strings.lowsrc) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) + _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) + _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srcset: String + + @ReadWriteAttribute + public var sizes: String + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var useMap: String + + @ReadWriteAttribute + public var isMap: Bool + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var naturalWidth: UInt32 + + @ReadonlyAttribute + public var naturalHeight: UInt32 + + @ReadonlyAttribute + public var complete: Bool + + @ReadonlyAttribute + public var currentSrc: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadWriteAttribute + public var decoding: String + + @ReadWriteAttribute + public var loading: String + + @inlinable public func decode() -> JSPromise { + let this = jsObject + return this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func decode() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var lowsrc: String + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var longDesc: String + + @ReadWriteAttribute + public var border: String +} + +public class HTMLInputElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLInputElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _accept = ReadWriteAttribute(jsObject: jsObject, name: Strings.accept) + _alt = ReadWriteAttribute(jsObject: jsObject, name: Strings.alt) + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _defaultChecked = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultChecked) + _checked = ReadWriteAttribute(jsObject: jsObject, name: Strings.checked) + _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _files = ReadWriteAttribute(jsObject: jsObject, name: Strings.files) + _formAction = ReadWriteAttribute(jsObject: jsObject, name: Strings.formAction) + _formEnctype = ReadWriteAttribute(jsObject: jsObject, name: Strings.formEnctype) + _formMethod = ReadWriteAttribute(jsObject: jsObject, name: Strings.formMethod) + _formNoValidate = ReadWriteAttribute(jsObject: jsObject, name: Strings.formNoValidate) + _formTarget = ReadWriteAttribute(jsObject: jsObject, name: Strings.formTarget) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _indeterminate = ReadWriteAttribute(jsObject: jsObject, name: Strings.indeterminate) + _list = ReadonlyAttribute(jsObject: jsObject, name: Strings.list) + _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) + _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) + _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) + _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) + _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _pattern = ReadWriteAttribute(jsObject: jsObject, name: Strings.pattern) + _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) + _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) + _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _step = ReadWriteAttribute(jsObject: jsObject, name: Strings.step) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _valueAsDate = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsDate) + _valueAsNumber = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueAsNumber) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) + _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) + _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var accept: String + + @ReadWriteAttribute + public var alt: String + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var defaultChecked: Bool + + @ReadWriteAttribute + public var checked: Bool + + @ReadWriteAttribute + public var dirName: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var files: FileList? + + @ReadWriteAttribute + public var formAction: String + + @ReadWriteAttribute + public var formEnctype: String + + @ReadWriteAttribute + public var formMethod: String + + @ReadWriteAttribute + public var formNoValidate: Bool + + @ReadWriteAttribute + public var formTarget: String + + @ReadWriteAttribute + public var height: UInt32 + + @ReadWriteAttribute + public var indeterminate: Bool + + @ReadonlyAttribute + public var list: HTMLElement? + + @ReadWriteAttribute + public var max: String + + @ReadWriteAttribute + public var maxLength: Int32 + + @ReadWriteAttribute + public var min: String + + @ReadWriteAttribute + public var minLength: Int32 + + @ReadWriteAttribute + public var multiple: Bool + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var pattern: String + + @ReadWriteAttribute + public var placeholder: String + + @ReadWriteAttribute + public var readOnly: Bool + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var size: UInt32 + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var step: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var valueAsDate: JSObject? + + @ReadWriteAttribute + public var valueAsNumber: Double + + @ReadWriteAttribute + public var width: UInt32 + + @inlinable public func stepUp(n: Int32? = nil) { + let this = jsObject + _ = this[Strings.stepUp].function!(this: this, arguments: [n?.jsValue ?? .undefined]) + } + + @inlinable public func stepDown(n: Int32? = nil) { + let this = jsObject + _ = this[Strings.stepDown].function!(this: this, arguments: [n?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList? + + @inlinable public func select() { + let this = jsObject + _ = this[Strings.select].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var selectionStart: UInt32? + + @ReadWriteAttribute + public var selectionEnd: UInt32? + + @ReadWriteAttribute + public var selectionDirection: String? + + @inlinable public func setRangeText(replacement: String) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) + } + + @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) + } + + @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { + let this = jsObject + _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) + } + + @inlinable public func showPicker() { + let this = jsObject + _ = this[Strings.showPicker].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var useMap: String +} + +public class HTMLLIElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLIElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Int32 + + @ReadWriteAttribute + public var type: String +} + +public class HTMLLabelElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLabelElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) + _control = ReadonlyAttribute(jsObject: jsObject, name: Strings.control) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var htmlFor: String + + @ReadonlyAttribute + public var control: HTMLElement? +} + +public class HTMLLegendElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLegendElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var align: String +} + +public class HTMLLinkElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLLinkElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _rel = ReadWriteAttribute(jsObject: jsObject, name: Strings.rel) + _as = ReadWriteAttribute(jsObject: jsObject, name: Strings.as) + _relList = ReadonlyAttribute(jsObject: jsObject, name: Strings.relList) + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) + _hreflang = ReadWriteAttribute(jsObject: jsObject, name: Strings.hreflang) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _sizes = ReadonlyAttribute(jsObject: jsObject, name: Strings.sizes) + _imageSrcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSrcset) + _imageSizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.imageSizes) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) + _rev = ReadWriteAttribute(jsObject: jsObject, name: Strings.rev) + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var href: String + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var rel: String + + @ReadWriteAttribute + public var `as`: String + + @ReadonlyAttribute + public var relList: DOMTokenList + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var hreflang: String + + @ReadWriteAttribute + public var type: String + + @ReadonlyAttribute + public var sizes: DOMTokenList + + @ReadWriteAttribute + public var imageSrcset: String + + @ReadWriteAttribute + public var imageSizes: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @ReadWriteAttribute + public var disabled: Bool + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var rev: String + + @ReadWriteAttribute + public var target: String +} + +public class HTMLMapElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMapElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _areas = ReadonlyAttribute(jsObject: jsObject, name: Strings.areas) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var areas: HTMLCollection +} + +public class HTMLMarqueeElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMarqueeElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _behavior = ReadWriteAttribute(jsObject: jsObject, name: Strings.behavior) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _direction = ReadWriteAttribute(jsObject: jsObject, name: Strings.direction) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) + _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) + _scrollAmount = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollAmount) + _scrollDelay = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollDelay) + _trueSpeed = ReadWriteAttribute(jsObject: jsObject, name: Strings.trueSpeed) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var behavior: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var direction: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var loop: Int32 + + @ReadWriteAttribute + public var scrollAmount: UInt32 + + @ReadWriteAttribute + public var scrollDelay: UInt32 + + @ReadWriteAttribute + public var trueSpeed: Bool + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var width: String + + @inlinable public func start() { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: []) + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } +} + +public class HTMLMediaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMediaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _currentSrc = ReadonlyAttribute(jsObject: jsObject, name: Strings.currentSrc) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _networkState = ReadonlyAttribute(jsObject: jsObject, name: Strings.networkState) + _preload = ReadWriteAttribute(jsObject: jsObject, name: Strings.preload) + _buffered = ReadonlyAttribute(jsObject: jsObject, name: Strings.buffered) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _seeking = ReadonlyAttribute(jsObject: jsObject, name: Strings.seeking) + _currentTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentTime) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _paused = ReadonlyAttribute(jsObject: jsObject, name: Strings.paused) + _defaultPlaybackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultPlaybackRate) + _playbackRate = ReadWriteAttribute(jsObject: jsObject, name: Strings.playbackRate) + _preservesPitch = ReadWriteAttribute(jsObject: jsObject, name: Strings.preservesPitch) + _played = ReadonlyAttribute(jsObject: jsObject, name: Strings.played) + _seekable = ReadonlyAttribute(jsObject: jsObject, name: Strings.seekable) + _ended = ReadonlyAttribute(jsObject: jsObject, name: Strings.ended) + _autoplay = ReadWriteAttribute(jsObject: jsObject, name: Strings.autoplay) + _loop = ReadWriteAttribute(jsObject: jsObject, name: Strings.loop) + _controls = ReadWriteAttribute(jsObject: jsObject, name: Strings.controls) + _volume = ReadWriteAttribute(jsObject: jsObject, name: Strings.volume) + _muted = ReadWriteAttribute(jsObject: jsObject, name: Strings.muted) + _defaultMuted = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultMuted) + _audioTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioTracks) + _videoTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoTracks) + _textTracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.textTracks) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var error: MediaError? + + @ReadWriteAttribute + public var src: String + + // XXX: member 'srcObject' is ignored + + @ReadonlyAttribute + public var currentSrc: String + + @ReadWriteAttribute + public var crossOrigin: String? + + public static let NETWORK_EMPTY: UInt16 = 0 + + public static let NETWORK_IDLE: UInt16 = 1 + + public static let NETWORK_LOADING: UInt16 = 2 + + public static let NETWORK_NO_SOURCE: UInt16 = 3 + + @ReadonlyAttribute + public var networkState: UInt16 + + @ReadWriteAttribute + public var preload: String + + @ReadonlyAttribute + public var buffered: TimeRanges + + @inlinable public func load() { + let this = jsObject + _ = this[Strings.load].function!(this: this, arguments: []) + } + + @inlinable public func canPlayType(type: String) -> CanPlayTypeResult { + let this = jsObject + return this[Strings.canPlayType].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + public static let HAVE_NOTHING: UInt16 = 0 + + public static let HAVE_METADATA: UInt16 = 1 + + public static let HAVE_CURRENT_DATA: UInt16 = 2 + + public static let HAVE_FUTURE_DATA: UInt16 = 3 + + public static let HAVE_ENOUGH_DATA: UInt16 = 4 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var seeking: Bool + + @ReadWriteAttribute + public var currentTime: Double + + @inlinable public func fastSeek(time: Double) { + let this = jsObject + _ = this[Strings.fastSeek].function!(this: this, arguments: [time.jsValue]) + } + + @ReadonlyAttribute + public var duration: Double + + @inlinable public func getStartDate() -> JSObject { + let this = jsObject + return this[Strings.getStartDate].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var paused: Bool + + @ReadWriteAttribute + public var defaultPlaybackRate: Double + + @ReadWriteAttribute + public var playbackRate: Double + + @ReadWriteAttribute + public var preservesPitch: Bool + + @ReadonlyAttribute + public var played: TimeRanges + + @ReadonlyAttribute + public var seekable: TimeRanges + + @ReadonlyAttribute + public var ended: Bool + + @ReadWriteAttribute + public var autoplay: Bool + + @ReadWriteAttribute + public var loop: Bool + + @inlinable public func play() -> JSPromise { + let this = jsObject + return this[Strings.play].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func play() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.play].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var controls: Bool + + @ReadWriteAttribute + public var volume: Double + + @ReadWriteAttribute + public var muted: Bool + + @ReadWriteAttribute + public var defaultMuted: Bool + + @ReadonlyAttribute + public var audioTracks: AudioTrackList + + @ReadonlyAttribute + public var videoTracks: VideoTrackList + + @ReadonlyAttribute + public var textTracks: TextTrackList + + @inlinable public func addTextTrack(kind: TextTrackKind, label: String? = nil, language: String? = nil) -> TextTrack { + let this = jsObject + return this[Strings.addTextTrack].function!(this: this, arguments: [kind.jsValue, label?.jsValue ?? .undefined, language?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class HTMLMenuElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMenuElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLMetaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMetaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _httpEquiv = ReadWriteAttribute(jsObject: jsObject, name: Strings.httpEquiv) + _content = ReadWriteAttribute(jsObject: jsObject, name: Strings.content) + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _scheme = ReadWriteAttribute(jsObject: jsObject, name: Strings.scheme) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var httpEquiv: String + + @ReadWriteAttribute + public var content: String + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var scheme: String +} + +public class HTMLMeterElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLMeterElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _min = ReadWriteAttribute(jsObject: jsObject, name: Strings.min) + _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) + _low = ReadWriteAttribute(jsObject: jsObject, name: Strings.low) + _high = ReadWriteAttribute(jsObject: jsObject, name: Strings.high) + _optimum = ReadWriteAttribute(jsObject: jsObject, name: Strings.optimum) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Double + + @ReadWriteAttribute + public var min: Double + + @ReadWriteAttribute + public var max: Double + + @ReadWriteAttribute + public var low: Double + + @ReadWriteAttribute + public var high: Double + + @ReadWriteAttribute + public var optimum: Double + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLModElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLModElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) + _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cite: String + + @ReadWriteAttribute + public var dateTime: String +} + +public class HTMLOListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _reversed = ReadWriteAttribute(jsObject: jsObject, name: Strings.reversed) + _start = ReadWriteAttribute(jsObject: jsObject, name: Strings.start) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var reversed: Bool + + @ReadWriteAttribute + public var start: Int32 + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var compact: Bool +} + +public class HTMLObjectElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLObjectElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _contentDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentDocument) + _contentWindow = ReadonlyAttribute(jsObject: jsObject, name: Strings.contentWindow) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _archive = ReadWriteAttribute(jsObject: jsObject, name: Strings.archive) + _code = ReadWriteAttribute(jsObject: jsObject, name: Strings.code) + _declare = ReadWriteAttribute(jsObject: jsObject, name: Strings.declare) + _hspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.hspace) + _standby = ReadWriteAttribute(jsObject: jsObject, name: Strings.standby) + _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) + _codeBase = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeBase) + _codeType = ReadWriteAttribute(jsObject: jsObject, name: Strings.codeType) + _useMap = ReadWriteAttribute(jsObject: jsObject, name: Strings.useMap) + _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var data: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var height: String + + @ReadonlyAttribute + public var contentDocument: Document? + + @ReadonlyAttribute + public var contentWindow: WindowProxy? + + @inlinable public func getSVGDocument() -> Document? { + let this = jsObject + return this[Strings.getSVGDocument].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var archive: String + + @ReadWriteAttribute + public var code: String + + @ReadWriteAttribute + public var declare: Bool + + @ReadWriteAttribute + public var hspace: UInt32 + + @ReadWriteAttribute + public var standby: String + + @ReadWriteAttribute + public var vspace: UInt32 + + @ReadWriteAttribute + public var codeBase: String + + @ReadWriteAttribute + public var codeType: String + + @ReadWriteAttribute + public var useMap: String + + @ReadWriteAttribute + public var border: String +} + +public class HTMLOptGroupElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptGroupElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadWriteAttribute + public var label: String +} + +public class HTMLOptionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) + _defaultSelected = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultSelected) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _index = ReadonlyAttribute(jsObject: jsObject, name: Strings.index) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var label: String + + @ReadWriteAttribute + public var defaultSelected: Bool + + @ReadWriteAttribute + public var selected: Bool + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var text: String + + @ReadonlyAttribute + public var index: Int32 +} + +public class HTMLOptionsCollection: HTMLCollection { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOptionsCollection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) + super.init(unsafelyWrapping: jsObject) + } + + @usableFromInline let _length: ReadWriteAttribute + @inlinable override public var length: UInt32 { + get { _length.wrappedValue } + set { _length.wrappedValue = newValue } + } + + // XXX: unsupported setter for keys of type UInt32 + + @inlinable public func add(element: JSValue, before: JSValue? = nil) { + let this = jsObject + _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) + } + + @inlinable public func remove(index: Int32) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var selectedIndex: Int32 +} + +public protocol HTMLOrSVGElement: JSBridgedClass {} +public extension HTMLOrSVGElement { + @inlinable var dataset: DOMStringMap { ReadonlyAttribute[Strings.dataset, in: jsObject] } + + @inlinable var nonce: String { + get { ReadWriteAttribute[Strings.nonce, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.nonce, in: jsObject] = newValue } + } + + @inlinable var autofocus: Bool { + get { ReadWriteAttribute[Strings.autofocus, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.autofocus, in: jsObject] = newValue } + } + + @inlinable var tabIndex: Int32 { + get { ReadWriteAttribute[Strings.tabIndex, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.tabIndex, in: jsObject] = newValue } + } + + @inlinable func focus(options: FocusOptions? = nil) { + let this = jsObject + _ = this[Strings.focus].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable func blur() { + let this = jsObject + _ = this[Strings.blur].function!(this: this, arguments: []) + } +} + +public class HTMLOutputElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLOutputElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _htmlFor = ReadonlyAttribute(jsObject: jsObject, name: Strings.htmlFor) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var htmlFor: DOMTokenList + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLParagraphElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParagraphElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLParamElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLParamElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _valueType = ReadWriteAttribute(jsObject: jsObject, name: Strings.valueType) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var value: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var valueType: String +} + +public class HTMLPictureElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPictureElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLPreElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLPreElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: Int32 +} + +public class HTMLProgressElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLProgressElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _max = ReadWriteAttribute(jsObject: jsObject, name: Strings.max) + _position = ReadonlyAttribute(jsObject: jsObject, name: Strings.position) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var value: Double + + @ReadWriteAttribute + public var max: Double + + @ReadonlyAttribute + public var position: Double + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLQuoteElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLQuoteElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _cite = ReadWriteAttribute(jsObject: jsObject, name: Strings.cite) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var cite: String +} + +public class HTMLScriptElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLScriptElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _noModule = ReadWriteAttribute(jsObject: jsObject, name: Strings.noModule) + _async = ReadWriteAttribute(jsObject: jsObject, name: Strings.async) + _defer = ReadWriteAttribute(jsObject: jsObject, name: Strings.defer) + _crossOrigin = ReadWriteAttribute(jsObject: jsObject, name: Strings.crossOrigin) + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + _integrity = ReadWriteAttribute(jsObject: jsObject, name: Strings.integrity) + _referrerPolicy = ReadWriteAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) + _charset = ReadWriteAttribute(jsObject: jsObject, name: Strings.charset) + _event = ReadWriteAttribute(jsObject: jsObject, name: Strings.event) + _htmlFor = ReadWriteAttribute(jsObject: jsObject, name: Strings.htmlFor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var noModule: Bool + + @ReadWriteAttribute + public var async: Bool + + @ReadWriteAttribute + public var `defer`: Bool + + @ReadWriteAttribute + public var crossOrigin: String? + + @ReadWriteAttribute + public var text: String + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var referrerPolicy: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @inlinable public static func supports(type: String) -> Bool { + let this = constructor + return this[Strings.supports].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @ReadWriteAttribute + public var charset: String + + @ReadWriteAttribute + public var event: String + + @ReadWriteAttribute + public var htmlFor: String +} + +public class HTMLSelectElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSelectElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _multiple = ReadWriteAttribute(jsObject: jsObject, name: Strings.multiple) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) + _size = ReadWriteAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _options = ReadonlyAttribute(jsObject: jsObject, name: Strings.options) + _length = ReadWriteAttribute(jsObject: jsObject, name: Strings.length) + _selectedOptions = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedOptions) + _selectedIndex = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var multiple: Bool + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var size: UInt32 + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var options: HTMLOptionsCollection + + @ReadWriteAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> HTMLOptionElement? { + jsObject[key].fromJSValue() + } + + @inlinable public func namedItem(name: String) -> HTMLOptionElement? { + let this = jsObject + return this[Strings.namedItem].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func add(element: JSValue, before: JSValue? = nil) { + let this = jsObject + _ = this[Strings.add].function!(this: this, arguments: [element.jsValue, before?.jsValue ?? .undefined]) + } + + @inlinable public func remove() { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: []) + } + + @inlinable public func remove(index: Int32) { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: [index.jsValue]) + } + + // XXX: unsupported setter for keys of type UInt32 + + @ReadonlyAttribute + public var selectedOptions: HTMLCollection + + @ReadWriteAttribute + public var selectedIndex: Int32 + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList +} + +public class HTMLSlotElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSlotElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var name: String + + @inlinable public func assignedNodes(options: AssignedNodesOptions? = nil) -> [Node] { + let this = jsObject + return this[Strings.assignedNodes].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func assignedElements(options: AssignedNodesOptions? = nil) -> [Element] { + let this = jsObject + return this[Strings.assignedElements].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func assign(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.assign].function!(this: this, arguments: nodes.map(\.jsValue)) + } +} + +public class HTMLSourceElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSourceElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + _srcset = ReadWriteAttribute(jsObject: jsObject, name: Strings.srcset) + _sizes = ReadWriteAttribute(jsObject: jsObject, name: Strings.sizes) + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var srcset: String + + @ReadWriteAttribute + public var sizes: String + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 +} + +public class HTMLSpanElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLSpanElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public class HTMLStyleElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLStyleElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadWriteAttribute(jsObject: jsObject, name: Strings.media) + _blocking = ReadonlyAttribute(jsObject: jsObject, name: Strings.blocking) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var media: String + + @ReadonlyAttribute + public var blocking: DOMTokenList + + @ReadWriteAttribute + public var type: String +} + +public class HTMLTableCaptionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCaptionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var align: String +} + +public class HTMLTableCellElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableCellElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _colSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.colSpan) + _rowSpan = ReadWriteAttribute(jsObject: jsObject, name: Strings.rowSpan) + _headers = ReadWriteAttribute(jsObject: jsObject, name: Strings.headers) + _cellIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.cellIndex) + _scope = ReadWriteAttribute(jsObject: jsObject, name: Strings.scope) + _abbr = ReadWriteAttribute(jsObject: jsObject, name: Strings.abbr) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _axis = ReadWriteAttribute(jsObject: jsObject, name: Strings.axis) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _noWrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.noWrap) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var colSpan: UInt32 + + @ReadWriteAttribute + public var rowSpan: UInt32 + + @ReadWriteAttribute + public var headers: String + + @ReadonlyAttribute + public var cellIndex: Int32 + + @ReadWriteAttribute + public var scope: String + + @ReadWriteAttribute + public var abbr: String + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var axis: String + + @ReadWriteAttribute + public var height: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var noWrap: Bool + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var bgColor: String +} + +public class HTMLTableColElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableColElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _span = ReadWriteAttribute(jsObject: jsObject, name: Strings.span) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var span: UInt32 + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var width: String +} + +public class HTMLTableElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _caption = ReadWriteAttribute(jsObject: jsObject, name: Strings.caption) + _tHead = ReadWriteAttribute(jsObject: jsObject, name: Strings.tHead) + _tFoot = ReadWriteAttribute(jsObject: jsObject, name: Strings.tFoot) + _tBodies = ReadonlyAttribute(jsObject: jsObject, name: Strings.tBodies) + _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + _frame = ReadWriteAttribute(jsObject: jsObject, name: Strings.frame) + _rules = ReadWriteAttribute(jsObject: jsObject, name: Strings.rules) + _summary = ReadWriteAttribute(jsObject: jsObject, name: Strings.summary) + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + _cellPadding = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellPadding) + _cellSpacing = ReadWriteAttribute(jsObject: jsObject, name: Strings.cellSpacing) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var caption: HTMLTableCaptionElement? + + @inlinable public func createCaption() -> HTMLTableCaptionElement { + let this = jsObject + return this[Strings.createCaption].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteCaption() { + let this = jsObject + _ = this[Strings.deleteCaption].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var tHead: HTMLTableSectionElement? + + @inlinable public func createTHead() -> HTMLTableSectionElement { + let this = jsObject + return this[Strings.createTHead].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteTHead() { + let this = jsObject + _ = this[Strings.deleteTHead].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var tFoot: HTMLTableSectionElement? + + @inlinable public func createTFoot() -> HTMLTableSectionElement { + let this = jsObject + return this[Strings.createTFoot].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func deleteTFoot() { + let this = jsObject + _ = this[Strings.deleteTFoot].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var tBodies: HTMLCollection + + @inlinable public func createTBody() -> HTMLTableSectionElement { + let this = jsObject + return this[Strings.createTBody].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var rows: HTMLCollection + + @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { + let this = jsObject + return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteRow(index: Int32) { + let this = jsObject + _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var border: String + + @ReadWriteAttribute + public var frame: String + + @ReadWriteAttribute + public var rules: String + + @ReadWriteAttribute + public var summary: String + + @ReadWriteAttribute + public var width: String + + @ReadWriteAttribute + public var bgColor: String + + @ReadWriteAttribute + public var cellPadding: String + + @ReadWriteAttribute + public var cellSpacing: String +} + +public class HTMLTableRowElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableRowElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _rowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.rowIndex) + _sectionRowIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.sectionRowIndex) + _cells = ReadonlyAttribute(jsObject: jsObject, name: Strings.cells) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + _bgColor = ReadWriteAttribute(jsObject: jsObject, name: Strings.bgColor) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var rowIndex: Int32 + + @ReadonlyAttribute + public var sectionRowIndex: Int32 + + @ReadonlyAttribute + public var cells: HTMLCollection + + @inlinable public func insertCell(index: Int32? = nil) -> HTMLTableCellElement { + let this = jsObject + return this[Strings.insertCell].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteCell(index: Int32) { + let this = jsObject + _ = this[Strings.deleteCell].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String + + @ReadWriteAttribute + public var bgColor: String +} + +public class HTMLTableSectionElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTableSectionElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _rows = ReadonlyAttribute(jsObject: jsObject, name: Strings.rows) + _align = ReadWriteAttribute(jsObject: jsObject, name: Strings.align) + _ch = ReadWriteAttribute(jsObject: jsObject, name: Strings.ch) + _chOff = ReadWriteAttribute(jsObject: jsObject, name: Strings.chOff) + _vAlign = ReadWriteAttribute(jsObject: jsObject, name: Strings.vAlign) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var rows: HTMLCollection + + @inlinable public func insertRow(index: Int32? = nil) -> HTMLTableRowElement { + let this = jsObject + return this[Strings.insertRow].function!(this: this, arguments: [index?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func deleteRow(index: Int32) { + let this = jsObject + _ = this[Strings.deleteRow].function!(this: this, arguments: [index.jsValue]) + } + + @ReadWriteAttribute + public var align: String + + @ReadWriteAttribute + public var ch: String + + @ReadWriteAttribute + public var chOff: String + + @ReadWriteAttribute + public var vAlign: String +} + +public class HTMLTemplateElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTemplateElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _content = ReadonlyAttribute(jsObject: jsObject, name: Strings.content) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var content: DocumentFragment +} + +public class HTMLTextAreaElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTextAreaElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _autocomplete = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocomplete) + _cols = ReadWriteAttribute(jsObject: jsObject, name: Strings.cols) + _dirName = ReadWriteAttribute(jsObject: jsObject, name: Strings.dirName) + _disabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.disabled) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _maxLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.maxLength) + _minLength = ReadWriteAttribute(jsObject: jsObject, name: Strings.minLength) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _placeholder = ReadWriteAttribute(jsObject: jsObject, name: Strings.placeholder) + _readOnly = ReadWriteAttribute(jsObject: jsObject, name: Strings.readOnly) + _required = ReadWriteAttribute(jsObject: jsObject, name: Strings.required) + _rows = ReadWriteAttribute(jsObject: jsObject, name: Strings.rows) + _wrap = ReadWriteAttribute(jsObject: jsObject, name: Strings.wrap) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _defaultValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.defaultValue) + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + _textLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.textLength) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + _selectionStart = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionStart) + _selectionEnd = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionEnd) + _selectionDirection = ReadWriteAttribute(jsObject: jsObject, name: Strings.selectionDirection) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var autocomplete: String + + @ReadWriteAttribute + public var cols: UInt32 + + @ReadWriteAttribute + public var dirName: String + + @ReadWriteAttribute + public var disabled: Bool + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @ReadWriteAttribute + public var maxLength: Int32 + + @ReadWriteAttribute + public var minLength: Int32 + + @ReadWriteAttribute + public var name: String + + @ReadWriteAttribute + public var placeholder: String + + @ReadWriteAttribute + public var readOnly: Bool + + @ReadWriteAttribute + public var required: Bool + + @ReadWriteAttribute + public var rows: UInt32 + + @ReadWriteAttribute + public var wrap: String + + @ReadonlyAttribute + public var type: String + + @ReadWriteAttribute + public var defaultValue: String + + @ReadWriteAttribute + public var value: String + + @ReadonlyAttribute + public var textLength: UInt32 + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setCustomValidity(error: String) { + let this = jsObject + _ = this[Strings.setCustomValidity].function!(this: this, arguments: [error.jsValue]) + } + + @ReadonlyAttribute + public var labels: NodeList + + @inlinable public func select() { + let this = jsObject + _ = this[Strings.select].function!(this: this, arguments: []) + } + + @ReadWriteAttribute + public var selectionStart: UInt32 + + @ReadWriteAttribute + public var selectionEnd: UInt32 + + @ReadWriteAttribute + public var selectionDirection: String + + @inlinable public func setRangeText(replacement: String) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue]) + } + + @inlinable public func setRangeText(replacement: String, start: UInt32, end: UInt32, selectionMode: SelectionMode? = nil) { + let this = jsObject + _ = this[Strings.setRangeText].function!(this: this, arguments: [replacement.jsValue, start.jsValue, end.jsValue, selectionMode?.jsValue ?? .undefined]) + } + + @inlinable public func setSelectionRange(start: UInt32, end: UInt32, direction: String? = nil) { + let this = jsObject + _ = this[Strings.setSelectionRange].function!(this: this, arguments: [start.jsValue, end.jsValue, direction?.jsValue ?? .undefined]) + } +} + +public class HTMLTimeElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTimeElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _dateTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.dateTime) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var dateTime: String +} + +public class HTMLTitleElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTitleElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _text = ReadWriteAttribute(jsObject: jsObject, name: Strings.text) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var text: String +} + +public class HTMLTrackElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLTrackElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadWriteAttribute(jsObject: jsObject, name: Strings.kind) + _src = ReadWriteAttribute(jsObject: jsObject, name: Strings.src) + _srclang = ReadWriteAttribute(jsObject: jsObject, name: Strings.srclang) + _label = ReadWriteAttribute(jsObject: jsObject, name: Strings.label) + _default = ReadWriteAttribute(jsObject: jsObject, name: Strings.default) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var kind: String + + @ReadWriteAttribute + public var src: String + + @ReadWriteAttribute + public var srclang: String + + @ReadWriteAttribute + public var label: String + + @ReadWriteAttribute + public var `default`: Bool + + public static let NONE: UInt16 = 0 + + public static let LOADING: UInt16 = 1 + + public static let LOADED: UInt16 = 2 + + public static let ERROR: UInt16 = 3 + + @ReadonlyAttribute + public var readyState: UInt16 + + @ReadonlyAttribute + public var track: TextTrack +} + +public class HTMLUListElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUListElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _compact = ReadWriteAttribute(jsObject: jsObject, name: Strings.compact) + _type = ReadWriteAttribute(jsObject: jsObject, name: Strings.type) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var compact: Bool + + @ReadWriteAttribute + public var type: String +} + +public class HTMLUnknownElement: HTMLElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLUnknownElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class HTMLVideoElement: HTMLMediaElement { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HTMLVideoElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _videoWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoWidth) + _videoHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoHeight) + _poster = ReadWriteAttribute(jsObject: jsObject, name: Strings.poster) + _playsInline = ReadWriteAttribute(jsObject: jsObject, name: Strings.playsInline) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var videoWidth: UInt32 + + @ReadonlyAttribute + public var videoHeight: UInt32 + + @ReadWriteAttribute + public var poster: String + + @ReadWriteAttribute + public var playsInline: Bool +} + +public class HashChangeEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HashChangeEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _oldURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldURL) + _newURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.newURL) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: HashChangeEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var oldURL: String + + @ReadonlyAttribute + public var newURL: String +} + +public class HashChangeEventInit: BridgedDictionary { + public convenience init(oldURL: String, newURL: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.oldURL] = oldURL.jsValue + object[Strings.newURL] = newURL.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _oldURL = ReadWriteAttribute(jsObject: object, name: Strings.oldURL) + _newURL = ReadWriteAttribute(jsObject: object, name: Strings.newURL) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var oldURL: String + + @ReadWriteAttribute + public var newURL: String +} + +public class Headers: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Headers].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: HeadersInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public class History: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.History].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _scrollRestoration = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollRestoration) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @ReadWriteAttribute + public var scrollRestoration: ScrollRestoration + + @ReadonlyAttribute + public var state: JSValue + + @inlinable public func go(delta: Int32? = nil) { + let this = jsObject + _ = this[Strings.go].function!(this: this, arguments: [delta?.jsValue ?? .undefined]) + } + + @inlinable public func back() { + let this = jsObject + _ = this[Strings.back].function!(this: this, arguments: []) + } + + @inlinable public func forward() { + let this = jsObject + _ = this[Strings.forward].function!(this: this, arguments: []) + } + + @inlinable public func pushState(data: JSValue, unused: String, url: String? = nil) { + let this = jsObject + _ = this[Strings.pushState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) + } + + @inlinable public func replaceState(data: JSValue, unused: String, url: String? = nil) { + let this = jsObject + _ = this[Strings.replaceState].function!(this: this, arguments: [data.jsValue, unused.jsValue, url?.jsValue ?? .undefined]) + } +} + +public class ImageBitmap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var width: UInt32 + + @ReadonlyAttribute + public var height: UInt32 + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} + +public class ImageBitmapOptions: BridgedDictionary { + public convenience init(imageOrientation: ImageOrientation, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, resizeWidth: UInt32, resizeHeight: UInt32, resizeQuality: ResizeQuality) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.imageOrientation] = imageOrientation.jsValue + object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue + object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue + object[Strings.resizeWidth] = resizeWidth.jsValue + object[Strings.resizeHeight] = resizeHeight.jsValue + object[Strings.resizeQuality] = resizeQuality.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _imageOrientation = ReadWriteAttribute(jsObject: object, name: Strings.imageOrientation) + _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) + _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) + _resizeWidth = ReadWriteAttribute(jsObject: object, name: Strings.resizeWidth) + _resizeHeight = ReadWriteAttribute(jsObject: object, name: Strings.resizeHeight) + _resizeQuality = ReadWriteAttribute(jsObject: object, name: Strings.resizeQuality) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var imageOrientation: ImageOrientation + + @ReadWriteAttribute + public var premultiplyAlpha: PremultiplyAlpha + + @ReadWriteAttribute + public var colorSpaceConversion: ColorSpaceConversion + + @ReadWriteAttribute + public var resizeWidth: UInt32 + + @ReadWriteAttribute + public var resizeHeight: UInt32 + + @ReadWriteAttribute + public var resizeQuality: ResizeQuality +} + +public class ImageBitmapRenderingContext: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageBitmapRenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: JSValue + + @inlinable public func transferFromImageBitmap(bitmap: ImageBitmap?) { + let this = jsObject + _ = this[Strings.transferFromImageBitmap].function!(this: this, arguments: [bitmap.jsValue]) + } +} + +public class ImageBitmapRenderingContextSettings: BridgedDictionary { + public convenience init(alpha: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool +} + +public class ImageData: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) + self.jsObject = jsObject + } + + @inlinable public convenience init(sw: UInt32, sh: UInt32, settings: ImageDataSettings? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(data: Uint8ClampedArray, sw: UInt32, sh: UInt32? = nil, settings: ImageDataSettings? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, sw.jsValue, sh?.jsValue ?? .undefined, settings?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var width: UInt32 + + @ReadonlyAttribute + public var height: UInt32 + + @ReadonlyAttribute + public var data: Uint8ClampedArray + + @ReadonlyAttribute + public var colorSpace: PredefinedColorSpace +} + +public class ImageDataSettings: BridgedDictionary { + public convenience init(colorSpace: PredefinedColorSpace) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace +} + +public class ImageEncodeOptions: BridgedDictionary { + public convenience init(type: String, quality: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.quality] = quality.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _quality = ReadWriteAttribute(jsObject: object, name: Strings.quality) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var quality: Double +} + +public enum ImageOrientation: JSString, JSValueCompatible { + case none = "none" + case flipY = "flipY" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ImageSmoothingQuality: JSString, JSValueCompatible { + case low = "low" + case medium = "medium" + case high = "high" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class InputEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) + _inputType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inputType) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: InputEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: String? + + @ReadonlyAttribute + public var isComposing: Bool + + @ReadonlyAttribute + public var inputType: String +} + +public class InputEventInit: BridgedDictionary { + public convenience init(data: String?, isComposing: Bool, inputType: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.isComposing] = isComposing.jsValue + object[Strings.inputType] = inputType.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) + _inputType = ReadWriteAttribute(jsObject: object, name: Strings.inputType) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: String? + + @ReadWriteAttribute + public var isComposing: Bool + + @ReadWriteAttribute + public var inputType: String +} + +public class KeyboardEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) + _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) + _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) + _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) + _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) + _repeat = ReadonlyAttribute(jsObject: jsObject, name: Strings.repeat) + _isComposing = ReadonlyAttribute(jsObject: jsObject, name: Strings.isComposing) + _charCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.charCode) + _keyCode = ReadonlyAttribute(jsObject: jsObject, name: Strings.keyCode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: KeyboardEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + public static let DOM_KEY_LOCATION_STANDARD: UInt32 = 0x00 + + public static let DOM_KEY_LOCATION_LEFT: UInt32 = 0x01 + + public static let DOM_KEY_LOCATION_RIGHT: UInt32 = 0x02 + + public static let DOM_KEY_LOCATION_NUMPAD: UInt32 = 0x03 + + @ReadonlyAttribute + public var key: String + + @ReadonlyAttribute + public var code: String + + @ReadonlyAttribute + public var location: UInt32 + + @ReadonlyAttribute + public var ctrlKey: Bool + + @ReadonlyAttribute + public var shiftKey: Bool + + @ReadonlyAttribute + public var altKey: Bool + + @ReadonlyAttribute + public var metaKey: Bool + + @ReadonlyAttribute + public var `repeat`: Bool + + @ReadonlyAttribute + public var isComposing: Bool + + @inlinable public func getModifierState(keyArg: String) -> Bool { + let this = jsObject + return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! + } + + @inlinable public func initKeyboardEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, keyArg: String? = nil, locationArg: UInt32? = nil, ctrlKey: Bool? = nil, altKey: Bool? = nil, shiftKey: Bool? = nil, metaKey: Bool? = nil) { + let _arg0 = typeArg.jsValue + let _arg1 = bubblesArg?.jsValue ?? .undefined + let _arg2 = cancelableArg?.jsValue ?? .undefined + let _arg3 = viewArg?.jsValue ?? .undefined + let _arg4 = keyArg?.jsValue ?? .undefined + let _arg5 = locationArg?.jsValue ?? .undefined + let _arg6 = ctrlKey?.jsValue ?? .undefined + let _arg7 = altKey?.jsValue ?? .undefined + let _arg8 = shiftKey?.jsValue ?? .undefined + let _arg9 = metaKey?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initKeyboardEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @ReadonlyAttribute + public var charCode: UInt32 + + @ReadonlyAttribute + public var keyCode: UInt32 +} + +public class KeyboardEventInit: BridgedDictionary { + public convenience init(key: String, code: String, location: UInt32, repeat: Bool, isComposing: Bool, charCode: UInt32, keyCode: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.key] = key.jsValue + object[Strings.code] = code.jsValue + object[Strings.location] = location.jsValue + object[Strings.repeat] = `repeat`.jsValue + object[Strings.isComposing] = isComposing.jsValue + object[Strings.charCode] = charCode.jsValue + object[Strings.keyCode] = keyCode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _key = ReadWriteAttribute(jsObject: object, name: Strings.key) + _code = ReadWriteAttribute(jsObject: object, name: Strings.code) + _location = ReadWriteAttribute(jsObject: object, name: Strings.location) + _repeat = ReadWriteAttribute(jsObject: object, name: Strings.repeat) + _isComposing = ReadWriteAttribute(jsObject: object, name: Strings.isComposing) + _charCode = ReadWriteAttribute(jsObject: object, name: Strings.charCode) + _keyCode = ReadWriteAttribute(jsObject: object, name: Strings.keyCode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var key: String + + @ReadWriteAttribute + public var code: String + + @ReadWriteAttribute + public var location: UInt32 + + @ReadWriteAttribute + public var `repeat`: Bool + + @ReadWriteAttribute + public var isComposing: Bool + + @ReadWriteAttribute + public var charCode: UInt32 + + @ReadWriteAttribute + public var keyCode: UInt32 +} + +public class KeyframeAnimationOptions: BridgedDictionary { + public convenience init(id: String, timeline: AnimationTimeline?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.id] = id.jsValue + object[Strings.timeline] = timeline.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _id = ReadWriteAttribute(jsObject: object, name: Strings.id) + _timeline = ReadWriteAttribute(jsObject: object, name: Strings.timeline) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var timeline: AnimationTimeline? +} + +public class KeyframeEffect: AnimationEffect { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyframeEffect].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadWriteAttribute(jsObject: jsObject, name: Strings.target) + _pseudoElement = ReadWriteAttribute(jsObject: jsObject, name: Strings.pseudoElement) + _composite = ReadWriteAttribute(jsObject: jsObject, name: Strings.composite) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(target: Element?, keyframes: JSObject?, options: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [target.jsValue, keyframes.jsValue, options?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(source: KeyframeEffect) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [source.jsValue])) + } + + @ReadWriteAttribute + public var target: Element? + + @ReadWriteAttribute + public var pseudoElement: String? + + @ReadWriteAttribute + public var composite: CompositeOperation + + @inlinable public func getKeyframes() -> [JSObject] { + let this = jsObject + return this[Strings.getKeyframes].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func setKeyframes(keyframes: JSObject?) { + let this = jsObject + _ = this[Strings.setKeyframes].function!(this: this, arguments: [keyframes.jsValue]) + } +} + +public class KeyframeEffectOptions: BridgedDictionary { + public convenience init(composite: CompositeOperation, pseudoElement: String?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.composite] = composite.jsValue + object[Strings.pseudoElement] = pseudoElement.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + _pseudoElement = ReadWriteAttribute(jsObject: object, name: Strings.pseudoElement) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var composite: CompositeOperation + + @ReadWriteAttribute + public var pseudoElement: String? +} + +public class Location: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Location].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) + _ancestorOrigins = ReadonlyAttribute(jsObject: jsObject, name: Strings.ancestorOrigins) + self.jsObject = jsObject + } + + @ReadWriteAttribute + public var href: String + + @ReadonlyAttribute + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String + + @ReadWriteAttribute + public var hash: String + + @inlinable public func assign(url: String) { + let this = jsObject + _ = this[Strings.assign].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public func replace(url: String) { + let this = jsObject + _ = this[Strings.replace].function!(this: this, arguments: [url.jsValue]) + } + + @inlinable public func reload() { + let this = jsObject + _ = this[Strings.reload].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var ancestorOrigins: DOMStringList +} + +public class MediaError: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaError].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + self.jsObject = jsObject + } + + public static let MEDIA_ERR_ABORTED: UInt16 = 1 + + public static let MEDIA_ERR_NETWORK: UInt16 = 2 + + public static let MEDIA_ERR_DECODE: UInt16 = 3 + + public static let MEDIA_ERR_SRC_NOT_SUPPORTED: UInt16 = 4 + + @ReadonlyAttribute + public var code: UInt16 + + @ReadonlyAttribute + public var message: String +} + +public class MessageChannel: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MessageChannel].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _port1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port1) + _port2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port2) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var port1: MessagePort + + @ReadonlyAttribute + public var port2: MessagePort +} + +public class MessageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastEventId) + _source = ReadonlyAttribute(jsObject: jsObject, name: Strings.source) + _ports = ReadonlyAttribute(jsObject: jsObject, name: Strings.ports) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: JSValue + + @ReadonlyAttribute + public var origin: String + + @ReadonlyAttribute + public var lastEventId: String + + @ReadonlyAttribute + public var source: MessageEventSource? + + @ReadonlyAttribute + public var ports: [MessagePort] + + @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = data?.jsValue ?? .undefined + let _arg4 = origin?.jsValue ?? .undefined + let _arg5 = lastEventId?.jsValue ?? .undefined + let _arg6 = source?.jsValue ?? .undefined + let _arg7 = ports?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class MessageEventInit: BridgedDictionary { + public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.origin] = origin.jsValue + object[Strings.lastEventId] = lastEventId.jsValue + object[Strings.source] = source.jsValue + object[Strings.ports] = ports.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) + _lastEventId = ReadWriteAttribute(jsObject: object, name: Strings.lastEventId) + _source = ReadWriteAttribute(jsObject: object, name: Strings.source) + _ports = ReadWriteAttribute(jsObject: object, name: Strings.ports) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: JSValue + + @ReadWriteAttribute + public var origin: String + + @ReadWriteAttribute + public var lastEventId: String + + @ReadWriteAttribute + public var source: MessageEventSource? + + @ReadWriteAttribute + public var ports: [MessagePort] +} + +public class MessagePort: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessagePort].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func start() { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class MimeType: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeType].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) + _suffixes = ReadonlyAttribute(jsObject: jsObject, name: Strings.suffixes) + _enabledPlugin = ReadonlyAttribute(jsObject: jsObject, name: Strings.enabledPlugin) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var description: String + + @ReadonlyAttribute + public var suffixes: String + + @ReadonlyAttribute + public var enabledPlugin: Plugin +} + +public class MimeTypeArray: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MimeTypeArray].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> MimeType? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> MimeType? { + jsObject[key].fromJSValue() + } +} + +public class MouseEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MouseEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) + _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) + _clientX = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientX) + _clientY = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientY) + _ctrlKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.ctrlKey) + _shiftKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.shiftKey) + _altKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.altKey) + _metaKey = ReadonlyAttribute(jsObject: jsObject, name: Strings.metaKey) + _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) + _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) + _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MouseEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var screenX: Int32 + + @ReadonlyAttribute + public var screenY: Int32 + + @ReadonlyAttribute + public var clientX: Int32 + + @ReadonlyAttribute + public var clientY: Int32 + + @ReadonlyAttribute + public var ctrlKey: Bool + + @ReadonlyAttribute + public var shiftKey: Bool + + @ReadonlyAttribute + public var altKey: Bool + + @ReadonlyAttribute + public var metaKey: Bool + + @ReadonlyAttribute + public var button: Int16 + + @ReadonlyAttribute + public var buttons: UInt16 + + @ReadonlyAttribute + public var relatedTarget: EventTarget? + + @inlinable public func getModifierState(keyArg: String) -> Bool { + let this = jsObject + return this[Strings.getModifierState].function!(this: this, arguments: [keyArg.jsValue]).fromJSValue()! + } + + @inlinable public func initMouseEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil, screenXArg: Int32? = nil, screenYArg: Int32? = nil, clientXArg: Int32? = nil, clientYArg: Int32? = nil, ctrlKeyArg: Bool? = nil, altKeyArg: Bool? = nil, shiftKeyArg: Bool? = nil, metaKeyArg: Bool? = nil, buttonArg: Int16? = nil, relatedTargetArg: EventTarget? = nil) { + let _arg0 = typeArg.jsValue + let _arg1 = bubblesArg?.jsValue ?? .undefined + let _arg2 = cancelableArg?.jsValue ?? .undefined + let _arg3 = viewArg?.jsValue ?? .undefined + let _arg4 = detailArg?.jsValue ?? .undefined + let _arg5 = screenXArg?.jsValue ?? .undefined + let _arg6 = screenYArg?.jsValue ?? .undefined + let _arg7 = clientXArg?.jsValue ?? .undefined + let _arg8 = clientYArg?.jsValue ?? .undefined + let _arg9 = ctrlKeyArg?.jsValue ?? .undefined + let _arg10 = altKeyArg?.jsValue ?? .undefined + let _arg11 = shiftKeyArg?.jsValue ?? .undefined + let _arg12 = metaKeyArg?.jsValue ?? .undefined + let _arg13 = buttonArg?.jsValue ?? .undefined + let _arg14 = relatedTargetArg?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) + } +} + +public class MouseEventInit: BridgedDictionary { + public convenience init(screenX: Int32, screenY: Int32, clientX: Int32, clientY: Int32, button: Int16, buttons: UInt16, relatedTarget: EventTarget?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.screenX] = screenX.jsValue + object[Strings.screenY] = screenY.jsValue + object[Strings.clientX] = clientX.jsValue + object[Strings.clientY] = clientY.jsValue + object[Strings.button] = button.jsValue + object[Strings.buttons] = buttons.jsValue + object[Strings.relatedTarget] = relatedTarget.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _screenX = ReadWriteAttribute(jsObject: object, name: Strings.screenX) + _screenY = ReadWriteAttribute(jsObject: object, name: Strings.screenY) + _clientX = ReadWriteAttribute(jsObject: object, name: Strings.clientX) + _clientY = ReadWriteAttribute(jsObject: object, name: Strings.clientY) + _button = ReadWriteAttribute(jsObject: object, name: Strings.button) + _buttons = ReadWriteAttribute(jsObject: object, name: Strings.buttons) + _relatedTarget = ReadWriteAttribute(jsObject: object, name: Strings.relatedTarget) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var screenX: Int32 + + @ReadWriteAttribute + public var screenY: Int32 + + @ReadWriteAttribute + public var clientX: Int32 + + @ReadWriteAttribute + public var clientY: Int32 + + @ReadWriteAttribute + public var button: Int16 + + @ReadWriteAttribute + public var buttons: UInt16 + + @ReadWriteAttribute + public var relatedTarget: EventTarget? +} + +public class MultiCacheQueryOptions: BridgedDictionary { + public convenience init(cacheName: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.cacheName] = cacheName.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _cacheName = ReadWriteAttribute(jsObject: object, name: Strings.cacheName) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var cacheName: String +} + +public class MutationEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MutationEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _relatedNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedNode) + _prevValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.prevValue) + _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) + _attrName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrName) + _attrChange = ReadonlyAttribute(jsObject: jsObject, name: Strings.attrChange) + super.init(unsafelyWrapping: jsObject) + } + + public static let MODIFICATION: UInt16 = 1 + + public static let ADDITION: UInt16 = 2 + + public static let REMOVAL: UInt16 = 3 + + @ReadonlyAttribute + public var relatedNode: Node? + + @ReadonlyAttribute + public var prevValue: String + + @ReadonlyAttribute + public var newValue: String + + @ReadonlyAttribute + public var attrName: String + + @ReadonlyAttribute + public var attrChange: UInt16 + + @inlinable public func initMutationEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, relatedNodeArg: Node? = nil, prevValueArg: String? = nil, newValueArg: String? = nil, attrNameArg: String? = nil, attrChangeArg: UInt16? = nil) { + let _arg0 = typeArg.jsValue + let _arg1 = bubblesArg?.jsValue ?? .undefined + let _arg2 = cancelableArg?.jsValue ?? .undefined + let _arg3 = relatedNodeArg?.jsValue ?? .undefined + let _arg4 = prevValueArg?.jsValue ?? .undefined + let _arg5 = newValueArg?.jsValue ?? .undefined + let _arg6 = attrNameArg?.jsValue ?? .undefined + let _arg7 = attrChangeArg?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMutationEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class MutationObserver: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationObserver].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + // XXX: constructor is ignored + + @inlinable public func observe(target: Node, options: MutationObserverInit? = nil) { + let this = jsObject + _ = this[Strings.observe].function!(this: this, arguments: [target.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func disconnect() { + let this = jsObject + _ = this[Strings.disconnect].function!(this: this, arguments: []) + } + + @inlinable public func takeRecords() -> [MutationRecord] { + let this = jsObject + return this[Strings.takeRecords].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class MutationObserverInit: BridgedDictionary { + public convenience init(childList: Bool, attributes: Bool, characterData: Bool, subtree: Bool, attributeOldValue: Bool, characterDataOldValue: Bool, attributeFilter: [String]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.childList] = childList.jsValue + object[Strings.attributes] = attributes.jsValue + object[Strings.characterData] = characterData.jsValue + object[Strings.subtree] = subtree.jsValue + object[Strings.attributeOldValue] = attributeOldValue.jsValue + object[Strings.characterDataOldValue] = characterDataOldValue.jsValue + object[Strings.attributeFilter] = attributeFilter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _childList = ReadWriteAttribute(jsObject: object, name: Strings.childList) + _attributes = ReadWriteAttribute(jsObject: object, name: Strings.attributes) + _characterData = ReadWriteAttribute(jsObject: object, name: Strings.characterData) + _subtree = ReadWriteAttribute(jsObject: object, name: Strings.subtree) + _attributeOldValue = ReadWriteAttribute(jsObject: object, name: Strings.attributeOldValue) + _characterDataOldValue = ReadWriteAttribute(jsObject: object, name: Strings.characterDataOldValue) + _attributeFilter = ReadWriteAttribute(jsObject: object, name: Strings.attributeFilter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var childList: Bool + + @ReadWriteAttribute + public var attributes: Bool + + @ReadWriteAttribute + public var characterData: Bool + + @ReadWriteAttribute + public var subtree: Bool + + @ReadWriteAttribute + public var attributeOldValue: Bool + + @ReadWriteAttribute + public var characterDataOldValue: Bool + + @ReadWriteAttribute + public var attributeFilter: [String] +} + +public class MutationRecord: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MutationRecord].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) + _addedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.addedNodes) + _removedNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.removedNodes) + _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) + _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) + _attributeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeName) + _attributeNamespace = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributeNamespace) + _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var target: Node + + @ReadonlyAttribute + public var addedNodes: NodeList + + @ReadonlyAttribute + public var removedNodes: NodeList + + @ReadonlyAttribute + public var previousSibling: Node? + + @ReadonlyAttribute + public var nextSibling: Node? + + @ReadonlyAttribute + public var attributeName: String? + + @ReadonlyAttribute + public var attributeNamespace: String? + + @ReadonlyAttribute + public var oldValue: String? +} + +public class NamedNodeMap: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NamedNodeMap].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Attr? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Attr? { + jsObject[key].fromJSValue() + } + + @inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? { + let this = jsObject + return this[Strings.getNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func setNamedItem(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setNamedItem].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func setNamedItemNS(attr: Attr) -> Attr? { + let this = jsObject + return this[Strings.setNamedItemNS].function!(this: this, arguments: [attr.jsValue]).fromJSValue()! + } + + @inlinable public func removeNamedItem(qualifiedName: String) -> Attr { + let this = jsObject + return this[Strings.removeNamedItem].function!(this: this, arguments: [qualifiedName.jsValue]).fromJSValue()! + } + + @inlinable public func removeNamedItemNS(namespace: String?, localName: String) -> Attr { + let this = jsObject + return this[Strings.removeNamedItemNS].function!(this: this, arguments: [namespace.jsValue, localName.jsValue]).fromJSValue()! + } +} + +public class NavigationPreloadManager: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NavigationPreloadManager].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func enable() -> JSPromise { + let this = jsObject + return this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func enable() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.enable].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func disable() -> JSPromise { + let this = jsObject + return this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func disable() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.disable].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func setHeaderValue(value: String) -> JSPromise { + let this = jsObject + return this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func setHeaderValue(value: String) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.setHeaderValue].function!(this: this, arguments: [value.jsValue]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getState() -> JSPromise { + let this = jsObject + return this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getState() async throws -> NavigationPreloadState { + let this = jsObject + let _promise: JSPromise = this[Strings.getState].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class NavigationPreloadState: BridgedDictionary { + public convenience init(enabled: Bool, headerValue: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.enabled] = enabled.jsValue + object[Strings.headerValue] = headerValue.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _enabled = ReadWriteAttribute(jsObject: object, name: Strings.enabled) + _headerValue = ReadWriteAttribute(jsObject: object, name: Strings.headerValue) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var enabled: Bool + + @ReadWriteAttribute + public var headerValue: String +} + +public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Navigator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _serviceWorker = ReadonlyAttribute(jsObject: jsObject, name: Strings.serviceWorker) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var serviceWorker: ServiceWorkerContainer +} + +public protocol NavigatorConcurrentHardware: JSBridgedClass {} +public extension NavigatorConcurrentHardware { + @inlinable var hardwareConcurrency: UInt64 { ReadonlyAttribute[Strings.hardwareConcurrency, in: jsObject] } +} + +public protocol NavigatorContentUtils: JSBridgedClass {} +public extension NavigatorContentUtils { + @inlinable func registerProtocolHandler(scheme: String, url: String) { + let this = jsObject + _ = this[Strings.registerProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) + } + + @inlinable func unregisterProtocolHandler(scheme: String, url: String) { + let this = jsObject + _ = this[Strings.unregisterProtocolHandler].function!(this: this, arguments: [scheme.jsValue, url.jsValue]) + } +} + +public protocol NavigatorCookies: JSBridgedClass {} +public extension NavigatorCookies { + @inlinable var cookieEnabled: Bool { ReadonlyAttribute[Strings.cookieEnabled, in: jsObject] } +} + +public protocol NavigatorID: JSBridgedClass {} +public extension NavigatorID { + @inlinable var appCodeName: String { ReadonlyAttribute[Strings.appCodeName, in: jsObject] } + + @inlinable var appName: String { ReadonlyAttribute[Strings.appName, in: jsObject] } + + @inlinable var appVersion: String { ReadonlyAttribute[Strings.appVersion, in: jsObject] } + + @inlinable var platform: String { ReadonlyAttribute[Strings.platform, in: jsObject] } + + @inlinable var product: String { ReadonlyAttribute[Strings.product, in: jsObject] } + + @inlinable var productSub: String { ReadonlyAttribute[Strings.productSub, in: jsObject] } + + @inlinable var userAgent: String { ReadonlyAttribute[Strings.userAgent, in: jsObject] } + + @inlinable var vendor: String { ReadonlyAttribute[Strings.vendor, in: jsObject] } + + @inlinable var vendorSub: String { ReadonlyAttribute[Strings.vendorSub, in: jsObject] } + + @inlinable func taintEnabled() -> Bool { + let this = jsObject + return this[Strings.taintEnabled].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var oscpu: String { ReadonlyAttribute[Strings.oscpu, in: jsObject] } +} + +public protocol NavigatorLanguage: JSBridgedClass {} +public extension NavigatorLanguage { + @inlinable var language: String { ReadonlyAttribute[Strings.language, in: jsObject] } + + @inlinable var languages: [String] { ReadonlyAttribute[Strings.languages, in: jsObject] } +} + +public protocol NavigatorOnLine: JSBridgedClass {} +public extension NavigatorOnLine { + @inlinable var onLine: Bool { ReadonlyAttribute[Strings.onLine, in: jsObject] } +} + +public protocol NavigatorPlugins: JSBridgedClass {} +public extension NavigatorPlugins { + @inlinable var plugins: PluginArray { ReadonlyAttribute[Strings.plugins, in: jsObject] } + + @inlinable var mimeTypes: MimeTypeArray { ReadonlyAttribute[Strings.mimeTypes, in: jsObject] } + + @inlinable func javaEnabled() -> Bool { + let this = jsObject + return this[Strings.javaEnabled].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable var pdfViewerEnabled: Bool { ReadonlyAttribute[Strings.pdfViewerEnabled, in: jsObject] } +} + +public class Node: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Node].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _nodeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeType) + _nodeName = ReadonlyAttribute(jsObject: jsObject, name: Strings.nodeName) + _baseURI = ReadonlyAttribute(jsObject: jsObject, name: Strings.baseURI) + _isConnected = ReadonlyAttribute(jsObject: jsObject, name: Strings.isConnected) + _ownerDocument = ReadonlyAttribute(jsObject: jsObject, name: Strings.ownerDocument) + _parentNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentNode) + _parentElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.parentElement) + _childNodes = ReadonlyAttribute(jsObject: jsObject, name: Strings.childNodes) + _firstChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.firstChild) + _lastChild = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastChild) + _previousSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.previousSibling) + _nextSibling = ReadonlyAttribute(jsObject: jsObject, name: Strings.nextSibling) + _nodeValue = ReadWriteAttribute(jsObject: jsObject, name: Strings.nodeValue) + _textContent = ReadWriteAttribute(jsObject: jsObject, name: Strings.textContent) + super.init(unsafelyWrapping: jsObject) + } + + public static let ELEMENT_NODE: UInt16 = 1 + + public static let ATTRIBUTE_NODE: UInt16 = 2 + + public static let TEXT_NODE: UInt16 = 3 + + public static let CDATA_SECTION_NODE: UInt16 = 4 + + public static let ENTITY_REFERENCE_NODE: UInt16 = 5 + + public static let ENTITY_NODE: UInt16 = 6 + + public static let PROCESSING_INSTRUCTION_NODE: UInt16 = 7 + + public static let COMMENT_NODE: UInt16 = 8 + + public static let DOCUMENT_NODE: UInt16 = 9 + + public static let DOCUMENT_TYPE_NODE: UInt16 = 10 + + public static let DOCUMENT_FRAGMENT_NODE: UInt16 = 11 + + public static let NOTATION_NODE: UInt16 = 12 + + @ReadonlyAttribute + public var nodeType: UInt16 + + @ReadonlyAttribute + public var nodeName: String + + @ReadonlyAttribute + public var baseURI: String + + @ReadonlyAttribute + public var isConnected: Bool + + @ReadonlyAttribute + public var ownerDocument: Document? + + @inlinable public func getRootNode(options: GetRootNodeOptions? = nil) -> Self { + let this = jsObject + return this[Strings.getRootNode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var parentNode: Node? + + @ReadonlyAttribute + public var parentElement: Element? + + @inlinable public func hasChildNodes() -> Bool { + let this = jsObject + return this[Strings.hasChildNodes].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var childNodes: NodeList + + @ReadonlyAttribute + public var firstChild: Node? + + @ReadonlyAttribute + public var lastChild: Node? + + @ReadonlyAttribute + public var previousSibling: Node? + + @ReadonlyAttribute + public var nextSibling: Node? + + @ReadWriteAttribute + public var nodeValue: String? + + @ReadWriteAttribute + public var textContent: String? + + @inlinable public func normalize() { + let this = jsObject + _ = this[Strings.normalize].function!(this: this, arguments: []) + } + + @inlinable public func cloneNode(deep: Bool? = nil) -> Self { + let this = jsObject + return this[Strings.cloneNode].function!(this: this, arguments: [deep?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func isEqualNode(otherNode: Node?) -> Bool { + let this = jsObject + return this[Strings.isEqualNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! + } + + @inlinable public func isSameNode(otherNode: Node?) -> Bool { + let this = jsObject + return this[Strings.isSameNode].function!(this: this, arguments: [otherNode.jsValue]).fromJSValue()! + } + + public static let DOCUMENT_POSITION_DISCONNECTED: UInt16 = 0x01 + + public static let DOCUMENT_POSITION_PRECEDING: UInt16 = 0x02 + + public static let DOCUMENT_POSITION_FOLLOWING: UInt16 = 0x04 + + public static let DOCUMENT_POSITION_CONTAINS: UInt16 = 0x08 + + public static let DOCUMENT_POSITION_CONTAINED_BY: UInt16 = 0x10 + + public static let DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: UInt16 = 0x20 + + @inlinable public func compareDocumentPosition(other: Node) -> UInt16 { + let this = jsObject + return this[Strings.compareDocumentPosition].function!(this: this, arguments: [other.jsValue]).fromJSValue()! + } + + @inlinable public func contains(other: Node?) -> Bool { + let this = jsObject + return this[Strings.contains].function!(this: this, arguments: [other.jsValue]).fromJSValue()! + } + + @inlinable public func lookupPrefix(namespace: String?) -> String? { + let this = jsObject + return this[Strings.lookupPrefix].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! + } + + @inlinable public func lookupNamespaceURI(prefix: String?) -> String? { + let this = jsObject + return this[Strings.lookupNamespaceURI].function!(this: this, arguments: [prefix.jsValue]).fromJSValue()! + } + + @inlinable public func isDefaultNamespace(namespace: String?) -> Bool { + let this = jsObject + return this[Strings.isDefaultNamespace].function!(this: this, arguments: [namespace.jsValue]).fromJSValue()! + } + + @inlinable public func insertBefore(node: Node, child: Node?) -> Self { + let this = jsObject + return this[Strings.insertBefore].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! + } + + @inlinable public func appendChild(node: Node) -> Self { + let this = jsObject + return this[Strings.appendChild].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public func replaceChild(node: Node, child: Node) -> Self { + let this = jsObject + return this[Strings.replaceChild].function!(this: this, arguments: [node.jsValue, child.jsValue]).fromJSValue()! + } + + @inlinable public func removeChild(child: Node) -> Self { + let this = jsObject + return this[Strings.removeChild].function!(this: this, arguments: [child.jsValue]).fromJSValue()! + } +} + +public class NodeIterator: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeIterator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) + _referenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.referenceNode) + _pointerBeforeReferenceNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.pointerBeforeReferenceNode) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var root: Node + + @ReadonlyAttribute + public var referenceNode: Node + + @ReadonlyAttribute + public var pointerBeforeReferenceNode: Bool + + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func detach() { + let this = jsObject + _ = this[Strings.detach].function!(this: this, arguments: []) + } +} + +public class NodeList: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.NodeList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> Node? { + jsObject[key].fromJSValue() + } + + @ReadonlyAttribute + public var length: UInt32 + + public typealias Element = Node + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } +} + +public protocol NonDocumentTypeChildNode: JSBridgedClass {} +public extension NonDocumentTypeChildNode { + @inlinable var previousElementSibling: Element? { ReadonlyAttribute[Strings.previousElementSibling, in: jsObject] } + + @inlinable var nextElementSibling: Element? { ReadonlyAttribute[Strings.nextElementSibling, in: jsObject] } +} + +public protocol NonElementParentNode: JSBridgedClass {} +public extension NonElementParentNode { + @inlinable func getElementById(elementId: String) -> Element? { + let this = jsObject + return this[Strings.getElementById].function!(this: this, arguments: [elementId.jsValue]).fromJSValue()! + } +} + +public class OffscreenCanvas: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvas].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadWriteAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadWriteAttribute(jsObject: jsObject, name: Strings.height) + _oncontextlost = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextlost) + _oncontextrestored = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontextrestored) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(width: UInt64, height: UInt64) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [width.jsValue, height.jsValue])) + } + + @ReadWriteAttribute + public var width: UInt64 + + @ReadWriteAttribute + public var height: UInt64 + + @inlinable public func getContext(contextId: OffscreenRenderingContextId, options: JSValue? = nil) -> OffscreenRenderingContext? { + let this = jsObject + return this[Strings.getContext].function!(this: this, arguments: [contextId.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func transferToImageBitmap() -> ImageBitmap { + let this = jsObject + return this[Strings.transferToImageBitmap].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob { + let this = jsObject + let _promise: JSPromise = this[Strings.convertToBlob].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ClosureAttribute1Optional + public var oncontextlost: EventHandler + + @ClosureAttribute1Optional + public var oncontextrestored: EventHandler +} + +public class OffscreenCanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.OffscreenCanvasRenderingContext2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @inlinable public func commit() { + let this = jsObject + _ = this[Strings.commit].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var canvas: OffscreenCanvas +} + +public enum OffscreenRenderingContextId: JSString, JSValueCompatible { + case _2d = "2d" + case bitmaprenderer = "bitmaprenderer" + case webgl = "webgl" + case webgl2 = "webgl2" + case webgpu = "webgpu" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class OptionalEffectTiming: BridgedDictionary { + public convenience init(delay: Double, endDelay: Double, fill: FillMode, iterationStart: Double, iterations: Double, duration: JSValue, direction: PlaybackDirection, easing: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.delay] = delay.jsValue + object[Strings.endDelay] = endDelay.jsValue + object[Strings.fill] = fill.jsValue + object[Strings.iterationStart] = iterationStart.jsValue + object[Strings.iterations] = iterations.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.direction] = direction.jsValue + object[Strings.easing] = easing.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _delay = ReadWriteAttribute(jsObject: object, name: Strings.delay) + _endDelay = ReadWriteAttribute(jsObject: object, name: Strings.endDelay) + _fill = ReadWriteAttribute(jsObject: object, name: Strings.fill) + _iterationStart = ReadWriteAttribute(jsObject: object, name: Strings.iterationStart) + _iterations = ReadWriteAttribute(jsObject: object, name: Strings.iterations) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _direction = ReadWriteAttribute(jsObject: object, name: Strings.direction) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var delay: Double + + @ReadWriteAttribute + public var endDelay: Double + + @ReadWriteAttribute + public var fill: FillMode + + @ReadWriteAttribute + public var iterationStart: Double + + @ReadWriteAttribute + public var iterations: Double + + @ReadWriteAttribute + public var duration: JSValue + + @ReadWriteAttribute + public var direction: PlaybackDirection + + @ReadWriteAttribute + public var easing: String +} + +public class PageTransitionEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PageTransitionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _persisted = ReadonlyAttribute(jsObject: jsObject, name: Strings.persisted) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PageTransitionEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var persisted: Bool +} + +public class PageTransitionEventInit: BridgedDictionary { + public convenience init(persisted: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.persisted] = persisted.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _persisted = ReadWriteAttribute(jsObject: object, name: Strings.persisted) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var persisted: Bool +} + +public protocol ParentNode: JSBridgedClass {} +public extension ParentNode { + @inlinable var children: HTMLCollection { ReadonlyAttribute[Strings.children, in: jsObject] } + + @inlinable var firstElementChild: Element? { ReadonlyAttribute[Strings.firstElementChild, in: jsObject] } + + @inlinable var lastElementChild: Element? { ReadonlyAttribute[Strings.lastElementChild, in: jsObject] } + + @inlinable var childElementCount: UInt32 { ReadonlyAttribute[Strings.childElementCount, in: jsObject] } + + @inlinable func prepend(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.prepend].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func append(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceChildren(nodes: JSValue...) { + let this = jsObject + _ = this[Strings.replaceChildren].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func querySelector(selectors: String) -> Element? { + let this = jsObject + return this[Strings.querySelector].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } + + @inlinable func querySelectorAll(selectors: String) -> NodeList { + let this = jsObject + return this[Strings.querySelectorAll].function!(this: this, arguments: [selectors.jsValue]).fromJSValue()! + } +} + +public class Path2D: JSBridgedClass, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Path2D].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(path: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [path?.jsValue ?? .undefined])) + } + + @inlinable public func addPath(path: Path2D, transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.addPath].function!(this: this, arguments: [path.jsValue, transform?.jsValue ?? .undefined]) + } +} + +public class Performance: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Performance].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _timeOrigin = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeOrigin) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func now() -> DOMHighResTimeStamp { + let this = jsObject + return this[Strings.now].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var timeOrigin: DOMHighResTimeStamp + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} + +public enum PlaybackDirection: JSString, JSValueCompatible { + case normal = "normal" + case reverse = "reverse" + case alternate = "alternate" + case alternateReverse = "alternate-reverse" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Plugin: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Plugin].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _description = ReadonlyAttribute(jsObject: jsObject, name: Strings.description) + _filename = ReadonlyAttribute(jsObject: jsObject, name: Strings.filename) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var description: String + + @ReadonlyAttribute + public var filename: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> MimeType? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> MimeType? { + jsObject[key].fromJSValue() + } +} + +public class PluginArray: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.PluginArray].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @inlinable public func refresh() { + let this = jsObject + _ = this[Strings.refresh].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> Plugin? { + jsObject[key].fromJSValue() + } + + @inlinable public subscript(key: String) -> Plugin? { + jsObject[key].fromJSValue() + } +} + +public class PopStateEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PopStateEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PopStateEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var state: JSValue +} + +public class PopStateEventInit: BridgedDictionary { + public convenience init(state: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.state] = state.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _state = ReadWriteAttribute(jsObject: object, name: Strings.state) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var state: JSValue +} + +public enum PredefinedColorSpace: JSString, JSValueCompatible { + case srgb = "srgb" + case displayP3 = "display-p3" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum PremultiplyAlpha: JSString, JSValueCompatible { + case none = "none" + case premultiply = "premultiply" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ProcessingInstruction: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProcessingInstruction].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _target = ReadonlyAttribute(jsObject: jsObject, name: Strings.target) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var target: String +} + +public class ProgressEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ProgressEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _lengthComputable = ReadonlyAttribute(jsObject: jsObject, name: Strings.lengthComputable) + _loaded = ReadonlyAttribute(jsObject: jsObject, name: Strings.loaded) + _total = ReadonlyAttribute(jsObject: jsObject, name: Strings.total) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: ProgressEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var lengthComputable: Bool + + @ReadonlyAttribute + public var loaded: UInt64 + + @ReadonlyAttribute + public var total: UInt64 +} + +public class ProgressEventInit: BridgedDictionary { + public convenience init(lengthComputable: Bool, loaded: UInt64, total: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.lengthComputable] = lengthComputable.jsValue + object[Strings.loaded] = loaded.jsValue + object[Strings.total] = total.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _lengthComputable = ReadWriteAttribute(jsObject: object, name: Strings.lengthComputable) + _loaded = ReadWriteAttribute(jsObject: object, name: Strings.loaded) + _total = ReadWriteAttribute(jsObject: object, name: Strings.total) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var lengthComputable: Bool + + @ReadWriteAttribute + public var loaded: UInt64 + + @ReadWriteAttribute + public var total: UInt64 +} + +public class PromiseRejectionEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PromiseRejectionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _promise = ReadonlyAttribute(jsObject: jsObject, name: Strings.promise) + _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: PromiseRejectionEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var promise: JSPromise + + @ReadonlyAttribute + public var reason: JSValue +} + +public class PromiseRejectionEventInit: BridgedDictionary { + public convenience init(promise: JSPromise, reason: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.promise] = promise.jsValue + object[Strings.reason] = reason.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _promise = ReadWriteAttribute(jsObject: object, name: Strings.promise) + _reason = ReadWriteAttribute(jsObject: object, name: Strings.reason) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var promise: JSPromise + + @ReadWriteAttribute + public var reason: JSValue +} + +public class QueuingStrategy: BridgedDictionary { + public convenience init(highWaterMark: Double, size: @escaping QueuingStrategySize) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.highWaterMark] = highWaterMark.jsValue + ClosureAttribute1[Strings.size, in: object] = size + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) + _size = ClosureAttribute1(jsObject: object, name: Strings.size) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var highWaterMark: Double + + @ClosureAttribute1 + public var size: QueuingStrategySize +} + +public class QueuingStrategyInit: BridgedDictionary { + public convenience init(highWaterMark: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.highWaterMark] = highWaterMark.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _highWaterMark = ReadWriteAttribute(jsObject: object, name: Strings.highWaterMark) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var highWaterMark: Double +} + +public class RadioNodeList: NodeList { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.RadioNodeList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _value = ReadWriteAttribute(jsObject: jsObject, name: Strings.value) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var value: String +} + +public class Range: AbstractRange { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Range].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _commonAncestorContainer = ReadonlyAttribute(jsObject: jsObject, name: Strings.commonAncestorContainer) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var commonAncestorContainer: Node + + @inlinable public func setStart(node: Node, offset: UInt32) { + let this = jsObject + _ = this[Strings.setStart].function!(this: this, arguments: [node.jsValue, offset.jsValue]) + } + + @inlinable public func setEnd(node: Node, offset: UInt32) { + let this = jsObject + _ = this[Strings.setEnd].function!(this: this, arguments: [node.jsValue, offset.jsValue]) + } + + @inlinable public func setStartBefore(node: Node) { + let this = jsObject + _ = this[Strings.setStartBefore].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setStartAfter(node: Node) { + let this = jsObject + _ = this[Strings.setStartAfter].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setEndBefore(node: Node) { + let this = jsObject + _ = this[Strings.setEndBefore].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func setEndAfter(node: Node) { + let this = jsObject + _ = this[Strings.setEndAfter].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func collapse(toStart: Bool? = nil) { + let this = jsObject + _ = this[Strings.collapse].function!(this: this, arguments: [toStart?.jsValue ?? .undefined]) + } + + @inlinable public func selectNode(node: Node) { + let this = jsObject + _ = this[Strings.selectNode].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func selectNodeContents(node: Node) { + let this = jsObject + _ = this[Strings.selectNodeContents].function!(this: this, arguments: [node.jsValue]) + } + + public static let START_TO_START: UInt16 = 0 + + public static let START_TO_END: UInt16 = 1 + + public static let END_TO_END: UInt16 = 2 + + public static let END_TO_START: UInt16 = 3 + + @inlinable public func compareBoundaryPoints(how: UInt16, sourceRange: Range) -> Int16 { + let this = jsObject + return this[Strings.compareBoundaryPoints].function!(this: this, arguments: [how.jsValue, sourceRange.jsValue]).fromJSValue()! + } + + @inlinable public func deleteContents() { + let this = jsObject + _ = this[Strings.deleteContents].function!(this: this, arguments: []) + } + + @inlinable public func extractContents() -> DocumentFragment { + let this = jsObject + return this[Strings.extractContents].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func cloneContents() -> DocumentFragment { + let this = jsObject + return this[Strings.cloneContents].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func insertNode(node: Node) { + let this = jsObject + _ = this[Strings.insertNode].function!(this: this, arguments: [node.jsValue]) + } + + @inlinable public func surroundContents(newParent: Node) { + let this = jsObject + _ = this[Strings.surroundContents].function!(this: this, arguments: [newParent.jsValue]) + } + + @inlinable public func cloneRange() -> Self { + let this = jsObject + return this[Strings.cloneRange].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func detach() { + let this = jsObject + _ = this[Strings.detach].function!(this: this, arguments: []) + } + + @inlinable public func isPointInRange(node: Node, offset: UInt32) -> Bool { + let this = jsObject + return this[Strings.isPointInRange].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! + } + + @inlinable public func comparePoint(node: Node, offset: UInt32) -> Int16 { + let this = jsObject + return this[Strings.comparePoint].function!(this: this, arguments: [node.jsValue, offset.jsValue]).fromJSValue()! + } + + @inlinable public func intersectsNode(node: Node) -> Bool { + let this = jsObject + return this[Strings.intersectsNode].function!(this: this, arguments: [node.jsValue]).fromJSValue()! + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } +} + +public class ReadableByteStreamController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableByteStreamController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _byobRequest = ReadonlyAttribute(jsObject: jsObject, name: Strings.byobRequest) + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var byobRequest: ReadableStreamBYOBRequest? + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public func enqueue(chunk: ArrayBufferView) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func error(e: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) + } +} + +public class ReadableStream: JSBridgedClass, AsyncSequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) + self.jsObject = jsObject + } + + @inlinable public convenience init(underlyingSource: JSObject? = nil, strategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSource?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var locked: Bool + + @inlinable public func cancel(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func cancel(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getReader(options: ReadableStreamGetReaderOptions? = nil) -> ReadableStreamReader { + let this = jsObject + return this[Strings.getReader].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func pipeThrough(transform: ReadableWritablePair, options: StreamPipeOptions? = nil) -> Self { + let this = jsObject + return this[Strings.pipeThrough].function!(this: this, arguments: [transform.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func pipeTo(destination: WritableStream, options: StreamPipeOptions? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.pipeTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func tee() -> [ReadableStream] { + let this = jsObject + return this[Strings.tee].function!(this: this, arguments: []).fromJSValue()! + } + + public typealias Element = JSValue + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + public func makeAsyncIterator() -> ValueIterableAsyncIterator { + ValueIterableAsyncIterator(sequence: self) + } +} + +public class ReadableStreamBYOBReadResult: BridgedDictionary { + public convenience init(value: ArrayBufferView?, done: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.value] = value.jsValue + object[Strings.done] = done.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _value = ReadWriteAttribute(jsObject: object, name: Strings.value) + _done = ReadWriteAttribute(jsObject: object, name: Strings.done) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var value: ArrayBufferView? + + @ReadWriteAttribute + public var done: Bool +} + +public class ReadableStreamBYOBReader: JSBridgedClass, ReadableStreamGenericReader { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBReader].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(stream: ReadableStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public func read(view: ArrayBufferView) -> JSPromise { + let this = jsObject + return this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func read(view: ArrayBufferView) async throws -> ReadableStreamBYOBReadResult { + let this = jsObject + let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: [view.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func releaseLock() { + let this = jsObject + _ = this[Strings.releaseLock].function!(this: this, arguments: []) + } +} + +public class ReadableStreamBYOBRequest: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamBYOBRequest].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var view: ArrayBufferView? + + @inlinable public func respond(bytesWritten: UInt64) { + let this = jsObject + _ = this[Strings.respond].function!(this: this, arguments: [bytesWritten.jsValue]) + } + + @inlinable public func respondWithNewView(view: ArrayBufferView) { + let this = jsObject + _ = this[Strings.respondWithNewView].function!(this: this, arguments: [view.jsValue]) + } +} + +public class ReadableStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public func enqueue(chunk: JSValue? = nil) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) + } + + @inlinable public func error(e: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) + } +} + +public class ReadableStreamDefaultReadResult: BridgedDictionary { + public convenience init(value: JSValue, done: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.value] = value.jsValue + object[Strings.done] = done.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _value = ReadWriteAttribute(jsObject: object, name: Strings.value) + _done = ReadWriteAttribute(jsObject: object, name: Strings.done) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var value: JSValue + + @ReadWriteAttribute + public var done: Bool +} + +public class ReadableStreamDefaultReader: JSBridgedClass, ReadableStreamGenericReader { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ReadableStreamDefaultReader].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(stream: ReadableStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public func read() -> JSPromise { + let this = jsObject + return this[Strings.read].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func read() async throws -> ReadableStreamDefaultReadResult { + let this = jsObject + let _promise: JSPromise = this[Strings.read].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func releaseLock() { + let this = jsObject + _ = this[Strings.releaseLock].function!(this: this, arguments: []) + } +} + +public protocol ReadableStreamGenericReader: JSBridgedClass {} +public extension ReadableStreamGenericReader { + @inlinable var closed: JSPromise { ReadonlyAttribute[Strings.closed, in: jsObject] } + + @inlinable func cancel(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func cancel(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.cancel].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class ReadableStreamGetReaderOptions: BridgedDictionary { + public convenience init(mode: ReadableStreamReaderMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mode] = mode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mode: ReadableStreamReaderMode +} + +public class ReadableStreamIteratorOptions: BridgedDictionary { + public convenience init(preventCancel: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.preventCancel] = preventCancel.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventCancel: Bool +} + +public enum ReadableStreamReaderMode: JSString, JSValueCompatible { + case byob = "byob" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ReadableStreamType: JSString, JSValueCompatible { + case bytes = "bytes" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ReadableWritablePair: BridgedDictionary { + public convenience init(readable: ReadableStream, writable: WritableStream) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.readable] = readable.jsValue + object[Strings.writable] = writable.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _readable = ReadWriteAttribute(jsObject: object, name: Strings.readable) + _writable = ReadWriteAttribute(jsObject: object, name: Strings.writable) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var readable: ReadableStream + + @ReadWriteAttribute + public var writable: WritableStream +} + +public enum ReferrerPolicy: JSString, JSValueCompatible { + case _empty = "" + case noReferrer = "no-referrer" + case noReferrerWhenDowngrade = "no-referrer-when-downgrade" + case sameOrigin = "same-origin" + case origin = "origin" + case strictOrigin = "strict-origin" + case originWhenCrossOrigin = "origin-when-cross-origin" + case strictOriginWhenCrossOrigin = "strict-origin-when-cross-origin" + case unsafeUrl = "unsafe-url" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class RegistrationOptions: BridgedDictionary { + public convenience init(scope: String, type: WorkerType, updateViaCache: ServiceWorkerUpdateViaCache) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.scope] = scope.jsValue + object[Strings.type] = type.jsValue + object[Strings.updateViaCache] = updateViaCache.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _scope = ReadWriteAttribute(jsObject: object, name: Strings.scope) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _updateViaCache = ReadWriteAttribute(jsObject: object, name: Strings.updateViaCache) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var scope: String + + @ReadWriteAttribute + public var type: WorkerType + + @ReadWriteAttribute + public var updateViaCache: ServiceWorkerUpdateViaCache +} + +public class Request: JSBridgedClass, Body { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Request].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _method = ReadonlyAttribute(jsObject: jsObject, name: Strings.method) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) + _destination = ReadonlyAttribute(jsObject: jsObject, name: Strings.destination) + _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) + _referrerPolicy = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrerPolicy) + _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) + _credentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.credentials) + _cache = ReadonlyAttribute(jsObject: jsObject, name: Strings.cache) + _redirect = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirect) + _integrity = ReadonlyAttribute(jsObject: jsObject, name: Strings.integrity) + _keepalive = ReadonlyAttribute(jsObject: jsObject, name: Strings.keepalive) + _isReloadNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isReloadNavigation) + _isHistoryNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isHistoryNavigation) + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject + } + + @inlinable public convenience init(input: RequestInfo, init: RequestInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [input.jsValue, `init`?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var method: String + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var headers: Headers + + @ReadonlyAttribute + public var destination: RequestDestination + + @ReadonlyAttribute + public var referrer: String + + @ReadonlyAttribute + public var referrerPolicy: ReferrerPolicy + + @ReadonlyAttribute + public var mode: RequestMode + + @ReadonlyAttribute + public var credentials: RequestCredentials + + @ReadonlyAttribute + public var cache: RequestCache + + @ReadonlyAttribute + public var redirect: RequestRedirect + + @ReadonlyAttribute + public var integrity: String + + @ReadonlyAttribute + public var keepalive: Bool + + @ReadonlyAttribute + public var isReloadNavigation: Bool + + @ReadonlyAttribute + public var isHistoryNavigation: Bool + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } +} + +public enum RequestCache: JSString, JSValueCompatible { + case `default` = "default" + case noStore = "no-store" + case reload = "reload" + case noCache = "no-cache" + case forceCache = "force-cache" + case onlyIfCached = "only-if-cached" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestCredentials: JSString, JSValueCompatible { + case omit = "omit" + case sameOrigin = "same-origin" + case include = "include" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestDestination: JSString, JSValueCompatible { + case _empty = "" + case audio = "audio" + case audioworklet = "audioworklet" + case document = "document" + case embed = "embed" + case font = "font" + case frame = "frame" + case iframe = "iframe" + case image = "image" + case manifest = "manifest" + case object = "object" + case paintworklet = "paintworklet" + case report = "report" + case script = "script" + case sharedworker = "sharedworker" + case style = "style" + case track = "track" + case video = "video" + case worker = "worker" + case xslt = "xslt" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class RequestInit: BridgedDictionary { + public convenience init(method: String, headers: HeadersInit, body: BodyInit?, referrer: String, referrerPolicy: ReferrerPolicy, mode: RequestMode, credentials: RequestCredentials, cache: RequestCache, redirect: RequestRedirect, integrity: String, keepalive: Bool, signal: AbortSignal?, window: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.method] = method.jsValue + object[Strings.headers] = headers.jsValue + object[Strings.body] = body.jsValue + object[Strings.referrer] = referrer.jsValue + object[Strings.referrerPolicy] = referrerPolicy.jsValue + object[Strings.mode] = mode.jsValue + object[Strings.credentials] = credentials.jsValue + object[Strings.cache] = cache.jsValue + object[Strings.redirect] = redirect.jsValue + object[Strings.integrity] = integrity.jsValue + object[Strings.keepalive] = keepalive.jsValue + object[Strings.signal] = signal.jsValue + object[Strings.window] = window.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _method = ReadWriteAttribute(jsObject: object, name: Strings.method) + _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) + _body = ReadWriteAttribute(jsObject: object, name: Strings.body) + _referrer = ReadWriteAttribute(jsObject: object, name: Strings.referrer) + _referrerPolicy = ReadWriteAttribute(jsObject: object, name: Strings.referrerPolicy) + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + _cache = ReadWriteAttribute(jsObject: object, name: Strings.cache) + _redirect = ReadWriteAttribute(jsObject: object, name: Strings.redirect) + _integrity = ReadWriteAttribute(jsObject: object, name: Strings.integrity) + _keepalive = ReadWriteAttribute(jsObject: object, name: Strings.keepalive) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) + _window = ReadWriteAttribute(jsObject: object, name: Strings.window) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var method: String + + @ReadWriteAttribute + public var headers: HeadersInit + + @ReadWriteAttribute + public var body: BodyInit? + + @ReadWriteAttribute + public var referrer: String + + @ReadWriteAttribute + public var referrerPolicy: ReferrerPolicy + + @ReadWriteAttribute + public var mode: RequestMode + + @ReadWriteAttribute + public var credentials: RequestCredentials + + @ReadWriteAttribute + public var cache: RequestCache + + @ReadWriteAttribute + public var redirect: RequestRedirect + + @ReadWriteAttribute + public var integrity: String + + @ReadWriteAttribute + public var keepalive: Bool + + @ReadWriteAttribute + public var signal: AbortSignal? + + @ReadWriteAttribute + public var window: JSValue +} + +public enum RequestMode: JSString, JSValueCompatible { + case navigate = "navigate" + case sameOrigin = "same-origin" + case noCors = "no-cors" + case cors = "cors" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum RequestRedirect: JSString, JSValueCompatible { + case follow = "follow" + case error = "error" + case manual = "manual" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ResizeQuality: JSString, JSValueCompatible { + case pixelated = "pixelated" + case low = "low" + case medium = "medium" + case high = "high" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Response: JSBridgedClass, Body { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Response].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _redirected = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirected) + _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) + _ok = ReadonlyAttribute(jsObject: jsObject, name: Strings.ok) + _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) + _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) + self.jsObject = jsObject + } + + @inlinable public convenience init(body: BodyInit? = nil, init: ResponseInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [body?.jsValue ?? .undefined, `init`?.jsValue ?? .undefined])) + } + + @inlinable public static func error() -> Self { + let this = constructor + return this[Strings.error].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public static func redirect(url: String, status: UInt16? = nil) -> Self { + let this = constructor + return this[Strings.redirect].function!(this: this, arguments: [url.jsValue, status?.jsValue ?? .undefined]).fromJSValue()! + } + + @ReadonlyAttribute + public var type: ResponseType + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var redirected: Bool + + @ReadonlyAttribute + public var status: UInt16 + + @ReadonlyAttribute + public var ok: Bool + + @ReadonlyAttribute + public var statusText: String + + @ReadonlyAttribute + public var headers: Headers + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class ResponseInit: BridgedDictionary { + public convenience init(status: UInt16, statusText: String, headers: HeadersInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.status] = status.jsValue + object[Strings.statusText] = statusText.jsValue + object[Strings.headers] = headers.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _status = ReadWriteAttribute(jsObject: object, name: Strings.status) + _statusText = ReadWriteAttribute(jsObject: object, name: Strings.statusText) + _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var status: UInt16 + + @ReadWriteAttribute + public var statusText: String + + @ReadWriteAttribute + public var headers: HeadersInit +} + +public enum ResponseType: JSString, JSValueCompatible { + case basic = "basic" + case cors = "cors" + case `default` = "default" + case error = "error" + case opaque = "opaque" + case opaqueredirect = "opaqueredirect" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ScrollRestoration: JSString, JSValueCompatible { + case auto = "auto" + case manual = "manual" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum SelectionMode: JSString, JSValueCompatible { + case select = "select" + case start = "start" + case end = "end" + case preserve = "preserve" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ServiceWorker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _scriptURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.scriptURL) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _onstatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstatechange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var scriptURL: String + + @ReadonlyAttribute + public var state: ServiceWorkerState + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @ClosureAttribute1Optional + public var onstatechange: EventHandler +} + +public class ServiceWorkerContainer: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerContainer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _controller = ReadonlyAttribute(jsObject: jsObject, name: Strings.controller) + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _oncontrollerchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncontrollerchange) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var controller: ServiceWorker? + + @ReadonlyAttribute + public var ready: JSPromise + + @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func register(scriptURL: String, options: RegistrationOptions? = nil) async throws -> ServiceWorkerRegistration { + let this = jsObject + let _promise: JSPromise = this[Strings.register].function!(this: this, arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getRegistration(clientURL: String? = nil) -> JSPromise { + let this = jsObject + return this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getRegistration(clientURL: String? = nil) async throws -> ServiceWorkerRegistration? { + let this = jsObject + let _promise: JSPromise = this[Strings.getRegistration].function!(this: this, arguments: [clientURL?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getRegistrations() -> JSPromise { + let this = jsObject + return this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getRegistrations() async throws -> [ServiceWorkerRegistration] { + let this = jsObject + let _promise: JSPromise = this[Strings.getRegistrations].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func startMessages() { + let this = jsObject + _ = this[Strings.startMessages].function!(this: this, arguments: []) + } + + @ClosureAttribute1Optional + public var oncontrollerchange: EventHandler + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class ServiceWorkerRegistration: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ServiceWorkerRegistration].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _installing = ReadonlyAttribute(jsObject: jsObject, name: Strings.installing) + _waiting = ReadonlyAttribute(jsObject: jsObject, name: Strings.waiting) + _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) + _navigationPreload = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigationPreload) + _scope = ReadonlyAttribute(jsObject: jsObject, name: Strings.scope) + _updateViaCache = ReadonlyAttribute(jsObject: jsObject, name: Strings.updateViaCache) + _onupdatefound = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onupdatefound) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var installing: ServiceWorker? + + @ReadonlyAttribute + public var waiting: ServiceWorker? + + @ReadonlyAttribute + public var active: ServiceWorker? + + @ReadonlyAttribute + public var navigationPreload: NavigationPreloadManager + + @ReadonlyAttribute + public var scope: String + + @ReadonlyAttribute + public var updateViaCache: ServiceWorkerUpdateViaCache + + @inlinable public func update() -> JSPromise { + let this = jsObject + return this[Strings.update].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func update() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.update].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func unregister() -> JSPromise { + let this = jsObject + return this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func unregister() async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.unregister].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ClosureAttribute1Optional + public var onupdatefound: EventHandler +} + +public enum ServiceWorkerState: JSString, JSValueCompatible { + case parsed = "parsed" + case installing = "installing" + case installed = "installed" + case activating = "activating" + case activated = "activated" + case redundant = "redundant" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum ServiceWorkerUpdateViaCache: JSString, JSValueCompatible { + case imports = "imports" + case all = "all" + case none = "none" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class ShadowRoot: DocumentFragment, DocumentOrShadowRoot { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ShadowRoot].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) + _delegatesFocus = ReadonlyAttribute(jsObject: jsObject, name: Strings.delegatesFocus) + _slotAssignment = ReadonlyAttribute(jsObject: jsObject, name: Strings.slotAssignment) + _host = ReadonlyAttribute(jsObject: jsObject, name: Strings.host) + _onslotchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onslotchange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var mode: ShadowRootMode + + @ReadonlyAttribute + public var delegatesFocus: Bool + + @ReadonlyAttribute + public var slotAssignment: SlotAssignmentMode + + @ReadonlyAttribute + public var host: Element + + @ClosureAttribute1Optional + public var onslotchange: EventHandler +} + +public class ShadowRootInit: BridgedDictionary { + public convenience init(mode: ShadowRootMode, delegatesFocus: Bool, slotAssignment: SlotAssignmentMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mode] = mode.jsValue + object[Strings.delegatesFocus] = delegatesFocus.jsValue + object[Strings.slotAssignment] = slotAssignment.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) + _delegatesFocus = ReadWriteAttribute(jsObject: object, name: Strings.delegatesFocus) + _slotAssignment = ReadWriteAttribute(jsObject: object, name: Strings.slotAssignment) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mode: ShadowRootMode + + @ReadWriteAttribute + public var delegatesFocus: Bool + + @ReadWriteAttribute + public var slotAssignment: SlotAssignmentMode +} + +public enum ShadowRootMode: JSString, JSValueCompatible { + case open = "open" + case closed = "closed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class SharedWorker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SharedWorker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _port = ReadonlyAttribute(jsObject: jsObject, name: Strings.port) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(scriptURL: String, options: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var port: MessagePort +} + +public enum SlotAssignmentMode: JSString, JSValueCompatible { + case manual = "manual" + case named = "named" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol Slottable: JSBridgedClass {} +public extension Slottable { + @inlinable var assignedSlot: HTMLSlotElement? { ReadonlyAttribute[Strings.assignedSlot, in: jsObject] } +} + +public class StaticRange: AbstractRange { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StaticRange].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(init: StaticRangeInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } +} + +public class StaticRangeInit: BridgedDictionary { + public convenience init(startContainer: Node, startOffset: UInt32, endContainer: Node, endOffset: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.startContainer] = startContainer.jsValue + object[Strings.startOffset] = startOffset.jsValue + object[Strings.endContainer] = endContainer.jsValue + object[Strings.endOffset] = endOffset.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _startContainer = ReadWriteAttribute(jsObject: object, name: Strings.startContainer) + _startOffset = ReadWriteAttribute(jsObject: object, name: Strings.startOffset) + _endContainer = ReadWriteAttribute(jsObject: object, name: Strings.endContainer) + _endOffset = ReadWriteAttribute(jsObject: object, name: Strings.endOffset) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var startContainer: Node + + @ReadWriteAttribute + public var startOffset: UInt32 + + @ReadWriteAttribute + public var endContainer: Node + + @ReadWriteAttribute + public var endOffset: UInt32 +} + +public class Storage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Storage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func key(index: UInt32) -> String? { + let this = jsObject + return this[Strings.key].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public subscript(key: String) -> String? { + jsObject[key].fromJSValue() + } + + // XXX: unsupported setter for keys of type String + + // XXX: unsupported deleter for keys of type String + + @inlinable public func clear() { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: []) + } +} + +public class StorageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.StorageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _key = ReadonlyAttribute(jsObject: jsObject, name: Strings.key) + _oldValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.oldValue) + _newValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.newValue) + _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) + _storageArea = ReadonlyAttribute(jsObject: jsObject, name: Strings.storageArea) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: StorageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var key: String? + + @ReadonlyAttribute + public var oldValue: String? + + @ReadonlyAttribute + public var newValue: String? + + @ReadonlyAttribute + public var url: String + + @ReadonlyAttribute + public var storageArea: Storage? + + @inlinable public func initStorageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, key: String? = nil, oldValue: String? = nil, newValue: String? = nil, url: String? = nil, storageArea: Storage? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = key?.jsValue ?? .undefined + let _arg4 = oldValue?.jsValue ?? .undefined + let _arg5 = newValue?.jsValue ?? .undefined + let _arg6 = url?.jsValue ?? .undefined + let _arg7 = storageArea?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initStorageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class StorageEventInit: BridgedDictionary { + public convenience init(key: String?, oldValue: String?, newValue: String?, url: String, storageArea: Storage?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.key] = key.jsValue + object[Strings.oldValue] = oldValue.jsValue + object[Strings.newValue] = newValue.jsValue + object[Strings.url] = url.jsValue + object[Strings.storageArea] = storageArea.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _key = ReadWriteAttribute(jsObject: object, name: Strings.key) + _oldValue = ReadWriteAttribute(jsObject: object, name: Strings.oldValue) + _newValue = ReadWriteAttribute(jsObject: object, name: Strings.newValue) + _url = ReadWriteAttribute(jsObject: object, name: Strings.url) + _storageArea = ReadWriteAttribute(jsObject: object, name: Strings.storageArea) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var key: String? + + @ReadWriteAttribute + public var oldValue: String? + + @ReadWriteAttribute + public var newValue: String? + + @ReadWriteAttribute + public var url: String + + @ReadWriteAttribute + public var storageArea: Storage? +} + +public class StreamPipeOptions: BridgedDictionary { + public convenience init(preventClose: Bool, preventAbort: Bool, preventCancel: Bool, signal: AbortSignal) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.preventClose] = preventClose.jsValue + object[Strings.preventAbort] = preventAbort.jsValue + object[Strings.preventCancel] = preventCancel.jsValue + object[Strings.signal] = signal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _preventClose = ReadWriteAttribute(jsObject: object, name: Strings.preventClose) + _preventAbort = ReadWriteAttribute(jsObject: object, name: Strings.preventAbort) + _preventCancel = ReadWriteAttribute(jsObject: object, name: Strings.preventCancel) + _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var preventClose: Bool + + @ReadWriteAttribute + public var preventAbort: Bool + + @ReadWriteAttribute + public var preventCancel: Bool + + @ReadWriteAttribute + public var signal: AbortSignal +} + +public class StructuredSerializeOptions: BridgedDictionary { + public convenience init(transfer: [JSObject]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.transfer] = transfer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var transfer: [JSObject] +} + +public class SubmitEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.SubmitEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _submitter = ReadonlyAttribute(jsObject: jsObject, name: Strings.submitter) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: SubmitEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var submitter: HTMLElement? +} + +public class SubmitEventInit: BridgedDictionary { + public convenience init(submitter: HTMLElement?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.submitter] = submitter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _submitter = ReadWriteAttribute(jsObject: object, name: Strings.submitter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var submitter: HTMLElement? +} + +public class Text: CharacterData, Slottable { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _wholeText = ReadonlyAttribute(jsObject: jsObject, name: Strings.wholeText) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } + + @inlinable public func splitText(offset: UInt32) -> Self { + let this = jsObject + return this[Strings.splitText].function!(this: this, arguments: [offset.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var wholeText: String +} + +public class TextMetrics: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextMetrics].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _actualBoundingBoxLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxLeft) + _actualBoundingBoxRight = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxRight) + _fontBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxAscent) + _fontBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.fontBoundingBoxDescent) + _actualBoundingBoxAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxAscent) + _actualBoundingBoxDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.actualBoundingBoxDescent) + _emHeightAscent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightAscent) + _emHeightDescent = ReadonlyAttribute(jsObject: jsObject, name: Strings.emHeightDescent) + _hangingBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.hangingBaseline) + _alphabeticBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.alphabeticBaseline) + _ideographicBaseline = ReadonlyAttribute(jsObject: jsObject, name: Strings.ideographicBaseline) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var width: Double + + @ReadonlyAttribute + public var actualBoundingBoxLeft: Double + + @ReadonlyAttribute + public var actualBoundingBoxRight: Double + + @ReadonlyAttribute + public var fontBoundingBoxAscent: Double + + @ReadonlyAttribute + public var fontBoundingBoxDescent: Double + + @ReadonlyAttribute + public var actualBoundingBoxAscent: Double + + @ReadonlyAttribute + public var actualBoundingBoxDescent: Double + + @ReadonlyAttribute + public var emHeightAscent: Double + + @ReadonlyAttribute + public var emHeightDescent: Double + + @ReadonlyAttribute + public var hangingBaseline: Double + + @ReadonlyAttribute + public var alphabeticBaseline: Double + + @ReadonlyAttribute + public var ideographicBaseline: Double +} + +public class TextTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _inBandMetadataTrackDispatchType = ReadonlyAttribute(jsObject: jsObject, name: Strings.inBandMetadataTrackDispatchType) + _mode = ReadWriteAttribute(jsObject: jsObject, name: Strings.mode) + _cues = ReadonlyAttribute(jsObject: jsObject, name: Strings.cues) + _activeCues = ReadonlyAttribute(jsObject: jsObject, name: Strings.activeCues) + _oncuechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.oncuechange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var kind: TextTrackKind + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var inBandMetadataTrackDispatchType: String + + @ReadWriteAttribute + public var mode: TextTrackMode + + @ReadonlyAttribute + public var cues: TextTrackCueList? + + @ReadonlyAttribute + public var activeCues: TextTrackCueList? + + @inlinable public func addCue(cue: TextTrackCue) { + let this = jsObject + _ = this[Strings.addCue].function!(this: this, arguments: [cue.jsValue]) + } + + @inlinable public func removeCue(cue: TextTrackCue) { + let this = jsObject + _ = this[Strings.removeCue].function!(this: this, arguments: [cue.jsValue]) + } + + @ClosureAttribute1Optional + public var oncuechange: EventHandler +} + +public class TextTrackCue: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCue].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + _id = ReadWriteAttribute(jsObject: jsObject, name: Strings.id) + _startTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.startTime) + _endTime = ReadWriteAttribute(jsObject: jsObject, name: Strings.endTime) + _pauseOnExit = ReadWriteAttribute(jsObject: jsObject, name: Strings.pauseOnExit) + _onenter = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onenter) + _onexit = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onexit) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var track: TextTrack? + + @ReadWriteAttribute + public var id: String + + @ReadWriteAttribute + public var startTime: Double + + @ReadWriteAttribute + public var endTime: Double + + @ReadWriteAttribute + public var pauseOnExit: Bool + + @ClosureAttribute1Optional + public var onenter: EventHandler + + @ClosureAttribute1Optional + public var onexit: EventHandler +} + +public class TextTrackCueList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TextTrackCueList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> TextTrackCue { + jsObject[key].fromJSValue()! + } + + @inlinable public func getCueById(id: String) -> TextTrackCue? { + let this = jsObject + return this[Strings.getCueById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } +} + +public enum TextTrackKind: JSString, JSValueCompatible { + case subtitles = "subtitles" + case captions = "captions" + case descriptions = "descriptions" + case chapters = "chapters" + case metadata = "metadata" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TextTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TextTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> TextTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> TextTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public enum TextTrackMode: JSString, JSValueCompatible { + case disabled = "disabled" + case hidden = "hidden" + case showing = "showing" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TimeRanges: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TimeRanges].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func start(index: UInt32) -> Double { + let this = jsObject + return this[Strings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public func end(index: UInt32) -> Double { + let this = jsObject + return this[Strings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public enum TimelinePhase: JSString, JSValueCompatible { + case inactive = "inactive" + case before = "before" + case active = "active" + case after = "after" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TrackEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var track: JSValue? +} + +public class TrackEventInit: BridgedDictionary { + public convenience init(track: JSValue?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.track] = track.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _track = ReadWriteAttribute(jsObject: object, name: Strings.track) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var track: JSValue? +} + +public class TransformStream: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _readable = ReadonlyAttribute(jsObject: jsObject, name: Strings.readable) + _writable = ReadonlyAttribute(jsObject: jsObject, name: Strings.writable) + self.jsObject = jsObject + } + + @inlinable public convenience init(transformer: JSObject? = nil, writableStrategy: QueuingStrategy? = nil, readableStrategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [transformer?.jsValue ?? .undefined, writableStrategy?.jsValue ?? .undefined, readableStrategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var readable: ReadableStream + + @ReadonlyAttribute + public var writable: WritableStream +} + +public class TransformStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func enqueue(chunk: JSValue? = nil) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) + } + + @inlinable public func error(reason: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + } + + @inlinable public func terminate() { + let this = jsObject + _ = this[Strings.terminate].function!(this: this, arguments: []) + } +} + +public class Transformer: BridgedDictionary { + public convenience init(start: @escaping TransformerStartCallback, transform: @escaping TransformerTransformCallback, flush: @escaping TransformerFlushCallback, readableType: JSValue, writableType: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute2[Strings.transform, in: object] = transform + ClosureAttribute1[Strings.flush, in: object] = flush + object[Strings.readableType] = readableType.jsValue + object[Strings.writableType] = writableType.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _transform = ClosureAttribute2(jsObject: object, name: Strings.transform) + _flush = ClosureAttribute1(jsObject: object, name: Strings.flush) + _readableType = ReadWriteAttribute(jsObject: object, name: Strings.readableType) + _writableType = ReadWriteAttribute(jsObject: object, name: Strings.writableType) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: TransformerStartCallback + + @ClosureAttribute2 + public var transform: TransformerTransformCallback + + @ClosureAttribute1 + public var flush: TransformerFlushCallback + + @ReadWriteAttribute + public var readableType: JSValue + + @ReadWriteAttribute + public var writableType: JSValue +} + +public class TreeWalker: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TreeWalker].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) + _currentNode = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentNode) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var root: Node + + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @ReadWriteAttribute + public var currentNode: Node + + @inlinable public func parentNode() -> Node? { + let this = jsObject + return this[Strings.parentNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func firstChild() -> Node? { + let this = jsObject + return this[Strings.firstChild].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func lastChild() -> Node? { + let this = jsObject + return this[Strings.lastChild].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousSibling() -> Node? { + let this = jsObject + return this[Strings.previousSibling].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextSibling() -> Node? { + let this = jsObject + return this[Strings.nextSibling].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } +} + +public typealias HeadersInit = JSValue +public typealias XMLHttpRequestBodyInit = JSValue +public typealias BodyInit = JSValue +public typealias RequestInfo = JSValue +public typealias DOMHighResTimeStamp = Double +public typealias EpochTimeStamp = UInt64 +public typealias FormDataEntryValue = JSValue +public typealias ReadableStreamReader = JSValue +public typealias ReadableStreamController = JSValue +public typealias HTMLOrSVGScriptElement = JSValue +public typealias MediaProvider = JSValue +public typealias RenderingContext = JSValue +public typealias HTMLOrSVGImageElement = JSValue +public typealias CanvasImageSource = JSValue +public typealias CanvasFilterInput = [String: JSValue] +public typealias OffscreenRenderingContext = JSValue +public typealias EventHandler = EventHandlerNonNull? +public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? +public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? +public typealias TimerHandler = JSValue +public typealias ImageBitmapSource = JSValue +public typealias MessageEventSource = JSValue +public typealias BufferSource = JSValue +public typealias DOMTimeStamp = UInt64 +public typealias BlobPart = JSValue +public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue +public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise +public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise +public typealias UnderlyingSinkStartCallback = (WritableStreamDefaultController) -> JSValue +public typealias UnderlyingSinkWriteCallback = (JSValue, WritableStreamDefaultController) -> JSPromise +public typealias UnderlyingSinkCloseCallback = () -> JSPromise +public typealias UnderlyingSinkAbortCallback = (JSValue) -> JSPromise +public typealias TransformerStartCallback = (TransformStreamDefaultController) -> JSValue +public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise +public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise +public typealias QueuingStrategySize = (JSValue) -> Double +public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void +public typealias BlobCallback = (Blob?) -> Void +public typealias FunctionStringCallback = (String) -> Void +public typealias EventHandlerNonNull = (Event) -> JSValue +public typealias OnErrorEventHandlerNonNull = (JSValue, String, UInt32, UInt32, JSValue) -> JSValue +public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? +public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void +public typealias VoidFunction = () -> Void +public class UIEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) + _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) + _which = ReadonlyAttribute(jsObject: jsObject, name: Strings.which) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: UIEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var view: Window? + + @ReadonlyAttribute + public var detail: Int32 + + @inlinable public func initUIEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil) { + let this = jsObject + _ = this[Strings.initUIEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, detailArg?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var which: UInt32 +} + +public class UIEventInit: BridgedDictionary { + public convenience init(view: Window?, detail: Int32, which: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.view] = view.jsValue + object[Strings.detail] = detail.jsValue + object[Strings.which] = which.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _view = ReadWriteAttribute(jsObject: object, name: Strings.view) + _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) + _which = ReadWriteAttribute(jsObject: object, name: Strings.which) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var view: Window? + + @ReadWriteAttribute + public var detail: Int32 + + @ReadWriteAttribute + public var which: UInt32 +} + +public class URL: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) + _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) + self.jsObject = jsObject + } + + @inlinable public convenience init(url: String, base: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) + } + + @ReadWriteAttribute + public var href: String + + @ReadonlyAttribute + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var username: String + + @ReadWriteAttribute + public var password: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String + + @ReadonlyAttribute + public var searchParams: URLSearchParams + + @ReadWriteAttribute + public var hash: String + + @inlinable public func toJSON() -> String { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public static func createObjectURL(obj: JSValue) -> String { + let this = constructor + return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! + } + + @inlinable public static func revokeObjectURL(url: String) { + let this = constructor + _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) + } +} + +public class URLSearchParams: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: JSValue? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAll(name: String) -> [String] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func has(name: String) -> Bool { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func set(name: String, value: String) { + let this = jsObject + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func sort() { + let this = jsObject + _ = this[Strings.sort].function!(this: this, arguments: []) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! + } +} + +public class UnderlyingSink: BridgedDictionary { + public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute2[Strings.write, in: object] = write + ClosureAttribute0[Strings.close, in: object] = close + ClosureAttribute1[Strings.abort, in: object] = abort + object[Strings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _write = ClosureAttribute2(jsObject: object, name: Strings.write) + _close = ClosureAttribute0(jsObject: object, name: Strings.close) + _abort = ClosureAttribute1(jsObject: object, name: Strings.abort) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: UnderlyingSinkStartCallback + + @ClosureAttribute2 + public var write: UnderlyingSinkWriteCallback + + @ClosureAttribute0 + public var close: UnderlyingSinkCloseCallback + + @ClosureAttribute1 + public var abort: UnderlyingSinkAbortCallback + + @ReadWriteAttribute + public var type: JSValue +} + +public class UnderlyingSource: BridgedDictionary { + public convenience init(start: @escaping UnderlyingSourceStartCallback, pull: @escaping UnderlyingSourcePullCallback, cancel: @escaping UnderlyingSourceCancelCallback, type: ReadableStreamType, autoAllocateChunkSize: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute1[Strings.pull, in: object] = pull + ClosureAttribute1[Strings.cancel, in: object] = cancel + object[Strings.type] = type.jsValue + object[Strings.autoAllocateChunkSize] = autoAllocateChunkSize.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _pull = ClosureAttribute1(jsObject: object, name: Strings.pull) + _cancel = ClosureAttribute1(jsObject: object, name: Strings.cancel) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _autoAllocateChunkSize = ReadWriteAttribute(jsObject: object, name: Strings.autoAllocateChunkSize) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: UnderlyingSourceStartCallback + + @ClosureAttribute1 + public var pull: UnderlyingSourcePullCallback + + @ClosureAttribute1 + public var cancel: UnderlyingSourceCancelCallback + + @ReadWriteAttribute + public var type: ReadableStreamType + + @ReadWriteAttribute + public var autoAllocateChunkSize: UInt64 +} + +public class ValidityState: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ValidityState].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: Strings.valueMissing) + _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.typeMismatch) + _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.patternMismatch) + _tooLong = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooLong) + _tooShort = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooShort) + _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeUnderflow) + _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeOverflow) + _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.stepMismatch) + _badInput = ReadonlyAttribute(jsObject: jsObject, name: Strings.badInput) + _customError = ReadonlyAttribute(jsObject: jsObject, name: Strings.customError) + _valid = ReadonlyAttribute(jsObject: jsObject, name: Strings.valid) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var valueMissing: Bool + + @ReadonlyAttribute + public var typeMismatch: Bool + + @ReadonlyAttribute + public var patternMismatch: Bool + + @ReadonlyAttribute + public var tooLong: Bool + + @ReadonlyAttribute + public var tooShort: Bool + + @ReadonlyAttribute + public var rangeUnderflow: Bool + + @ReadonlyAttribute + public var rangeOverflow: Bool + + @ReadonlyAttribute + public var stepMismatch: Bool + + @ReadonlyAttribute + public var badInput: Bool + + @ReadonlyAttribute + public var customError: Bool + + @ReadonlyAttribute + public var valid: Bool +} + +public class ValidityStateFlags: BridgedDictionary { + public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.valueMissing] = valueMissing.jsValue + object[Strings.typeMismatch] = typeMismatch.jsValue + object[Strings.patternMismatch] = patternMismatch.jsValue + object[Strings.tooLong] = tooLong.jsValue + object[Strings.tooShort] = tooShort.jsValue + object[Strings.rangeUnderflow] = rangeUnderflow.jsValue + object[Strings.rangeOverflow] = rangeOverflow.jsValue + object[Strings.stepMismatch] = stepMismatch.jsValue + object[Strings.badInput] = badInput.jsValue + object[Strings.customError] = customError.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _valueMissing = ReadWriteAttribute(jsObject: object, name: Strings.valueMissing) + _typeMismatch = ReadWriteAttribute(jsObject: object, name: Strings.typeMismatch) + _patternMismatch = ReadWriteAttribute(jsObject: object, name: Strings.patternMismatch) + _tooLong = ReadWriteAttribute(jsObject: object, name: Strings.tooLong) + _tooShort = ReadWriteAttribute(jsObject: object, name: Strings.tooShort) + _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeUnderflow) + _rangeOverflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeOverflow) + _stepMismatch = ReadWriteAttribute(jsObject: object, name: Strings.stepMismatch) + _badInput = ReadWriteAttribute(jsObject: object, name: Strings.badInput) + _customError = ReadWriteAttribute(jsObject: object, name: Strings.customError) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var valueMissing: Bool + + @ReadWriteAttribute + public var typeMismatch: Bool + + @ReadWriteAttribute + public var patternMismatch: Bool + + @ReadWriteAttribute + public var tooLong: Bool + + @ReadWriteAttribute + public var tooShort: Bool + + @ReadWriteAttribute + public var rangeUnderflow: Bool + + @ReadWriteAttribute + public var rangeOverflow: Bool + + @ReadWriteAttribute + public var stepMismatch: Bool + + @ReadWriteAttribute + public var badInput: Bool + + @ReadWriteAttribute + public var customError: Bool +} + +public class VideoTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var selected: Bool +} + +public class VideoTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> VideoTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> VideoTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +public class WheelEvent: MouseEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _deltaX = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaX) + _deltaY = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaY) + _deltaZ = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaZ) + _deltaMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.deltaMode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: WheelEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + public static let DOM_DELTA_PIXEL: UInt32 = 0x00 + + public static let DOM_DELTA_LINE: UInt32 = 0x01 + + public static let DOM_DELTA_PAGE: UInt32 = 0x02 + + @ReadonlyAttribute + public var deltaX: Double + + @ReadonlyAttribute + public var deltaY: Double + + @ReadonlyAttribute + public var deltaZ: Double + + @ReadonlyAttribute + public var deltaMode: UInt32 +} + +public class WheelEventInit: BridgedDictionary { + public convenience init(deltaX: Double, deltaY: Double, deltaZ: Double, deltaMode: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.deltaX] = deltaX.jsValue + object[Strings.deltaY] = deltaY.jsValue + object[Strings.deltaZ] = deltaZ.jsValue + object[Strings.deltaMode] = deltaMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _deltaX = ReadWriteAttribute(jsObject: object, name: Strings.deltaX) + _deltaY = ReadWriteAttribute(jsObject: object, name: Strings.deltaY) + _deltaZ = ReadWriteAttribute(jsObject: object, name: Strings.deltaZ) + _deltaMode = ReadWriteAttribute(jsObject: object, name: Strings.deltaMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var deltaX: Double + + @ReadWriteAttribute + public var deltaY: Double + + @ReadWriteAttribute + public var deltaZ: Double + + @ReadWriteAttribute + public var deltaMode: UInt32 +} + +public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Window].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _event = ReadonlyAttribute(jsObject: jsObject, name: Strings.event) + _window = ReadonlyAttribute(jsObject: jsObject, name: Strings.window) + _self = ReadonlyAttribute(jsObject: jsObject, name: Strings._self) + _document = ReadonlyAttribute(jsObject: jsObject, name: Strings.document) + _name = ReadWriteAttribute(jsObject: jsObject, name: Strings.name) + _location = ReadonlyAttribute(jsObject: jsObject, name: Strings.location) + _history = ReadonlyAttribute(jsObject: jsObject, name: Strings.history) + _customElements = ReadonlyAttribute(jsObject: jsObject, name: Strings.customElements) + _locationbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.locationbar) + _menubar = ReadonlyAttribute(jsObject: jsObject, name: Strings.menubar) + _personalbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.personalbar) + _scrollbars = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollbars) + _statusbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusbar) + _toolbar = ReadonlyAttribute(jsObject: jsObject, name: Strings.toolbar) + _status = ReadWriteAttribute(jsObject: jsObject, name: Strings.status) + _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) + _frames = ReadonlyAttribute(jsObject: jsObject, name: Strings.frames) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _top = ReadonlyAttribute(jsObject: jsObject, name: Strings.top) + _opener = ReadWriteAttribute(jsObject: jsObject, name: Strings.opener) + _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) + _frameElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameElement) + _navigator = ReadonlyAttribute(jsObject: jsObject, name: Strings.navigator) + _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) + _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) + _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var event: Event? + + @ReadonlyAttribute + public var window: WindowProxy + + @ReadonlyAttribute + public var `self`: WindowProxy + + @ReadonlyAttribute + public var document: Document + + @ReadWriteAttribute + public var name: String + + @ReadonlyAttribute + public var location: Location + + @ReadonlyAttribute + public var history: History + + @ReadonlyAttribute + public var customElements: CustomElementRegistry + + @ReadonlyAttribute + public var locationbar: BarProp + + @ReadonlyAttribute + public var menubar: BarProp + + @ReadonlyAttribute + public var personalbar: BarProp + + @ReadonlyAttribute + public var scrollbars: BarProp + + @ReadonlyAttribute + public var statusbar: BarProp + + @ReadonlyAttribute + public var toolbar: BarProp + + @ReadWriteAttribute + public var status: String + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var closed: Bool + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func focus() { + let this = jsObject + _ = this[Strings.focus].function!(this: this, arguments: []) + } + + @inlinable public func blur() { + let this = jsObject + _ = this[Strings.blur].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var frames: WindowProxy + + @ReadonlyAttribute + public var length: UInt32 + + @ReadonlyAttribute + public var top: WindowProxy? + + @ReadWriteAttribute + public var opener: JSValue + + @ReadonlyAttribute + public var parent: WindowProxy? + + @ReadonlyAttribute + public var frameElement: Element? + + @inlinable public func open(url: String? = nil, target: String? = nil, features: String? = nil) -> WindowProxy? { + let this = jsObject + return this[Strings.open].function!(this: this, arguments: [url?.jsValue ?? .undefined, target?.jsValue ?? .undefined, features?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public subscript(key: String) -> JSObject { + jsObject[key].fromJSValue()! + } + + @ReadonlyAttribute + public var navigator: Navigator + + @ReadonlyAttribute + public var clientInformation: Navigator + + @ReadonlyAttribute + public var originAgentCluster: Bool + + @inlinable public func alert() { + let this = jsObject + _ = this[Strings.alert].function!(this: this, arguments: []) + } + + @inlinable public func alert(message: String) { + let this = jsObject + _ = this[Strings.alert].function!(this: this, arguments: [message.jsValue]) + } + + @inlinable public func confirm(message: String? = nil) -> Bool { + let this = jsObject + return this[Strings.confirm].function!(this: this, arguments: [message?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func prompt(message: String? = nil, default: String? = nil) -> String? { + let this = jsObject + return this[Strings.prompt].function!(this: this, arguments: [message?.jsValue ?? .undefined, `default`?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func print() { + let this = jsObject + _ = this[Strings.print].function!(this: this, arguments: []) + } + + @inlinable public func postMessage(message: JSValue, targetOrigin: String, transfer: [JSObject]? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, targetOrigin.jsValue, transfer?.jsValue ?? .undefined]) + } + + @inlinable public func postMessage(message: JSValue, options: WindowPostMessageOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func captureEvents() { + let this = jsObject + _ = this[Strings.captureEvents].function!(this: this, arguments: []) + } + + @inlinable public func releaseEvents() { + let this = jsObject + _ = this[Strings.releaseEvents].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var external: External +} + +public protocol WindowEventHandlers: JSBridgedClass {} +public extension WindowEventHandlers { + @inlinable var onafterprint: EventHandler { + get { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onafterprint, in: jsObject] = newValue } + } + + @inlinable var onbeforeprint: EventHandler { + get { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onbeforeprint, in: jsObject] = newValue } + } + + @inlinable var onbeforeunload: OnBeforeUnloadEventHandler { + get { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onbeforeunload, in: jsObject] = newValue } + } + + @inlinable var onhashchange: EventHandler { + get { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onhashchange, in: jsObject] = newValue } + } + + @inlinable var onlanguagechange: EventHandler { + get { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onlanguagechange, in: jsObject] = newValue } + } + + @inlinable var onmessage: EventHandler { + get { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmessage, in: jsObject] = newValue } + } + + @inlinable var onmessageerror: EventHandler { + get { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onmessageerror, in: jsObject] = newValue } + } + + @inlinable var onoffline: EventHandler { + get { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onoffline, in: jsObject] = newValue } + } + + @inlinable var ononline: EventHandler { + get { ClosureAttribute1Optional[Strings.ononline, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.ononline, in: jsObject] = newValue } + } + + @inlinable var onpagehide: EventHandler { + get { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpagehide, in: jsObject] = newValue } + } + + @inlinable var onpageshow: EventHandler { + get { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpageshow, in: jsObject] = newValue } + } + + @inlinable var onpopstate: EventHandler { + get { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onpopstate, in: jsObject] = newValue } + } + + @inlinable var onrejectionhandled: EventHandler { + get { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onrejectionhandled, in: jsObject] = newValue } + } + + @inlinable var onstorage: EventHandler { + get { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onstorage, in: jsObject] = newValue } + } + + @inlinable var onunhandledrejection: EventHandler { + get { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onunhandledrejection, in: jsObject] = newValue } + } + + @inlinable var onunload: EventHandler { + get { ClosureAttribute1Optional[Strings.onunload, in: jsObject] } + nonmutating set { ClosureAttribute1Optional[Strings.onunload, in: jsObject] = newValue } + } +} + +public protocol WindowLocalStorage: JSBridgedClass {} +public extension WindowLocalStorage { + @inlinable var localStorage: Storage { ReadonlyAttribute[Strings.localStorage, in: jsObject] } +} + +public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} +public extension WindowOrWorkerGlobalScope { + @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) -> JSPromise { + let this = jsObject + return this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) async throws -> Response { + let this = jsObject + let _promise: JSPromise = this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable var performance: Performance { ReadonlyAttribute[Strings.performance, in: jsObject] } + + @inlinable var caches: CacheStorage { ReadonlyAttribute[Strings.caches, in: jsObject] } + + @inlinable var origin: String { ReadonlyAttribute[Strings.origin, in: jsObject] } + + @inlinable var isSecureContext: Bool { ReadonlyAttribute[Strings.isSecureContext, in: jsObject] } + + @inlinable var crossOriginIsolated: Bool { ReadonlyAttribute[Strings.crossOriginIsolated, in: jsObject] } + + @inlinable func reportError(e: JSValue) { + let this = jsObject + _ = this[Strings.reportError].function!(this: this, arguments: [e.jsValue]) + } + + @inlinable func btoa(data: String) -> String { + let this = jsObject + return this[Strings.btoa].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable func atob(data: String) -> String { + let this = jsObject + return this[Strings.atob].function!(this: this, arguments: [data.jsValue]).fromJSValue()! + } + + @inlinable func setTimeout(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { + let this = jsObject + return this[Strings.setTimeout].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! + } + + @inlinable func clearTimeout(id: Int32? = nil) { + let this = jsObject + _ = this[Strings.clearTimeout].function!(this: this, arguments: [id?.jsValue ?? .undefined]) + } + + @inlinable func setInterval(handler: TimerHandler, timeout: Int32? = nil, arguments: JSValue...) -> Int32 { + let this = jsObject + return this[Strings.setInterval].function!(this: this, arguments: [handler.jsValue, timeout?.jsValue ?? .undefined] + arguments.map(\.jsValue)).fromJSValue()! + } + + @inlinable func clearInterval(id: Int32? = nil) { + let this = jsObject + _ = this[Strings.clearInterval].function!(this: this, arguments: [id?.jsValue ?? .undefined]) + } + + // XXX: method 'queueMicrotask' is ignored + + @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { + let this = jsObject + let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [image.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) -> JSPromise { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = options?.jsValue ?? .undefined + let this = jsObject + return this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func createImageBitmap(image: ImageBitmapSource, sx: Int32, sy: Int32, sw: Int32, sh: Int32, options: ImageBitmapOptions? = nil) async throws -> ImageBitmap { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = options?.jsValue ?? .undefined + let this = jsObject + let _promise: JSPromise = this[Strings.createImageBitmap].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable func structuredClone(value: JSValue, options: StructuredSerializeOptions? = nil) -> JSValue { + let this = jsObject + return this[Strings.structuredClone].function!(this: this, arguments: [value.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class WindowPostMessageOptions: BridgedDictionary { + public convenience init(targetOrigin: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.targetOrigin] = targetOrigin.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _targetOrigin = ReadWriteAttribute(jsObject: object, name: Strings.targetOrigin) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var targetOrigin: String +} + +public protocol WindowSessionStorage: JSBridgedClass {} +public extension WindowSessionStorage { + @inlinable var sessionStorage: Storage { ReadonlyAttribute[Strings.sessionStorage, in: jsObject] } +} + +public class Worker: EventTarget, AbstractWorker { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Worker].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(scriptURL: String, options: WorkerOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [scriptURL.jsValue, options?.jsValue ?? .undefined])) + } + + @inlinable public func terminate() { + let this = jsObject + _ = this[Strings.terminate].function!(this: this, arguments: []) + } + + @inlinable public func postMessage(message: JSValue, transfer: [JSObject]) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, transfer.jsValue]) + } + + @inlinable public func postMessage(message: JSValue, options: StructuredSerializeOptions? = nil) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue, options?.jsValue ?? .undefined]) + } + + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler +} + +public class WorkerOptions: BridgedDictionary { + public convenience init(type: WorkerType, credentials: RequestCredentials, name: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.credentials] = credentials.jsValue + object[Strings.name] = name.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + _name = ReadWriteAttribute(jsObject: object, name: Strings.name) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: WorkerType + + @ReadWriteAttribute + public var credentials: RequestCredentials + + @ReadWriteAttribute + public var name: String +} + +public enum WorkerType: JSString, JSValueCompatible { + case classic = "classic" + case module = "module" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Worklet: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Worklet].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addModule(moduleURL: String, options: WorkletOptions? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.addModule].function!(this: this, arguments: [moduleURL.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class WorkletOptions: BridgedDictionary { + public convenience init(credentials: RequestCredentials) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.credentials] = credentials.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var credentials: RequestCredentials +} + +public class WritableStream: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _locked = ReadonlyAttribute(jsObject: jsObject, name: Strings.locked) + self.jsObject = jsObject + } + + @inlinable public convenience init(underlyingSink: JSObject? = nil, strategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [underlyingSink?.jsValue ?? .undefined, strategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var locked: Bool + + @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func abort(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func close() -> JSPromise { + let this = jsObject + return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func close() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getWriter() -> WritableStreamDefaultWriter { + let this = jsObject + return this[Strings.getWriter].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class WritableStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var signal: AbortSignal + + @inlinable public func error(e: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [e?.jsValue ?? .undefined]) + } +} + +public class WritableStreamDefaultWriter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WritableStreamDefaultWriter].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _closed = ReadonlyAttribute(jsObject: jsObject, name: Strings.closed) + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + self.jsObject = jsObject + } + + @inlinable public convenience init(stream: WritableStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @ReadonlyAttribute + public var closed: JSPromise + + @ReadonlyAttribute + public var desiredSize: Double? + + @ReadonlyAttribute + public var ready: JSPromise + + @inlinable public func abort(reason: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func abort(reason: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.abort].function!(this: this, arguments: [reason?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func close() -> JSPromise { + let this = jsObject + return this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func close() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.close].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func releaseLock() { + let this = jsObject + _ = this[Strings.releaseLock].function!(this: this, arguments: []) + } + + @inlinable public func write(chunk: JSValue? = nil) -> JSPromise { + let this = jsObject + return this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func write(chunk: JSValue? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.write].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} + +public class XMLDocument: Document { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLDocument].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class XMLHttpRequest: XMLHttpRequestEventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequest].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onreadystatechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onreadystatechange) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _timeout = ReadWriteAttribute(jsObject: jsObject, name: Strings.timeout) + _withCredentials = ReadWriteAttribute(jsObject: jsObject, name: Strings.withCredentials) + _upload = ReadonlyAttribute(jsObject: jsObject, name: Strings.upload) + _responseURL = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseURL) + _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) + _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) + _responseType = ReadWriteAttribute(jsObject: jsObject, name: Strings.responseType) + _response = ReadonlyAttribute(jsObject: jsObject, name: Strings.response) + _responseText = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseText) + _responseXML = ReadonlyAttribute(jsObject: jsObject, name: Strings.responseXML) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ClosureAttribute1Optional + public var onreadystatechange: EventHandler + + public static let UNSENT: UInt16 = 0 + + public static let OPENED: UInt16 = 1 + + public static let HEADERS_RECEIVED: UInt16 = 2 + + public static let LOADING: UInt16 = 3 + + public static let DONE: UInt16 = 4 + + @ReadonlyAttribute + public var readyState: UInt16 + + @inlinable public func open(method: String, url: String) { + let this = jsObject + _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue]) + } + + @inlinable public func open(method: String, url: String, async: Bool, username: String? = nil, password: String? = nil) { + let this = jsObject + _ = this[Strings.open].function!(this: this, arguments: [method.jsValue, url.jsValue, async.jsValue, username?.jsValue ?? .undefined, password?.jsValue ?? .undefined]) + } + + @inlinable public func setRequestHeader(name: String, value: String) { + let this = jsObject + _ = this[Strings.setRequestHeader].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @ReadWriteAttribute + public var timeout: UInt32 + + @ReadWriteAttribute + public var withCredentials: Bool + + @ReadonlyAttribute + public var upload: XMLHttpRequestUpload + + @inlinable public func send(body: JSValue? = nil) { + let this = jsObject + _ = this[Strings.send].function!(this: this, arguments: [body?.jsValue ?? .undefined]) + } + + @inlinable public func abort() { + let this = jsObject + _ = this[Strings.abort].function!(this: this, arguments: []) + } + + @ReadonlyAttribute + public var responseURL: String + + @ReadonlyAttribute + public var status: UInt16 + + @ReadonlyAttribute + public var statusText: String + + @inlinable public func getResponseHeader(name: String) -> String? { + let this = jsObject + return this[Strings.getResponseHeader].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func getAllResponseHeaders() -> String { + let this = jsObject + return this[Strings.getAllResponseHeaders].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func overrideMimeType(mime: String) { + let this = jsObject + _ = this[Strings.overrideMimeType].function!(this: this, arguments: [mime.jsValue]) + } + + @ReadWriteAttribute + public var responseType: XMLHttpRequestResponseType + + @ReadonlyAttribute + public var response: JSValue + + @ReadonlyAttribute + public var responseText: String + + @ReadonlyAttribute + public var responseXML: Document? +} + +public class XMLHttpRequestEventTarget: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestEventTarget].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _onloadstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadstart) + _onprogress = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onprogress) + _onabort = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onabort) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _onload = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onload) + _ontimeout = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ontimeout) + _onloadend = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onloadend) + super.init(unsafelyWrapping: jsObject) + } + + @ClosureAttribute1Optional + public var onloadstart: EventHandler + + @ClosureAttribute1Optional + public var onprogress: EventHandler + + @ClosureAttribute1Optional + public var onabort: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ClosureAttribute1Optional + public var onload: EventHandler + + @ClosureAttribute1Optional + public var ontimeout: EventHandler + + @ClosureAttribute1Optional + public var onloadend: EventHandler +} + +public enum XMLHttpRequestResponseType: JSString, JSValueCompatible { + case _empty = "" + case arraybuffer = "arraybuffer" + case blob = "blob" + case document = "document" + case json = "json" + case text = "text" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class XMLHttpRequestUpload: XMLHttpRequestEventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.XMLHttpRequestUpload].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class XPathEvaluator: JSBridgedClass, XPathEvaluatorBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathEvaluator].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol XPathEvaluatorBase: JSBridgedClass {} +public extension XPathEvaluatorBase { + // XXX: method 'createExpression' is ignored + + // XXX: method 'createNSResolver' is ignored + + // XXX: method 'evaluate' is ignored +} + +public class XPathExpression: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathExpression].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func evaluate(contextNode: Node, type: UInt16? = nil, result: XPathResult? = nil) -> XPathResult { + let this = jsObject + return this[Strings.evaluate].function!(this: this, arguments: [contextNode.jsValue, type?.jsValue ?? .undefined, result?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class XPathResult: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XPathResult].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _resultType = ReadonlyAttribute(jsObject: jsObject, name: Strings.resultType) + _numberValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberValue) + _stringValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.stringValue) + _booleanValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.booleanValue) + _singleNodeValue = ReadonlyAttribute(jsObject: jsObject, name: Strings.singleNodeValue) + _invalidIteratorState = ReadonlyAttribute(jsObject: jsObject, name: Strings.invalidIteratorState) + _snapshotLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.snapshotLength) + self.jsObject = jsObject + } + + public static let ANY_TYPE: UInt16 = 0 + + public static let NUMBER_TYPE: UInt16 = 1 + + public static let STRING_TYPE: UInt16 = 2 + + public static let BOOLEAN_TYPE: UInt16 = 3 + + public static let UNORDERED_NODE_ITERATOR_TYPE: UInt16 = 4 + + public static let ORDERED_NODE_ITERATOR_TYPE: UInt16 = 5 + + public static let UNORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 6 + + public static let ORDERED_NODE_SNAPSHOT_TYPE: UInt16 = 7 + + public static let ANY_UNORDERED_NODE_TYPE: UInt16 = 8 + + public static let FIRST_ORDERED_NODE_TYPE: UInt16 = 9 + + @ReadonlyAttribute + public var resultType: UInt16 + + @ReadonlyAttribute + public var numberValue: Double + + @ReadonlyAttribute + public var stringValue: String + + @ReadonlyAttribute + public var booleanValue: Bool + + @ReadonlyAttribute + public var singleNodeValue: Node? + + @ReadonlyAttribute + public var invalidIteratorState: Bool + + @ReadonlyAttribute + public var snapshotLength: UInt32 + + @inlinable public func iterateNext() -> Node? { + let this = jsObject + return this[Strings.iterateNext].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func snapshotItem(index: UInt32) -> Node? { + let this = jsObject + return this[Strings.snapshotItem].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public class XSLTProcessor: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.XSLTProcessor].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public func importStylesheet(style: Node) { + let this = jsObject + _ = this[Strings.importStylesheet].function!(this: this, arguments: [style.jsValue]) + } + + @inlinable public func transformToFragment(source: Node, output: Document) -> DocumentFragment { + let this = jsObject + return this[Strings.transformToFragment].function!(this: this, arguments: [source.jsValue, output.jsValue]).fromJSValue()! + } + + @inlinable public func transformToDocument(source: Node) -> Document { + let this = jsObject + return this[Strings.transformToDocument].function!(this: this, arguments: [source.jsValue]).fromJSValue()! + } + + @inlinable public func setParameter(namespaceURI: String, localName: String, value: JSValue) { + let this = jsObject + _ = this[Strings.setParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue, value.jsValue]) + } + + @inlinable public func getParameter(namespaceURI: String, localName: String) -> JSValue { + let this = jsObject + return this[Strings.getParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]).fromJSValue()! + } + + @inlinable public func removeParameter(namespaceURI: String, localName: String) { + let this = jsObject + _ = this[Strings.removeParameter].function!(this: this, arguments: [namespaceURI.jsValue, localName.jsValue]) + } + + @inlinable public func clearParameters() { + let this = jsObject + _ = this[Strings.clearParameters].function!(this: this, arguments: []) + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } +} + +public enum console { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.console].object! + } + + @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func clear() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public static func debug(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func error(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func info(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func log(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) + } + + @inlinable public static func trace(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func warn(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) + } + + @inlinable public static func dirxml(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func count(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func countReset(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func group(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupCollapsed(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupEnd() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupEnd].function!(this: this, arguments: []) + } + + @inlinable public static func time(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func timeEnd(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } +} + +/* variadic generics please */ +@propertyWrapper public final class ClosureAttribute0 + where ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: () -> ReturnType { + get { ClosureAttribute0[name, in: jsObject] } + set { ClosureAttribute0[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> ReturnType { + get { + let function = jsObject[name].function! + return { function().fromJSValue()! } + } + set { + jsObject[name] = JSClosure { _ in + newValue().jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute0Optional + where ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (() -> ReturnType)? { + get { ClosureAttribute0Optional[name, in: jsObject] } + set { ClosureAttribute0Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function().fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { _ in + newValue().jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute0OptionalVoid { + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (() -> Void)? { + get { ClosureAttribute0OptionalVoid[name, in: jsObject] } + set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function() } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { _ in + newValue() + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + +@propertyWrapper public final class ClosureAttribute0Void { + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - @inlinable public func getAll(name: String) -> [String] { - let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + @inlinable public var wrappedValue: () -> Void { + get { ClosureAttribute0Void[name, in: jsObject] } + set { ClosureAttribute0Void[name, in: jsObject] = newValue } } - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { + get { + let function = jsObject[name].function! + return { function() } + } + set { + jsObject[name] = JSClosure { _ in + newValue() + return .undefined + }.jsValue + } } +} - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } +@propertyWrapper public final class ClosureAttribute1 + where A0: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString - @inlinable public func sort() { - let this = jsObject - _ = this[Strings.sort].function!(this: this, arguments: []) + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) + @inlinable public var wrappedValue: (A0) -> ReturnType { + get { ClosureAttribute1[name, in: jsObject] } + set { ClosureAttribute1[name, in: jsObject] = newValue } } - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!).jsValue + }.jsValue + } } } -public enum console { - @inlinable public static var jsObject: JSObject { - JSObject.global[Strings.console].object! - } +@propertyWrapper public final class ClosureAttribute1Optional + where A0: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString - @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - @inlinable public static func clear() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.clear].function!(this: this, arguments: []) + @inlinable public var wrappedValue: ((A0) -> ReturnType)? { + get { ClosureAttribute1Optional[name, in: jsObject] } + set { ClosureAttribute1Optional[name, in: jsObject] = newValue } } - @inlinable public static func debug(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } } +} - @inlinable public static func error(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) - } +@propertyWrapper public final class ClosureAttribute1OptionalVoid + where A0: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString - @inlinable public static func info(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - @inlinable public static func log(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) + @inlinable public var wrappedValue: ((A0) -> Void)? { + get { ClosureAttribute1OptionalVoid[name, in: jsObject] } + set { ClosureAttribute1OptionalVoid[name, in: jsObject] = newValue } } - @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0) -> Void)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue) } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!) + return .undefined + }.jsValue + } else { + jsObject[name] = .null + } + } } +} - @inlinable public static func trace(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) - } +@propertyWrapper public final class ClosureAttribute1Void + where A0: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString - @inlinable public static func warn(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) + @inlinable public var wrappedValue: (A0) -> Void { + get { ClosureAttribute1Void[name, in: jsObject] } + set { ClosureAttribute1Void[name, in: jsObject] = newValue } } - @inlinable public static func dirxml(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0) -> Void { + get { + let function = jsObject[name].function! + return { function($0.jsValue) } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!) + return .undefined + }.jsValue + } } +} - @inlinable public static func count(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } +@propertyWrapper public final class ClosureAttribute2 + where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString - @inlinable public static func countReset(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - @inlinable public static func group(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) + @inlinable public var wrappedValue: (A0, A1) -> ReturnType { + get { ClosureAttribute2[name, in: jsObject] } + set { ClosureAttribute2[name, in: jsObject] = newValue } } - @inlinable public static func groupCollapsed(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue + }.jsValue + } } +} - @inlinable public static func groupEnd() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupEnd].function!(this: this, arguments: []) - } +@propertyWrapper public final class ClosureAttribute2Optional + where A0: JSValueCompatible, A1: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString - @inlinable public static func time(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name } - @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) + @inlinable public var wrappedValue: ((A0, A1) -> ReturnType)? { + get { ClosureAttribute2Optional[name, in: jsObject] } + set { ClosureAttribute2Optional[name, in: jsObject] = newValue } } - @inlinable public static func timeEnd(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } } } -/* variadic generics please */ -@propertyWrapper public final class ClosureAttribute0OptionalVoid { +@propertyWrapper public final class ClosureAttribute2OptionalVoid + where A0: JSValueCompatible, A1: JSValueCompatible +{ @usableFromInline let jsObject: JSObject @usableFromInline let name: JSString @@ -554,22 +15180,22 @@ public enum console { self.name = name } - @inlinable public var wrappedValue: (() -> Void)? { - get { ClosureAttribute0OptionalVoid[name, in: jsObject] } - set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } + @inlinable public var wrappedValue: ((A0, A1) -> Void)? { + get { ClosureAttribute2OptionalVoid[name, in: jsObject] } + set { ClosureAttribute2OptionalVoid[name, in: jsObject] = newValue } } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1) -> Void)? { get { guard let function = jsObject[name].function else { return nil } - return { function() } + return { function($0.jsValue, $1.jsValue) } } set { if let newValue = newValue { - jsObject[name] = JSClosure { _ in - newValue() + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) return .undefined }.jsValue } else { @@ -579,7 +15205,9 @@ public enum console { } } -@propertyWrapper public final class ClosureAttribute0Void { +@propertyWrapper public final class ClosureAttribute2Void + where A0: JSValueCompatible, A1: JSValueCompatible +{ @usableFromInline let jsObject: JSObject @usableFromInline let name: JSString @@ -588,100 +15216,1518 @@ public enum console { self.name = name } - @inlinable public var wrappedValue: () -> Void { - get { ClosureAttribute0Void[name, in: jsObject] } - set { ClosureAttribute0Void[name, in: jsObject] = newValue } + @inlinable public var wrappedValue: (A0, A1) -> Void { + get { ClosureAttribute2Void[name, in: jsObject] } + set { ClosureAttribute2Void[name, in: jsObject] = newValue } } - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1) -> Void { get { let function = jsObject[name].function! - return { function() } + return { function($0.jsValue, $1.jsValue) } } set { - jsObject[name] = JSClosure { _ in - newValue() + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!) return .undefined }.jsValue } } } +@propertyWrapper public final class ClosureAttribute5 + where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: (A0, A1, A2, A3, A4) -> ReturnType { + get { ClosureAttribute5[name, in: jsObject] } + set { ClosureAttribute5[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (A0, A1, A2, A3, A4) -> ReturnType { + get { + let function = jsObject[name].function! + return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } + } + set { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue + }.jsValue + } + } +} + +@propertyWrapper public final class ClosureAttribute5Optional + where A0: JSValueCompatible, A1: JSValueCompatible, A2: JSValueCompatible, A3: JSValueCompatible, A4: JSValueCompatible, ReturnType: JSValueCompatible +{ + @usableFromInline let jsObject: JSObject + @usableFromInline let name: JSString + + public init(jsObject: JSObject, name: JSString) { + self.jsObject = jsObject + self.name = name + } + + @inlinable public var wrappedValue: ((A0, A1, A2, A3, A4) -> ReturnType)? { + get { ClosureAttribute5Optional[name, in: jsObject] } + set { ClosureAttribute5Optional[name, in: jsObject] = newValue } + } + + @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> ((A0, A1, A2, A3, A4) -> ReturnType)? { + get { + guard let function = jsObject[name].function else { + return nil + } + return { function($0.jsValue, $1.jsValue, $2.jsValue, $3.jsValue, $4.jsValue).fromJSValue()! } + } + set { + if let newValue = newValue { + jsObject[name] = JSClosure { + newValue($0[0].fromJSValue()!, $0[1].fromJSValue()!, $0[2].fromJSValue()!, $0[3].fromJSValue()!, $0[4].fromJSValue()!).jsValue + }.jsValue + } else { + jsObject[name] = .null + } + } + } +} + @usableFromInline enum Strings { static let _self: JSString = "self" + @usableFromInline static let AbortController: JSString = "AbortController" + @usableFromInline static let AbortSignal: JSString = "AbortSignal" + @usableFromInline static let AbstractRange: JSString = "AbstractRange" + @usableFromInline static let AddSearchProvider: JSString = "AddSearchProvider" + @usableFromInline static let Animation: JSString = "Animation" + @usableFromInline static let AnimationEffect: JSString = "AnimationEffect" + @usableFromInline static let AnimationTimeline: JSString = "AnimationTimeline" + @usableFromInline static let Attr: JSString = "Attr" + @usableFromInline static let AudioTrack: JSString = "AudioTrack" + @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" + @usableFromInline static let BarProp: JSString = "BarProp" + @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" @usableFromInline static let Blob: JSString = "Blob" + @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" + @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" + @usableFromInline static let CDATASection: JSString = "CDATASection" + @usableFromInline static let Cache: JSString = "Cache" + @usableFromInline static let CacheStorage: JSString = "CacheStorage" + @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" + @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" + @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" + @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" + @usableFromInline static let CharacterData: JSString = "CharacterData" + @usableFromInline static let Comment: JSString = "Comment" + @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" + @usableFromInline static let CountQueuingStrategy: JSString = "CountQueuingStrategy" + @usableFromInline static let CustomElementRegistry: JSString = "CustomElementRegistry" + @usableFromInline static let CustomEvent: JSString = "CustomEvent" @usableFromInline static let DOMException: JSString = "DOMException" + @usableFromInline static let DOMImplementation: JSString = "DOMImplementation" + @usableFromInline static let DOMMatrix: JSString = "DOMMatrix" + @usableFromInline static let DOMMatrixReadOnly: JSString = "DOMMatrixReadOnly" + @usableFromInline static let DOMParser: JSString = "DOMParser" + @usableFromInline static let DOMPoint: JSString = "DOMPoint" + @usableFromInline static let DOMPointReadOnly: JSString = "DOMPointReadOnly" + @usableFromInline static let DOMQuad: JSString = "DOMQuad" + @usableFromInline static let DOMRect: JSString = "DOMRect" + @usableFromInline static let DOMRectList: JSString = "DOMRectList" + @usableFromInline static let DOMRectReadOnly: JSString = "DOMRectReadOnly" + @usableFromInline static let DOMStringList: JSString = "DOMStringList" + @usableFromInline static let DOMStringMap: JSString = "DOMStringMap" + @usableFromInline static let DOMTokenList: JSString = "DOMTokenList" + @usableFromInline static let DataTransfer: JSString = "DataTransfer" + @usableFromInline static let DataTransferItem: JSString = "DataTransferItem" + @usableFromInline static let DataTransferItemList: JSString = "DataTransferItemList" + @usableFromInline static let Document: JSString = "Document" + @usableFromInline static let DocumentFragment: JSString = "DocumentFragment" + @usableFromInline static let DocumentTimeline: JSString = "DocumentTimeline" + @usableFromInline static let DocumentType: JSString = "DocumentType" + @usableFromInline static let DragEvent: JSString = "DragEvent" + @usableFromInline static let Element: JSString = "Element" + @usableFromInline static let ElementInternals: JSString = "ElementInternals" + @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" + @usableFromInline static let Event: JSString = "Event" + @usableFromInline static let EventSource: JSString = "EventSource" + @usableFromInline static let EventTarget: JSString = "EventTarget" + @usableFromInline static let External: JSString = "External" @usableFromInline static let File: JSString = "File" @usableFromInline static let FileList: JSString = "FileList" @usableFromInline static let FileReader: JSString = "FileReader" + @usableFromInline static let FocusEvent: JSString = "FocusEvent" + @usableFromInline static let FormData: JSString = "FormData" + @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" + @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" + @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" + @usableFromInline static let HTMLAreaElement: JSString = "HTMLAreaElement" + @usableFromInline static let HTMLAudioElement: JSString = "HTMLAudioElement" + @usableFromInline static let HTMLBRElement: JSString = "HTMLBRElement" + @usableFromInline static let HTMLBaseElement: JSString = "HTMLBaseElement" + @usableFromInline static let HTMLBodyElement: JSString = "HTMLBodyElement" + @usableFromInline static let HTMLButtonElement: JSString = "HTMLButtonElement" + @usableFromInline static let HTMLCanvasElement: JSString = "HTMLCanvasElement" + @usableFromInline static let HTMLCollection: JSString = "HTMLCollection" + @usableFromInline static let HTMLDListElement: JSString = "HTMLDListElement" + @usableFromInline static let HTMLDataElement: JSString = "HTMLDataElement" + @usableFromInline static let HTMLDataListElement: JSString = "HTMLDataListElement" + @usableFromInline static let HTMLDetailsElement: JSString = "HTMLDetailsElement" + @usableFromInline static let HTMLDialogElement: JSString = "HTMLDialogElement" + @usableFromInline static let HTMLDirectoryElement: JSString = "HTMLDirectoryElement" + @usableFromInline static let HTMLDivElement: JSString = "HTMLDivElement" + @usableFromInline static let HTMLElement: JSString = "HTMLElement" + @usableFromInline static let HTMLEmbedElement: JSString = "HTMLEmbedElement" + @usableFromInline static let HTMLFieldSetElement: JSString = "HTMLFieldSetElement" + @usableFromInline static let HTMLFontElement: JSString = "HTMLFontElement" + @usableFromInline static let HTMLFormControlsCollection: JSString = "HTMLFormControlsCollection" + @usableFromInline static let HTMLFormElement: JSString = "HTMLFormElement" + @usableFromInline static let HTMLFrameElement: JSString = "HTMLFrameElement" + @usableFromInline static let HTMLFrameSetElement: JSString = "HTMLFrameSetElement" + @usableFromInline static let HTMLHRElement: JSString = "HTMLHRElement" + @usableFromInline static let HTMLHeadElement: JSString = "HTMLHeadElement" + @usableFromInline static let HTMLHeadingElement: JSString = "HTMLHeadingElement" + @usableFromInline static let HTMLHtmlElement: JSString = "HTMLHtmlElement" + @usableFromInline static let HTMLIFrameElement: JSString = "HTMLIFrameElement" + @usableFromInline static let HTMLImageElement: JSString = "HTMLImageElement" + @usableFromInline static let HTMLInputElement: JSString = "HTMLInputElement" + @usableFromInline static let HTMLLIElement: JSString = "HTMLLIElement" + @usableFromInline static let HTMLLabelElement: JSString = "HTMLLabelElement" + @usableFromInline static let HTMLLegendElement: JSString = "HTMLLegendElement" + @usableFromInline static let HTMLLinkElement: JSString = "HTMLLinkElement" + @usableFromInline static let HTMLMapElement: JSString = "HTMLMapElement" + @usableFromInline static let HTMLMarqueeElement: JSString = "HTMLMarqueeElement" + @usableFromInline static let HTMLMediaElement: JSString = "HTMLMediaElement" + @usableFromInline static let HTMLMenuElement: JSString = "HTMLMenuElement" + @usableFromInline static let HTMLMetaElement: JSString = "HTMLMetaElement" + @usableFromInline static let HTMLMeterElement: JSString = "HTMLMeterElement" + @usableFromInline static let HTMLModElement: JSString = "HTMLModElement" + @usableFromInline static let HTMLOListElement: JSString = "HTMLOListElement" + @usableFromInline static let HTMLObjectElement: JSString = "HTMLObjectElement" + @usableFromInline static let HTMLOptGroupElement: JSString = "HTMLOptGroupElement" + @usableFromInline static let HTMLOptionElement: JSString = "HTMLOptionElement" + @usableFromInline static let HTMLOptionsCollection: JSString = "HTMLOptionsCollection" + @usableFromInline static let HTMLOutputElement: JSString = "HTMLOutputElement" + @usableFromInline static let HTMLParagraphElement: JSString = "HTMLParagraphElement" + @usableFromInline static let HTMLParamElement: JSString = "HTMLParamElement" + @usableFromInline static let HTMLPictureElement: JSString = "HTMLPictureElement" + @usableFromInline static let HTMLPreElement: JSString = "HTMLPreElement" + @usableFromInline static let HTMLProgressElement: JSString = "HTMLProgressElement" + @usableFromInline static let HTMLQuoteElement: JSString = "HTMLQuoteElement" + @usableFromInline static let HTMLScriptElement: JSString = "HTMLScriptElement" + @usableFromInline static let HTMLSelectElement: JSString = "HTMLSelectElement" + @usableFromInline static let HTMLSlotElement: JSString = "HTMLSlotElement" + @usableFromInline static let HTMLSourceElement: JSString = "HTMLSourceElement" + @usableFromInline static let HTMLSpanElement: JSString = "HTMLSpanElement" + @usableFromInline static let HTMLStyleElement: JSString = "HTMLStyleElement" + @usableFromInline static let HTMLTableCaptionElement: JSString = "HTMLTableCaptionElement" + @usableFromInline static let HTMLTableCellElement: JSString = "HTMLTableCellElement" + @usableFromInline static let HTMLTableColElement: JSString = "HTMLTableColElement" + @usableFromInline static let HTMLTableElement: JSString = "HTMLTableElement" + @usableFromInline static let HTMLTableRowElement: JSString = "HTMLTableRowElement" + @usableFromInline static let HTMLTableSectionElement: JSString = "HTMLTableSectionElement" + @usableFromInline static let HTMLTemplateElement: JSString = "HTMLTemplateElement" + @usableFromInline static let HTMLTextAreaElement: JSString = "HTMLTextAreaElement" + @usableFromInline static let HTMLTimeElement: JSString = "HTMLTimeElement" + @usableFromInline static let HTMLTitleElement: JSString = "HTMLTitleElement" + @usableFromInline static let HTMLTrackElement: JSString = "HTMLTrackElement" + @usableFromInline static let HTMLUListElement: JSString = "HTMLUListElement" + @usableFromInline static let HTMLUnknownElement: JSString = "HTMLUnknownElement" + @usableFromInline static let HTMLVideoElement: JSString = "HTMLVideoElement" + @usableFromInline static let HashChangeEvent: JSString = "HashChangeEvent" + @usableFromInline static let Headers: JSString = "Headers" + @usableFromInline static let History: JSString = "History" + @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" + @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" + @usableFromInline static let ImageData: JSString = "ImageData" + @usableFromInline static let InputEvent: JSString = "InputEvent" + @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" + @usableFromInline static let KeyboardEvent: JSString = "KeyboardEvent" + @usableFromInline static let KeyframeEffect: JSString = "KeyframeEffect" + @usableFromInline static let Location: JSString = "Location" + @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MessageChannel: JSString = "MessageChannel" + @usableFromInline static let MessageEvent: JSString = "MessageEvent" + @usableFromInline static let MessagePort: JSString = "MessagePort" + @usableFromInline static let MimeType: JSString = "MimeType" + @usableFromInline static let MimeTypeArray: JSString = "MimeTypeArray" + @usableFromInline static let MouseEvent: JSString = "MouseEvent" + @usableFromInline static let MutationEvent: JSString = "MutationEvent" + @usableFromInline static let MutationObserver: JSString = "MutationObserver" + @usableFromInline static let MutationRecord: JSString = "MutationRecord" + @usableFromInline static let NamedNodeMap: JSString = "NamedNodeMap" + @usableFromInline static let NavigationPreloadManager: JSString = "NavigationPreloadManager" + @usableFromInline static let Navigator: JSString = "Navigator" + @usableFromInline static let Node: JSString = "Node" + @usableFromInline static let NodeIterator: JSString = "NodeIterator" + @usableFromInline static let NodeList: JSString = "NodeList" @usableFromInline static let Object: JSString = "Object" + @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" + @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" + @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" + @usableFromInline static let Path2D: JSString = "Path2D" + @usableFromInline static let Performance: JSString = "Performance" + @usableFromInline static let Plugin: JSString = "Plugin" + @usableFromInline static let PluginArray: JSString = "PluginArray" + @usableFromInline static let PopStateEvent: JSString = "PopStateEvent" + @usableFromInline static let ProcessingInstruction: JSString = "ProcessingInstruction" + @usableFromInline static let ProgressEvent: JSString = "ProgressEvent" + @usableFromInline static let PromiseRejectionEvent: JSString = "PromiseRejectionEvent" + @usableFromInline static let RadioNodeList: JSString = "RadioNodeList" + @usableFromInline static let Range: JSString = "Range" + @usableFromInline static let ReadableByteStreamController: JSString = "ReadableByteStreamController" + @usableFromInline static let ReadableStream: JSString = "ReadableStream" + @usableFromInline static let ReadableStreamBYOBReader: JSString = "ReadableStreamBYOBReader" + @usableFromInline static let ReadableStreamBYOBRequest: JSString = "ReadableStreamBYOBRequest" + @usableFromInline static let ReadableStreamDefaultController: JSString = "ReadableStreamDefaultController" + @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" + @usableFromInline static let Request: JSString = "Request" + @usableFromInline static let Response: JSString = "Response" + @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" + @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" + @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" + @usableFromInline static let ShadowRoot: JSString = "ShadowRoot" + @usableFromInline static let SharedWorker: JSString = "SharedWorker" + @usableFromInline static let StaticRange: JSString = "StaticRange" + @usableFromInline static let Storage: JSString = "Storage" + @usableFromInline static let StorageEvent: JSString = "StorageEvent" + @usableFromInline static let SubmitEvent: JSString = "SubmitEvent" + @usableFromInline static let Text: JSString = "Text" + @usableFromInline static let TextMetrics: JSString = "TextMetrics" + @usableFromInline static let TextTrack: JSString = "TextTrack" + @usableFromInline static let TextTrackCue: JSString = "TextTrackCue" + @usableFromInline static let TextTrackCueList: JSString = "TextTrackCueList" + @usableFromInline static let TextTrackList: JSString = "TextTrackList" + @usableFromInline static let TimeRanges: JSString = "TimeRanges" + @usableFromInline static let TrackEvent: JSString = "TrackEvent" + @usableFromInline static let TransformStream: JSString = "TransformStream" + @usableFromInline static let TransformStreamDefaultController: JSString = "TransformStreamDefaultController" + @usableFromInline static let TreeWalker: JSString = "TreeWalker" + @usableFromInline static let UIEvent: JSString = "UIEvent" @usableFromInline static let URL: JSString = "URL" @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" + @usableFromInline static let ValidityState: JSString = "ValidityState" + @usableFromInline static let VideoTrack: JSString = "VideoTrack" + @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" + @usableFromInline static let WheelEvent: JSString = "WheelEvent" + @usableFromInline static let Window: JSString = "Window" + @usableFromInline static let Worker: JSString = "Worker" + @usableFromInline static let Worklet: JSString = "Worklet" + @usableFromInline static let WritableStream: JSString = "WritableStream" + @usableFromInline static let WritableStreamDefaultController: JSString = "WritableStreamDefaultController" + @usableFromInline static let WritableStreamDefaultWriter: JSString = "WritableStreamDefaultWriter" + @usableFromInline static let XMLDocument: JSString = "XMLDocument" + @usableFromInline static let XMLHttpRequest: JSString = "XMLHttpRequest" + @usableFromInline static let XMLHttpRequestEventTarget: JSString = "XMLHttpRequestEventTarget" + @usableFromInline static let XMLHttpRequestUpload: JSString = "XMLHttpRequestUpload" + @usableFromInline static let XPathEvaluator: JSString = "XPathEvaluator" + @usableFromInline static let XPathExpression: JSString = "XPathExpression" + @usableFromInline static let XPathResult: JSString = "XPathResult" + @usableFromInline static let XSLTProcessor: JSString = "XSLTProcessor" + @usableFromInline static let a: JSString = "a" + @usableFromInline static let aLink: JSString = "aLink" + @usableFromInline static let abbr: JSString = "abbr" @usableFromInline static let abort: JSString = "abort" + @usableFromInline static let aborted: JSString = "aborted" + @usableFromInline static let accept: JSString = "accept" + @usableFromInline static let acceptCharset: JSString = "acceptCharset" + @usableFromInline static let accessKey: JSString = "accessKey" + @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" + @usableFromInline static let action: JSString = "action" + @usableFromInline static let active: JSString = "active" + @usableFromInline static let activeCues: JSString = "activeCues" + @usableFromInline static let activeElement: JSString = "activeElement" + @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" + @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" + @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" + @usableFromInline static let actualBoundingBoxRight: JSString = "actualBoundingBoxRight" + @usableFromInline static let add: JSString = "add" + @usableFromInline static let addAll: JSString = "addAll" + @usableFromInline static let addColorStop: JSString = "addColorStop" + @usableFromInline static let addCue: JSString = "addCue" + @usableFromInline static let addModule: JSString = "addModule" + @usableFromInline static let addPath: JSString = "addPath" + @usableFromInline static let addTextTrack: JSString = "addTextTrack" + @usableFromInline static let addedNodes: JSString = "addedNodes" + @usableFromInline static let adoptNode: JSString = "adoptNode" + @usableFromInline static let after: JSString = "after" + @usableFromInline static let alert: JSString = "alert" + @usableFromInline static let align: JSString = "align" + @usableFromInline static let alinkColor: JSString = "alinkColor" + @usableFromInline static let all: JSString = "all" + @usableFromInline static let allow: JSString = "allow" + @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" + @usableFromInline static let alpha: JSString = "alpha" + @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" + @usableFromInline static let alt: JSString = "alt" + @usableFromInline static let altKey: JSString = "altKey" + @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" + @usableFromInline static let anchors: JSString = "anchors" + @usableFromInline static let animate: JSString = "animate" + @usableFromInline static let appCodeName: JSString = "appCodeName" + @usableFromInline static let appName: JSString = "appName" + @usableFromInline static let appVersion: JSString = "appVersion" @usableFromInline static let append: JSString = "append" + @usableFromInline static let appendChild: JSString = "appendChild" + @usableFromInline static let appendData: JSString = "appendData" + @usableFromInline static let applets: JSString = "applets" + @usableFromInline static let arc: JSString = "arc" + @usableFromInline static let arcTo: JSString = "arcTo" + @usableFromInline static let archive: JSString = "archive" + @usableFromInline static let areas: JSString = "areas" + @usableFromInline static let ariaAtomic: JSString = "ariaAtomic" + @usableFromInline static let ariaAutoComplete: JSString = "ariaAutoComplete" + @usableFromInline static let ariaBusy: JSString = "ariaBusy" + @usableFromInline static let ariaChecked: JSString = "ariaChecked" + @usableFromInline static let ariaColCount: JSString = "ariaColCount" + @usableFromInline static let ariaColIndex: JSString = "ariaColIndex" + @usableFromInline static let ariaColIndexText: JSString = "ariaColIndexText" + @usableFromInline static let ariaColSpan: JSString = "ariaColSpan" + @usableFromInline static let ariaCurrent: JSString = "ariaCurrent" + @usableFromInline static let ariaDescription: JSString = "ariaDescription" + @usableFromInline static let ariaDisabled: JSString = "ariaDisabled" + @usableFromInline static let ariaExpanded: JSString = "ariaExpanded" + @usableFromInline static let ariaHasPopup: JSString = "ariaHasPopup" + @usableFromInline static let ariaHidden: JSString = "ariaHidden" + @usableFromInline static let ariaInvalid: JSString = "ariaInvalid" + @usableFromInline static let ariaKeyShortcuts: JSString = "ariaKeyShortcuts" + @usableFromInline static let ariaLabel: JSString = "ariaLabel" + @usableFromInline static let ariaLevel: JSString = "ariaLevel" + @usableFromInline static let ariaLive: JSString = "ariaLive" + @usableFromInline static let ariaModal: JSString = "ariaModal" + @usableFromInline static let ariaMultiLine: JSString = "ariaMultiLine" + @usableFromInline static let ariaMultiSelectable: JSString = "ariaMultiSelectable" + @usableFromInline static let ariaOrientation: JSString = "ariaOrientation" + @usableFromInline static let ariaPlaceholder: JSString = "ariaPlaceholder" + @usableFromInline static let ariaPosInSet: JSString = "ariaPosInSet" + @usableFromInline static let ariaPressed: JSString = "ariaPressed" + @usableFromInline static let ariaReadOnly: JSString = "ariaReadOnly" + @usableFromInline static let ariaRequired: JSString = "ariaRequired" + @usableFromInline static let ariaRoleDescription: JSString = "ariaRoleDescription" + @usableFromInline static let ariaRowCount: JSString = "ariaRowCount" + @usableFromInline static let ariaRowIndex: JSString = "ariaRowIndex" + @usableFromInline static let ariaRowIndexText: JSString = "ariaRowIndexText" + @usableFromInline static let ariaRowSpan: JSString = "ariaRowSpan" + @usableFromInline static let ariaSelected: JSString = "ariaSelected" + @usableFromInline static let ariaSetSize: JSString = "ariaSetSize" + @usableFromInline static let ariaSort: JSString = "ariaSort" + @usableFromInline static let ariaValueMax: JSString = "ariaValueMax" + @usableFromInline static let ariaValueMin: JSString = "ariaValueMin" + @usableFromInline static let ariaValueNow: JSString = "ariaValueNow" + @usableFromInline static let ariaValueText: JSString = "ariaValueText" @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" + @usableFromInline static let `as`: JSString = "as" @usableFromInline static let assert: JSString = "assert" + @usableFromInline static let assign: JSString = "assign" + @usableFromInline static let assignedElements: JSString = "assignedElements" + @usableFromInline static let assignedNodes: JSString = "assignedNodes" + @usableFromInline static let assignedSlot: JSString = "assignedSlot" + @usableFromInline static let async: JSString = "async" + @usableFromInline static let atob: JSString = "atob" + @usableFromInline static let attachInternals: JSString = "attachInternals" + @usableFromInline static let attachShadow: JSString = "attachShadow" + @usableFromInline static let attrChange: JSString = "attrChange" + @usableFromInline static let attrName: JSString = "attrName" + @usableFromInline static let attributeFilter: JSString = "attributeFilter" + @usableFromInline static let attributeName: JSString = "attributeName" + @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" + @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" + @usableFromInline static let attributes: JSString = "attributes" + @usableFromInline static let audioTracks: JSString = "audioTracks" + @usableFromInline static let autoAllocateChunkSize: JSString = "autoAllocateChunkSize" + @usableFromInline static let autocapitalize: JSString = "autocapitalize" + @usableFromInline static let autocomplete: JSString = "autocomplete" + @usableFromInline static let autofocus: JSString = "autofocus" + @usableFromInline static let autoplay: JSString = "autoplay" + @usableFromInline static let axis: JSString = "axis" + @usableFromInline static let b: JSString = "b" + @usableFromInline static let back: JSString = "back" + @usableFromInline static let background: JSString = "background" + @usableFromInline static let badInput: JSString = "badInput" + @usableFromInline static let baseURI: JSString = "baseURI" + @usableFromInline static let before: JSString = "before" + @usableFromInline static let beginPath: JSString = "beginPath" + @usableFromInline static let behavior: JSString = "behavior" + @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" + @usableFromInline static let bgColor: JSString = "bgColor" + @usableFromInline static let blob: JSString = "blob" + @usableFromInline static let blocking: JSString = "blocking" + @usableFromInline static let blur: JSString = "blur" + @usableFromInline static let body: JSString = "body" + @usableFromInline static let bodyUsed: JSString = "bodyUsed" + @usableFromInline static let booleanValue: JSString = "booleanValue" + @usableFromInline static let border: JSString = "border" + @usableFromInline static let bottom: JSString = "bottom" + @usableFromInline static let btoa: JSString = "btoa" + @usableFromInline static let bubbles: JSString = "bubbles" + @usableFromInline static let buffered: JSString = "buffered" + @usableFromInline static let button: JSString = "button" + @usableFromInline static let buttons: JSString = "buttons" + @usableFromInline static let byobRequest: JSString = "byobRequest" + @usableFromInline static let c: JSString = "c" + @usableFromInline static let cache: JSString = "cache" + @usableFromInline static let cacheName: JSString = "cacheName" + @usableFromInline static let caches: JSString = "caches" + @usableFromInline static let canPlayType: JSString = "canPlayType" + @usableFromInline static let cancel: JSString = "cancel" + @usableFromInline static let cancelAnimationFrame: JSString = "cancelAnimationFrame" + @usableFromInline static let cancelBubble: JSString = "cancelBubble" + @usableFromInline static let cancelable: JSString = "cancelable" + @usableFromInline static let canvas: JSString = "canvas" + @usableFromInline static let caption: JSString = "caption" + @usableFromInline static let capture: JSString = "capture" + @usableFromInline static let captureEvents: JSString = "captureEvents" + @usableFromInline static let cellIndex: JSString = "cellIndex" + @usableFromInline static let cellPadding: JSString = "cellPadding" + @usableFromInline static let cellSpacing: JSString = "cellSpacing" + @usableFromInline static let cells: JSString = "cells" + @usableFromInline static let ch: JSString = "ch" + @usableFromInline static let chOff: JSString = "chOff" + @usableFromInline static let charCode: JSString = "charCode" + @usableFromInline static let characterData: JSString = "characterData" + @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" + @usableFromInline static let characterSet: JSString = "characterSet" + @usableFromInline static let charset: JSString = "charset" + @usableFromInline static let checkValidity: JSString = "checkValidity" + @usableFromInline static let checked: JSString = "checked" + @usableFromInline static let childElementCount: JSString = "childElementCount" + @usableFromInline static let childList: JSString = "childList" + @usableFromInline static let childNodes: JSString = "childNodes" + @usableFromInline static let children: JSString = "children" + @usableFromInline static let cite: JSString = "cite" + @usableFromInline static let classList: JSString = "classList" + @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearData: JSString = "clearData" + @usableFromInline static let clearInterval: JSString = "clearInterval" + @usableFromInline static let clearParameters: JSString = "clearParameters" + @usableFromInline static let clearRect: JSString = "clearRect" + @usableFromInline static let clearTimeout: JSString = "clearTimeout" + @usableFromInline static let click: JSString = "click" + @usableFromInline static let clientId: JSString = "clientId" + @usableFromInline static let clientInformation: JSString = "clientInformation" + @usableFromInline static let clientX: JSString = "clientX" + @usableFromInline static let clientY: JSString = "clientY" + @usableFromInline static let clip: JSString = "clip" + @usableFromInline static let clone: JSString = "clone" + @usableFromInline static let cloneContents: JSString = "cloneContents" + @usableFromInline static let cloneNode: JSString = "cloneNode" + @usableFromInline static let cloneRange: JSString = "cloneRange" + @usableFromInline static let close: JSString = "close" + @usableFromInline static let closePath: JSString = "closePath" + @usableFromInline static let closed: JSString = "closed" + @usableFromInline static let closest: JSString = "closest" @usableFromInline static let code: JSString = "code" + @usableFromInline static let codeBase: JSString = "codeBase" + @usableFromInline static let codeType: JSString = "codeType" + @usableFromInline static let colSpan: JSString = "colSpan" + @usableFromInline static let collapse: JSString = "collapse" + @usableFromInline static let collapsed: JSString = "collapsed" + @usableFromInline static let colno: JSString = "colno" + @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorSpace: JSString = "colorSpace" + @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" + @usableFromInline static let cols: JSString = "cols" + @usableFromInline static let commit: JSString = "commit" + @usableFromInline static let commitStyles: JSString = "commitStyles" + @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" + @usableFromInline static let compact: JSString = "compact" + @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" + @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" + @usableFromInline static let comparePoint: JSString = "comparePoint" + @usableFromInline static let compatMode: JSString = "compatMode" + @usableFromInline static let complete: JSString = "complete" + @usableFromInline static let composed: JSString = "composed" + @usableFromInline static let composedPath: JSString = "composedPath" + @usableFromInline static let composite: JSString = "composite" + @usableFromInline static let computedOffset: JSString = "computedOffset" + @usableFromInline static let confirm: JSString = "confirm" @usableFromInline static let console: JSString = "console" + @usableFromInline static let contains: JSString = "contains" + @usableFromInline static let content: JSString = "content" + @usableFromInline static let contentDocument: JSString = "contentDocument" + @usableFromInline static let contentEditable: JSString = "contentEditable" + @usableFromInline static let contentType: JSString = "contentType" + @usableFromInline static let contentWindow: JSString = "contentWindow" + @usableFromInline static let control: JSString = "control" + @usableFromInline static let controller: JSString = "controller" + @usableFromInline static let controls: JSString = "controls" + @usableFromInline static let convertToBlob: JSString = "convertToBlob" + @usableFromInline static let cookie: JSString = "cookie" + @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" + @usableFromInline static let coords: JSString = "coords" @usableFromInline static let count: JSString = "count" @usableFromInline static let countReset: JSString = "countReset" + @usableFromInline static let createAttribute: JSString = "createAttribute" + @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" + @usableFromInline static let createCDATASection: JSString = "createCDATASection" + @usableFromInline static let createCaption: JSString = "createCaption" + @usableFromInline static let createComment: JSString = "createComment" + @usableFromInline static let createConicGradient: JSString = "createConicGradient" + @usableFromInline static let createDocument: JSString = "createDocument" + @usableFromInline static let createDocumentFragment: JSString = "createDocumentFragment" + @usableFromInline static let createDocumentType: JSString = "createDocumentType" + @usableFromInline static let createElement: JSString = "createElement" + @usableFromInline static let createElementNS: JSString = "createElementNS" + @usableFromInline static let createEvent: JSString = "createEvent" + @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" + @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" + @usableFromInline static let createImageData: JSString = "createImageData" + @usableFromInline static let createLinearGradient: JSString = "createLinearGradient" @usableFromInline static let createObjectURL: JSString = "createObjectURL" + @usableFromInline static let createPattern: JSString = "createPattern" + @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" + @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" + @usableFromInline static let createRange: JSString = "createRange" + @usableFromInline static let createTBody: JSString = "createTBody" + @usableFromInline static let createTFoot: JSString = "createTFoot" + @usableFromInline static let createTHead: JSString = "createTHead" + @usableFromInline static let createTextNode: JSString = "createTextNode" + @usableFromInline static let credentials: JSString = "credentials" + @usableFromInline static let crossOrigin: JSString = "crossOrigin" + @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" + @usableFromInline static let ctrlKey: JSString = "ctrlKey" + @usableFromInline static let cues: JSString = "cues" + @usableFromInline static let currentIteration: JSString = "currentIteration" + @usableFromInline static let currentNode: JSString = "currentNode" + @usableFromInline static let currentScript: JSString = "currentScript" + @usableFromInline static let currentSrc: JSString = "currentSrc" + @usableFromInline static let currentTarget: JSString = "currentTarget" + @usableFromInline static let currentTime: JSString = "currentTime" + @usableFromInline static let customElements: JSString = "customElements" + @usableFromInline static let customError: JSString = "customError" + @usableFromInline static let d: JSString = "d" + @usableFromInline static let data: JSString = "data" + @usableFromInline static let dataTransfer: JSString = "dataTransfer" + @usableFromInline static let dataset: JSString = "dataset" + @usableFromInline static let dateTime: JSString = "dateTime" @usableFromInline static let debug: JSString = "debug" + @usableFromInline static let declare: JSString = "declare" + @usableFromInline static let decode: JSString = "decode" + @usableFromInline static let decoding: JSString = "decoding" + @usableFromInline static let `default`: JSString = "default" + @usableFromInline static let defaultChecked: JSString = "defaultChecked" + @usableFromInline static let defaultMuted: JSString = "defaultMuted" + @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" + @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" + @usableFromInline static let defaultSelected: JSString = "defaultSelected" + @usableFromInline static let defaultValue: JSString = "defaultValue" + @usableFromInline static let defaultView: JSString = "defaultView" + @usableFromInline static let `defer`: JSString = "defer" + @usableFromInline static let define: JSString = "define" + @usableFromInline static let delay: JSString = "delay" + @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" @usableFromInline static let delete: JSString = "delete" + @usableFromInline static let deleteCaption: JSString = "deleteCaption" + @usableFromInline static let deleteCell: JSString = "deleteCell" + @usableFromInline static let deleteContents: JSString = "deleteContents" + @usableFromInline static let deleteData: JSString = "deleteData" + @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" + @usableFromInline static let deleteTHead: JSString = "deleteTHead" + @usableFromInline static let deltaMode: JSString = "deltaMode" + @usableFromInline static let deltaX: JSString = "deltaX" + @usableFromInline static let deltaY: JSString = "deltaY" + @usableFromInline static let deltaZ: JSString = "deltaZ" + @usableFromInline static let description: JSString = "description" + @usableFromInline static let designMode: JSString = "designMode" + @usableFromInline static let desiredSize: JSString = "desiredSize" + @usableFromInline static let destination: JSString = "destination" + @usableFromInline static let desynchronized: JSString = "desynchronized" + @usableFromInline static let detach: JSString = "detach" + @usableFromInline static let detail: JSString = "detail" @usableFromInline static let dir: JSString = "dir" + @usableFromInline static let dirName: JSString = "dirName" + @usableFromInline static let direction: JSString = "direction" @usableFromInline static let dirxml: JSString = "dirxml" + @usableFromInline static let disable: JSString = "disable" + @usableFromInline static let disabled: JSString = "disabled" + @usableFromInline static let disconnect: JSString = "disconnect" + @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" + @usableFromInline static let doctype: JSString = "doctype" + @usableFromInline static let document: JSString = "document" + @usableFromInline static let documentElement: JSString = "documentElement" + @usableFromInline static let documentURI: JSString = "documentURI" + @usableFromInline static let domain: JSString = "domain" + @usableFromInline static let done: JSString = "done" + @usableFromInline static let download: JSString = "download" + @usableFromInline static let draggable: JSString = "draggable" + @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" + @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let dropEffect: JSString = "dropEffect" + @usableFromInline static let duration: JSString = "duration" + @usableFromInline static let e: JSString = "e" + @usableFromInline static let easing: JSString = "easing" + @usableFromInline static let effect: JSString = "effect" + @usableFromInline static let effectAllowed: JSString = "effectAllowed" + @usableFromInline static let elements: JSString = "elements" + @usableFromInline static let ellipse: JSString = "ellipse" + @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" + @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" + @usableFromInline static let embeds: JSString = "embeds" + @usableFromInline static let enable: JSString = "enable" + @usableFromInline static let enabled: JSString = "enabled" + @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" + @usableFromInline static let encoding: JSString = "encoding" + @usableFromInline static let enctype: JSString = "enctype" + @usableFromInline static let end: JSString = "end" + @usableFromInline static let endContainer: JSString = "endContainer" + @usableFromInline static let endDelay: JSString = "endDelay" + @usableFromInline static let endOffset: JSString = "endOffset" + @usableFromInline static let endTime: JSString = "endTime" + @usableFromInline static let ended: JSString = "ended" @usableFromInline static let endings: JSString = "endings" + @usableFromInline static let enqueue: JSString = "enqueue" + @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" @usableFromInline static let error: JSString = "error" + @usableFromInline static let evaluate: JSString = "evaluate" + @usableFromInline static let event: JSString = "event" + @usableFromInline static let eventPhase: JSString = "eventPhase" + @usableFromInline static let execCommand: JSString = "execCommand" + @usableFromInline static let extends: JSString = "extends" + @usableFromInline static let external: JSString = "external" + @usableFromInline static let extractContents: JSString = "extractContents" + @usableFromInline static let f: JSString = "f" + @usableFromInline static let face: JSString = "face" + @usableFromInline static let fastSeek: JSString = "fastSeek" + @usableFromInline static let fetch: JSString = "fetch" + @usableFromInline static let fgColor: JSString = "fgColor" + @usableFromInline static let filename: JSString = "filename" + @usableFromInline static let files: JSString = "files" + @usableFromInline static let fill: JSString = "fill" + @usableFromInline static let fillRect: JSString = "fillRect" + @usableFromInline static let fillStyle: JSString = "fillStyle" + @usableFromInline static let fillText: JSString = "fillText" + @usableFromInline static let filter: JSString = "filter" + @usableFromInline static let finish: JSString = "finish" + @usableFromInline static let finished: JSString = "finished" + @usableFromInline static let firstChild: JSString = "firstChild" + @usableFromInline static let firstElementChild: JSString = "firstElementChild" + @usableFromInline static let flatten: JSString = "flatten" + @usableFromInline static let flipX: JSString = "flipX" + @usableFromInline static let flipY: JSString = "flipY" + @usableFromInline static let flush: JSString = "flush" + @usableFromInline static let focus: JSString = "focus" + @usableFromInline static let font: JSString = "font" + @usableFromInline static let fontBoundingBoxAscent: JSString = "fontBoundingBoxAscent" + @usableFromInline static let fontBoundingBoxDescent: JSString = "fontBoundingBoxDescent" + @usableFromInline static let fontKerning: JSString = "fontKerning" + @usableFromInline static let fontStretch: JSString = "fontStretch" + @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" + @usableFromInline static let form: JSString = "form" + @usableFromInline static let formAction: JSString = "formAction" + @usableFromInline static let formData: JSString = "formData" + @usableFromInline static let formEnctype: JSString = "formEnctype" + @usableFromInline static let formMethod: JSString = "formMethod" + @usableFromInline static let formNoValidate: JSString = "formNoValidate" + @usableFromInline static let formTarget: JSString = "formTarget" + @usableFromInline static let forms: JSString = "forms" + @usableFromInline static let forward: JSString = "forward" + @usableFromInline static let frame: JSString = "frame" + @usableFromInline static let frameBorder: JSString = "frameBorder" + @usableFromInline static let frameElement: JSString = "frameElement" + @usableFromInline static let frames: JSString = "frames" + @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" + @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" + @usableFromInline static let fromMatrix: JSString = "fromMatrix" + @usableFromInline static let fromPoint: JSString = "fromPoint" + @usableFromInline static let fromQuad: JSString = "fromQuad" + @usableFromInline static let fromRect: JSString = "fromRect" @usableFromInline static let get: JSString = "get" @usableFromInline static let getAll: JSString = "getAll" + @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" + @usableFromInline static let getAnimations: JSString = "getAnimations" + @usableFromInline static let getAsFile: JSString = "getAsFile" + @usableFromInline static let getAttribute: JSString = "getAttribute" + @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" + @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" + @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" + @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" + @usableFromInline static let getBounds: JSString = "getBounds" + @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" + @usableFromInline static let getContext: JSString = "getContext" + @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" + @usableFromInline static let getCueById: JSString = "getCueById" + @usableFromInline static let getData: JSString = "getData" + @usableFromInline static let getElementById: JSString = "getElementById" + @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" + @usableFromInline static let getElementsByName: JSString = "getElementsByName" + @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" + @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" + @usableFromInline static let getImageData: JSString = "getImageData" + @usableFromInline static let getKeyframes: JSString = "getKeyframes" + @usableFromInline static let getLineDash: JSString = "getLineDash" + @usableFromInline static let getModifierState: JSString = "getModifierState" + @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" + @usableFromInline static let getParameter: JSString = "getParameter" + @usableFromInline static let getReader: JSString = "getReader" + @usableFromInline static let getRegistration: JSString = "getRegistration" + @usableFromInline static let getRegistrations: JSString = "getRegistrations" + @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" + @usableFromInline static let getRootNode: JSString = "getRootNode" + @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getStartDate: JSString = "getStartDate" + @usableFromInline static let getState: JSString = "getState" + @usableFromInline static let getTiming: JSString = "getTiming" + @usableFromInline static let getTrackById: JSString = "getTrackById" + @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getWriter: JSString = "getWriter" + @usableFromInline static let globalAlpha: JSString = "globalAlpha" + @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" + @usableFromInline static let go: JSString = "go" @usableFromInline static let group: JSString = "group" @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" @usableFromInline static let groupEnd: JSString = "groupEnd" + @usableFromInline static let handled: JSString = "handled" + @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" + @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" @usableFromInline static let has: JSString = "has" + @usableFromInline static let hasAttribute: JSString = "hasAttribute" + @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" + @usableFromInline static let hasAttributes: JSString = "hasAttributes" + @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" + @usableFromInline static let hasFeature: JSString = "hasFeature" + @usableFromInline static let hasFocus: JSString = "hasFocus" @usableFromInline static let hash: JSString = "hash" + @usableFromInline static let head: JSString = "head" + @usableFromInline static let headerValue: JSString = "headerValue" + @usableFromInline static let headers: JSString = "headers" + @usableFromInline static let height: JSString = "height" + @usableFromInline static let hidden: JSString = "hidden" + @usableFromInline static let high: JSString = "high" + @usableFromInline static let highWaterMark: JSString = "highWaterMark" + @usableFromInline static let history: JSString = "history" @usableFromInline static let host: JSString = "host" @usableFromInline static let hostname: JSString = "hostname" @usableFromInline static let href: JSString = "href" + @usableFromInline static let hreflang: JSString = "hreflang" + @usableFromInline static let hspace: JSString = "hspace" + @usableFromInline static let htmlFor: JSString = "htmlFor" + @usableFromInline static let httpEquiv: JSString = "httpEquiv" + @usableFromInline static let id: JSString = "id" + @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" + @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" + @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" + @usableFromInline static let ignoreVary: JSString = "ignoreVary" + @usableFromInline static let imageOrientation: JSString = "imageOrientation" + @usableFromInline static let imageSizes: JSString = "imageSizes" + @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" + @usableFromInline static let imageSmoothingQuality: JSString = "imageSmoothingQuality" + @usableFromInline static let imageSrcset: JSString = "imageSrcset" + @usableFromInline static let images: JSString = "images" + @usableFromInline static let implementation: JSString = "implementation" + @usableFromInline static let importNode: JSString = "importNode" + @usableFromInline static let importStylesheet: JSString = "importStylesheet" + @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" + @usableFromInline static let includeUncontrolled: JSString = "includeUncontrolled" + @usableFromInline static let indeterminate: JSString = "indeterminate" + @usableFromInline static let index: JSString = "index" + @usableFromInline static let inert: JSString = "inert" @usableFromInline static let info: JSString = "info" + @usableFromInline static let initCompositionEvent: JSString = "initCompositionEvent" + @usableFromInline static let initCustomEvent: JSString = "initCustomEvent" + @usableFromInline static let initEvent: JSString = "initEvent" + @usableFromInline static let initKeyboardEvent: JSString = "initKeyboardEvent" + @usableFromInline static let initMessageEvent: JSString = "initMessageEvent" + @usableFromInline static let initMouseEvent: JSString = "initMouseEvent" + @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" + @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" + @usableFromInline static let initUIEvent: JSString = "initUIEvent" + @usableFromInline static let innerText: JSString = "innerText" + @usableFromInline static let inputEncoding: JSString = "inputEncoding" + @usableFromInline static let inputMode: JSString = "inputMode" + @usableFromInline static let inputType: JSString = "inputType" + @usableFromInline static let insertAdjacentElement: JSString = "insertAdjacentElement" + @usableFromInline static let insertAdjacentText: JSString = "insertAdjacentText" + @usableFromInline static let insertBefore: JSString = "insertBefore" + @usableFromInline static let insertCell: JSString = "insertCell" + @usableFromInline static let insertData: JSString = "insertData" + @usableFromInline static let insertNode: JSString = "insertNode" + @usableFromInline static let insertRow: JSString = "insertRow" + @usableFromInline static let installing: JSString = "installing" + @usableFromInline static let integrity: JSString = "integrity" + @usableFromInline static let intersectsNode: JSString = "intersectsNode" + @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" + @usableFromInline static let inverse: JSString = "inverse" + @usableFromInline static let invertSelf: JSString = "invertSelf" + @usableFromInline static let `is`: JSString = "is" + @usableFromInline static let is2D: JSString = "is2D" + @usableFromInline static let isComposing: JSString = "isComposing" + @usableFromInline static let isConnected: JSString = "isConnected" + @usableFromInline static let isContentEditable: JSString = "isContentEditable" + @usableFromInline static let isContextLost: JSString = "isContextLost" + @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" + @usableFromInline static let isEqualNode: JSString = "isEqualNode" + @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" + @usableFromInline static let isIdentity: JSString = "isIdentity" + @usableFromInline static let isMap: JSString = "isMap" + @usableFromInline static let isPointInPath: JSString = "isPointInPath" + @usableFromInline static let isPointInRange: JSString = "isPointInRange" + @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" + @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" + @usableFromInline static let isSameNode: JSString = "isSameNode" + @usableFromInline static let isSecureContext: JSString = "isSecureContext" + @usableFromInline static let isTrusted: JSString = "isTrusted" + @usableFromInline static let item: JSString = "item" + @usableFromInline static let items: JSString = "items" + @usableFromInline static let iterateNext: JSString = "iterateNext" + @usableFromInline static let iterationStart: JSString = "iterationStart" + @usableFromInline static let iterations: JSString = "iterations" + @usableFromInline static let javaEnabled: JSString = "javaEnabled" + @usableFromInline static let json: JSString = "json" + @usableFromInline static let keepalive: JSString = "keepalive" + @usableFromInline static let key: JSString = "key" + @usableFromInline static let keyCode: JSString = "keyCode" + @usableFromInline static let keys: JSString = "keys" + @usableFromInline static let kind: JSString = "kind" + @usableFromInline static let label: JSString = "label" + @usableFromInline static let labels: JSString = "labels" + @usableFromInline static let lang: JSString = "lang" + @usableFromInline static let language: JSString = "language" + @usableFromInline static let languages: JSString = "languages" + @usableFromInline static let lastChild: JSString = "lastChild" + @usableFromInline static let lastElementChild: JSString = "lastElementChild" + @usableFromInline static let lastEventId: JSString = "lastEventId" @usableFromInline static let lastModified: JSString = "lastModified" + @usableFromInline static let left: JSString = "left" @usableFromInline static let length: JSString = "length" + @usableFromInline static let lengthComputable: JSString = "lengthComputable" + @usableFromInline static let letterSpacing: JSString = "letterSpacing" + @usableFromInline static let lineCap: JSString = "lineCap" + @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" + @usableFromInline static let lineJoin: JSString = "lineJoin" + @usableFromInline static let lineTo: JSString = "lineTo" + @usableFromInline static let lineWidth: JSString = "lineWidth" + @usableFromInline static let lineno: JSString = "lineno" + @usableFromInline static let link: JSString = "link" + @usableFromInline static let linkColor: JSString = "linkColor" + @usableFromInline static let links: JSString = "links" + @usableFromInline static let list: JSString = "list" + @usableFromInline static let load: JSString = "load" + @usableFromInline static let loaded: JSString = "loaded" + @usableFromInline static let loading: JSString = "loading" + @usableFromInline static let localName: JSString = "localName" + @usableFromInline static let localStorage: JSString = "localStorage" + @usableFromInline static let location: JSString = "location" + @usableFromInline static let locationbar: JSString = "locationbar" + @usableFromInline static let locked: JSString = "locked" @usableFromInline static let log: JSString = "log" + @usableFromInline static let longDesc: JSString = "longDesc" + @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" + @usableFromInline static let lookupPrefix: JSString = "lookupPrefix" + @usableFromInline static let loop: JSString = "loop" + @usableFromInline static let low: JSString = "low" + @usableFromInline static let lowsrc: JSString = "lowsrc" + @usableFromInline static let m11: JSString = "m11" + @usableFromInline static let m12: JSString = "m12" + @usableFromInline static let m13: JSString = "m13" + @usableFromInline static let m14: JSString = "m14" + @usableFromInline static let m21: JSString = "m21" + @usableFromInline static let m22: JSString = "m22" + @usableFromInline static let m23: JSString = "m23" + @usableFromInline static let m24: JSString = "m24" + @usableFromInline static let m31: JSString = "m31" + @usableFromInline static let m32: JSString = "m32" + @usableFromInline static let m33: JSString = "m33" + @usableFromInline static let m34: JSString = "m34" + @usableFromInline static let m41: JSString = "m41" + @usableFromInline static let m42: JSString = "m42" + @usableFromInline static let m43: JSString = "m43" + @usableFromInline static let m44: JSString = "m44" + @usableFromInline static let marginHeight: JSString = "marginHeight" + @usableFromInline static let marginWidth: JSString = "marginWidth" + @usableFromInline static let match: JSString = "match" + @usableFromInline static let matchAll: JSString = "matchAll" + @usableFromInline static let matches: JSString = "matches" + @usableFromInline static let matrixTransform: JSString = "matrixTransform" + @usableFromInline static let max: JSString = "max" + @usableFromInline static let maxLength: JSString = "maxLength" + @usableFromInline static let measureText: JSString = "measureText" + @usableFromInline static let media: JSString = "media" + @usableFromInline static let menubar: JSString = "menubar" @usableFromInline static let message: JSString = "message" + @usableFromInline static let metaKey: JSString = "metaKey" + @usableFromInline static let method: JSString = "method" + @usableFromInline static let mimeTypes: JSString = "mimeTypes" + @usableFromInline static let min: JSString = "min" + @usableFromInline static let minLength: JSString = "minLength" + @usableFromInline static let miterLimit: JSString = "miterLimit" + @usableFromInline static let mode: JSString = "mode" + @usableFromInline static let modifierAltGraph: JSString = "modifierAltGraph" + @usableFromInline static let modifierCapsLock: JSString = "modifierCapsLock" + @usableFromInline static let modifierFn: JSString = "modifierFn" + @usableFromInline static let modifierFnLock: JSString = "modifierFnLock" + @usableFromInline static let modifierHyper: JSString = "modifierHyper" + @usableFromInline static let modifierNumLock: JSString = "modifierNumLock" + @usableFromInline static let modifierScrollLock: JSString = "modifierScrollLock" + @usableFromInline static let modifierSuper: JSString = "modifierSuper" + @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" + @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" + @usableFromInline static let moveTo: JSString = "moveTo" + @usableFromInline static let multiple: JSString = "multiple" + @usableFromInline static let multiply: JSString = "multiply" + @usableFromInline static let multiplySelf: JSString = "multiplySelf" + @usableFromInline static let muted: JSString = "muted" @usableFromInline static let name: JSString = "name" + @usableFromInline static let namedItem: JSString = "namedItem" + @usableFromInline static let namespaceURI: JSString = "namespaceURI" + @usableFromInline static let naturalHeight: JSString = "naturalHeight" + @usableFromInline static let naturalWidth: JSString = "naturalWidth" + @usableFromInline static let navigationPreload: JSString = "navigationPreload" + @usableFromInline static let navigator: JSString = "navigator" + @usableFromInline static let networkState: JSString = "networkState" + @usableFromInline static let newURL: JSString = "newURL" + @usableFromInline static let newValue: JSString = "newValue" + @usableFromInline static let nextElementSibling: JSString = "nextElementSibling" + @usableFromInline static let nextNode: JSString = "nextNode" + @usableFromInline static let nextSibling: JSString = "nextSibling" + @usableFromInline static let noHref: JSString = "noHref" + @usableFromInline static let noModule: JSString = "noModule" + @usableFromInline static let noResize: JSString = "noResize" + @usableFromInline static let noShade: JSString = "noShade" + @usableFromInline static let noValidate: JSString = "noValidate" + @usableFromInline static let noWrap: JSString = "noWrap" + @usableFromInline static let nodeName: JSString = "nodeName" + @usableFromInline static let nodeType: JSString = "nodeType" + @usableFromInline static let nodeValue: JSString = "nodeValue" + @usableFromInline static let nonce: JSString = "nonce" + @usableFromInline static let normalize: JSString = "normalize" + @usableFromInline static let now: JSString = "now" + @usableFromInline static let numberValue: JSString = "numberValue" + @usableFromInline static let observe: JSString = "observe" + @usableFromInline static let offset: JSString = "offset" + @usableFromInline static let ok: JSString = "ok" + @usableFromInline static let oldURL: JSString = "oldURL" + @usableFromInline static let oldValue: JSString = "oldValue" + @usableFromInline static let onLine: JSString = "onLine" @usableFromInline static let onabort: JSString = "onabort" + @usableFromInline static let onaddtrack: JSString = "onaddtrack" + @usableFromInline static let onafterprint: JSString = "onafterprint" + @usableFromInline static let onauxclick: JSString = "onauxclick" + @usableFromInline static let onbeforeprint: JSString = "onbeforeprint" + @usableFromInline static let onbeforeunload: JSString = "onbeforeunload" + @usableFromInline static let onblur: JSString = "onblur" + @usableFromInline static let oncancel: JSString = "oncancel" + @usableFromInline static let oncanplay: JSString = "oncanplay" + @usableFromInline static let oncanplaythrough: JSString = "oncanplaythrough" + @usableFromInline static let once: JSString = "once" + @usableFromInline static let onchange: JSString = "onchange" + @usableFromInline static let onclick: JSString = "onclick" + @usableFromInline static let onclose: JSString = "onclose" + @usableFromInline static let oncontextlost: JSString = "oncontextlost" + @usableFromInline static let oncontextmenu: JSString = "oncontextmenu" + @usableFromInline static let oncontextrestored: JSString = "oncontextrestored" + @usableFromInline static let oncontrollerchange: JSString = "oncontrollerchange" + @usableFromInline static let oncopy: JSString = "oncopy" + @usableFromInline static let oncuechange: JSString = "oncuechange" + @usableFromInline static let oncut: JSString = "oncut" + @usableFromInline static let ondblclick: JSString = "ondblclick" + @usableFromInline static let ondrag: JSString = "ondrag" + @usableFromInline static let ondragend: JSString = "ondragend" + @usableFromInline static let ondragenter: JSString = "ondragenter" + @usableFromInline static let ondragleave: JSString = "ondragleave" + @usableFromInline static let ondragover: JSString = "ondragover" + @usableFromInline static let ondragstart: JSString = "ondragstart" + @usableFromInline static let ondrop: JSString = "ondrop" + @usableFromInline static let ondurationchange: JSString = "ondurationchange" + @usableFromInline static let onemptied: JSString = "onemptied" + @usableFromInline static let onended: JSString = "onended" + @usableFromInline static let onenter: JSString = "onenter" @usableFromInline static let onerror: JSString = "onerror" + @usableFromInline static let onexit: JSString = "onexit" + @usableFromInline static let onfinish: JSString = "onfinish" + @usableFromInline static let onfocus: JSString = "onfocus" + @usableFromInline static let onformdata: JSString = "onformdata" + @usableFromInline static let onhashchange: JSString = "onhashchange" + @usableFromInline static let oninput: JSString = "oninput" + @usableFromInline static let oninvalid: JSString = "oninvalid" + @usableFromInline static let onkeydown: JSString = "onkeydown" + @usableFromInline static let onkeypress: JSString = "onkeypress" + @usableFromInline static let onkeyup: JSString = "onkeyup" + @usableFromInline static let onlanguagechange: JSString = "onlanguagechange" @usableFromInline static let onload: JSString = "onload" + @usableFromInline static let onloadeddata: JSString = "onloadeddata" + @usableFromInline static let onloadedmetadata: JSString = "onloadedmetadata" @usableFromInline static let onloadend: JSString = "onloadend" @usableFromInline static let onloadstart: JSString = "onloadstart" + @usableFromInline static let onmessage: JSString = "onmessage" + @usableFromInline static let onmessageerror: JSString = "onmessageerror" + @usableFromInline static let onmousedown: JSString = "onmousedown" + @usableFromInline static let onmouseenter: JSString = "onmouseenter" + @usableFromInline static let onmouseleave: JSString = "onmouseleave" + @usableFromInline static let onmousemove: JSString = "onmousemove" + @usableFromInline static let onmouseout: JSString = "onmouseout" + @usableFromInline static let onmouseover: JSString = "onmouseover" + @usableFromInline static let onmouseup: JSString = "onmouseup" + @usableFromInline static let onoffline: JSString = "onoffline" + @usableFromInline static let ononline: JSString = "ononline" + @usableFromInline static let onopen: JSString = "onopen" + @usableFromInline static let onpagehide: JSString = "onpagehide" + @usableFromInline static let onpageshow: JSString = "onpageshow" + @usableFromInline static let onpaste: JSString = "onpaste" + @usableFromInline static let onpause: JSString = "onpause" + @usableFromInline static let onplay: JSString = "onplay" + @usableFromInline static let onplaying: JSString = "onplaying" + @usableFromInline static let onpopstate: JSString = "onpopstate" @usableFromInline static let onprogress: JSString = "onprogress" + @usableFromInline static let onratechange: JSString = "onratechange" + @usableFromInline static let onreadystatechange: JSString = "onreadystatechange" + @usableFromInline static let onrejectionhandled: JSString = "onrejectionhandled" + @usableFromInline static let onremove: JSString = "onremove" + @usableFromInline static let onremovetrack: JSString = "onremovetrack" + @usableFromInline static let onreset: JSString = "onreset" + @usableFromInline static let onresize: JSString = "onresize" + @usableFromInline static let onscroll: JSString = "onscroll" + @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" + @usableFromInline static let onseeked: JSString = "onseeked" + @usableFromInline static let onseeking: JSString = "onseeking" + @usableFromInline static let onselect: JSString = "onselect" + @usableFromInline static let onslotchange: JSString = "onslotchange" + @usableFromInline static let onstalled: JSString = "onstalled" + @usableFromInline static let onstatechange: JSString = "onstatechange" + @usableFromInline static let onstorage: JSString = "onstorage" + @usableFromInline static let onsubmit: JSString = "onsubmit" + @usableFromInline static let onsuspend: JSString = "onsuspend" + @usableFromInline static let ontimeout: JSString = "ontimeout" + @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" + @usableFromInline static let ontoggle: JSString = "ontoggle" + @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" + @usableFromInline static let onunload: JSString = "onunload" + @usableFromInline static let onupdatefound: JSString = "onupdatefound" + @usableFromInline static let onvisibilitychange: JSString = "onvisibilitychange" + @usableFromInline static let onvolumechange: JSString = "onvolumechange" + @usableFromInline static let onwaiting: JSString = "onwaiting" + @usableFromInline static let onwebkitanimationend: JSString = "onwebkitanimationend" + @usableFromInline static let onwebkitanimationiteration: JSString = "onwebkitanimationiteration" + @usableFromInline static let onwebkitanimationstart: JSString = "onwebkitanimationstart" + @usableFromInline static let onwebkittransitionend: JSString = "onwebkittransitionend" + @usableFromInline static let onwheel: JSString = "onwheel" + @usableFromInline static let open: JSString = "open" + @usableFromInline static let opener: JSString = "opener" + @usableFromInline static let optimum: JSString = "optimum" + @usableFromInline static let options: JSString = "options" @usableFromInline static let origin: JSString = "origin" + @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" + @usableFromInline static let originTime: JSString = "originTime" + @usableFromInline static let oscpu: JSString = "oscpu" + @usableFromInline static let outerText: JSString = "outerText" + @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" + @usableFromInline static let ownerDocument: JSString = "ownerDocument" + @usableFromInline static let ownerElement: JSString = "ownerElement" + @usableFromInline static let p1: JSString = "p1" + @usableFromInline static let p2: JSString = "p2" + @usableFromInline static let p3: JSString = "p3" + @usableFromInline static let p4: JSString = "p4" + @usableFromInline static let parent: JSString = "parent" + @usableFromInline static let parentElement: JSString = "parentElement" + @usableFromInline static let parentNode: JSString = "parentNode" + @usableFromInline static let parseFromString: JSString = "parseFromString" + @usableFromInline static let passive: JSString = "passive" @usableFromInline static let password: JSString = "password" @usableFromInline static let pathname: JSString = "pathname" + @usableFromInline static let pattern: JSString = "pattern" + @usableFromInline static let patternMismatch: JSString = "patternMismatch" + @usableFromInline static let pause: JSString = "pause" + @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" + @usableFromInline static let paused: JSString = "paused" + @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" + @usableFromInline static let pending: JSString = "pending" + @usableFromInline static let performance: JSString = "performance" + @usableFromInline static let persist: JSString = "persist" + @usableFromInline static let persisted: JSString = "persisted" + @usableFromInline static let personalbar: JSString = "personalbar" + @usableFromInline static let phase: JSString = "phase" + @usableFromInline static let ping: JSString = "ping" + @usableFromInline static let pipeThrough: JSString = "pipeThrough" + @usableFromInline static let pipeTo: JSString = "pipeTo" + @usableFromInline static let placeholder: JSString = "placeholder" + @usableFromInline static let platform: JSString = "platform" + @usableFromInline static let play: JSString = "play" + @usableFromInline static let playState: JSString = "playState" + @usableFromInline static let playbackRate: JSString = "playbackRate" + @usableFromInline static let played: JSString = "played" + @usableFromInline static let playsInline: JSString = "playsInline" + @usableFromInline static let plugins: JSString = "plugins" + @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" @usableFromInline static let port: JSString = "port" + @usableFromInline static let port1: JSString = "port1" + @usableFromInline static let port2: JSString = "port2" + @usableFromInline static let ports: JSString = "ports" + @usableFromInline static let position: JSString = "position" + @usableFromInline static let postMessage: JSString = "postMessage" + @usableFromInline static let poster: JSString = "poster" + @usableFromInline static let preMultiplySelf: JSString = "preMultiplySelf" + @usableFromInline static let prefix: JSString = "prefix" + @usableFromInline static let preload: JSString = "preload" + @usableFromInline static let preloadResponse: JSString = "preloadResponse" + @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" + @usableFromInline static let prepend: JSString = "prepend" + @usableFromInline static let preservesPitch: JSString = "preservesPitch" + @usableFromInline static let prevValue: JSString = "prevValue" + @usableFromInline static let preventAbort: JSString = "preventAbort" + @usableFromInline static let preventCancel: JSString = "preventCancel" + @usableFromInline static let preventClose: JSString = "preventClose" + @usableFromInline static let preventDefault: JSString = "preventDefault" + @usableFromInline static let preventScroll: JSString = "preventScroll" + @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" + @usableFromInline static let previousNode: JSString = "previousNode" + @usableFromInline static let previousSibling: JSString = "previousSibling" + @usableFromInline static let print: JSString = "print" + @usableFromInline static let product: JSString = "product" + @usableFromInline static let productSub: JSString = "productSub" + @usableFromInline static let progress: JSString = "progress" + @usableFromInline static let promise: JSString = "promise" + @usableFromInline static let prompt: JSString = "prompt" @usableFromInline static let `protocol`: JSString = "protocol" + @usableFromInline static let pseudoElement: JSString = "pseudoElement" + @usableFromInline static let publicId: JSString = "publicId" + @usableFromInline static let pull: JSString = "pull" + @usableFromInline static let pushState: JSString = "pushState" + @usableFromInline static let put: JSString = "put" + @usableFromInline static let putImageData: JSString = "putImageData" + @usableFromInline static let quadraticCurveTo: JSString = "quadraticCurveTo" + @usableFromInline static let quality: JSString = "quality" + @usableFromInline static let queryCommandEnabled: JSString = "queryCommandEnabled" + @usableFromInline static let queryCommandIndeterm: JSString = "queryCommandIndeterm" + @usableFromInline static let queryCommandState: JSString = "queryCommandState" + @usableFromInline static let queryCommandSupported: JSString = "queryCommandSupported" + @usableFromInline static let queryCommandValue: JSString = "queryCommandValue" + @usableFromInline static let querySelector: JSString = "querySelector" + @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" + @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" + @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" + @usableFromInline static let read: JSString = "read" @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" @usableFromInline static let readAsText: JSString = "readAsText" + @usableFromInline static let readOnly: JSString = "readOnly" + @usableFromInline static let readable: JSString = "readable" + @usableFromInline static let readableType: JSString = "readableType" + @usableFromInline static let ready: JSString = "ready" @usableFromInline static let readyState: JSString = "readyState" + @usableFromInline static let reason: JSString = "reason" + @usableFromInline static let rect: JSString = "rect" + @usableFromInline static let redirect: JSString = "redirect" + @usableFromInline static let redirected: JSString = "redirected" + @usableFromInline static let referenceNode: JSString = "referenceNode" + @usableFromInline static let referrer: JSString = "referrer" + @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" + @usableFromInline static let refresh: JSString = "refresh" + @usableFromInline static let register: JSString = "register" + @usableFromInline static let registerProtocolHandler: JSString = "registerProtocolHandler" + @usableFromInline static let rel: JSString = "rel" + @usableFromInline static let relList: JSString = "relList" + @usableFromInline static let relatedNode: JSString = "relatedNode" + @usableFromInline static let relatedTarget: JSString = "relatedTarget" + @usableFromInline static let releaseEvents: JSString = "releaseEvents" + @usableFromInline static let releaseLock: JSString = "releaseLock" + @usableFromInline static let reload: JSString = "reload" + @usableFromInline static let remove: JSString = "remove" + @usableFromInline static let removeAttribute: JSString = "removeAttribute" + @usableFromInline static let removeAttributeNS: JSString = "removeAttributeNS" + @usableFromInline static let removeAttributeNode: JSString = "removeAttributeNode" + @usableFromInline static let removeChild: JSString = "removeChild" + @usableFromInline static let removeCue: JSString = "removeCue" + @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" + @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" + @usableFromInline static let removeParameter: JSString = "removeParameter" + @usableFromInline static let removedNodes: JSString = "removedNodes" + @usableFromInline static let `repeat`: JSString = "repeat" + @usableFromInline static let replace: JSString = "replace" + @usableFromInline static let replaceChild: JSString = "replaceChild" + @usableFromInline static let replaceChildren: JSString = "replaceChildren" + @usableFromInline static let replaceData: JSString = "replaceData" + @usableFromInline static let replaceState: JSString = "replaceState" + @usableFromInline static let replaceWith: JSString = "replaceWith" + @usableFromInline static let replacesClientId: JSString = "replacesClientId" + @usableFromInline static let reportError: JSString = "reportError" + @usableFromInline static let reportValidity: JSString = "reportValidity" + @usableFromInline static let request: JSString = "request" + @usableFromInline static let requestSubmit: JSString = "requestSubmit" + @usableFromInline static let required: JSString = "required" + @usableFromInline static let reset: JSString = "reset" + @usableFromInline static let resetTransform: JSString = "resetTransform" + @usableFromInline static let resizeHeight: JSString = "resizeHeight" + @usableFromInline static let resizeQuality: JSString = "resizeQuality" + @usableFromInline static let resizeWidth: JSString = "resizeWidth" + @usableFromInline static let respond: JSString = "respond" + @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" + @usableFromInline static let response: JSString = "response" + @usableFromInline static let responseText: JSString = "responseText" + @usableFromInline static let responseType: JSString = "responseType" + @usableFromInline static let responseURL: JSString = "responseURL" + @usableFromInline static let responseXML: JSString = "responseXML" + @usableFromInline static let restore: JSString = "restore" @usableFromInline static let result: JSString = "result" + @usableFromInline static let resultType: JSString = "resultType" + @usableFromInline static let resultingClientId: JSString = "resultingClientId" + @usableFromInline static let returnValue: JSString = "returnValue" + @usableFromInline static let rev: JSString = "rev" + @usableFromInline static let reverse: JSString = "reverse" + @usableFromInline static let reversed: JSString = "reversed" @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" + @usableFromInline static let right: JSString = "right" + @usableFromInline static let role: JSString = "role" + @usableFromInline static let root: JSString = "root" + @usableFromInline static let rotate: JSString = "rotate" + @usableFromInline static let rotateAxisAngle: JSString = "rotateAxisAngle" + @usableFromInline static let rotateAxisAngleSelf: JSString = "rotateAxisAngleSelf" + @usableFromInline static let rotateFromVector: JSString = "rotateFromVector" + @usableFromInline static let rotateFromVectorSelf: JSString = "rotateFromVectorSelf" + @usableFromInline static let rotateSelf: JSString = "rotateSelf" + @usableFromInline static let roundRect: JSString = "roundRect" + @usableFromInline static let rowIndex: JSString = "rowIndex" + @usableFromInline static let rowSpan: JSString = "rowSpan" + @usableFromInline static let rows: JSString = "rows" + @usableFromInline static let rules: JSString = "rules" + @usableFromInline static let sandbox: JSString = "sandbox" + @usableFromInline static let save: JSString = "save" + @usableFromInline static let scale: JSString = "scale" + @usableFromInline static let scale3d: JSString = "scale3d" + @usableFromInline static let scale3dSelf: JSString = "scale3dSelf" + @usableFromInline static let scaleNonUniform: JSString = "scaleNonUniform" + @usableFromInline static let scaleSelf: JSString = "scaleSelf" + @usableFromInline static let scheme: JSString = "scheme" + @usableFromInline static let scope: JSString = "scope" + @usableFromInline static let screenX: JSString = "screenX" + @usableFromInline static let screenY: JSString = "screenY" + @usableFromInline static let scriptURL: JSString = "scriptURL" + @usableFromInline static let scripts: JSString = "scripts" + @usableFromInline static let scrollAmount: JSString = "scrollAmount" + @usableFromInline static let scrollDelay: JSString = "scrollDelay" + @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" + @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" + @usableFromInline static let scrollbars: JSString = "scrollbars" + @usableFromInline static let scrolling: JSString = "scrolling" @usableFromInline static let search: JSString = "search" @usableFromInline static let searchParams: JSString = "searchParams" + @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" + @usableFromInline static let seekable: JSString = "seekable" + @usableFromInline static let seeking: JSString = "seeking" + @usableFromInline static let select: JSString = "select" + @usableFromInline static let selectNode: JSString = "selectNode" + @usableFromInline static let selectNodeContents: JSString = "selectNodeContents" + @usableFromInline static let selected: JSString = "selected" + @usableFromInline static let selectedIndex: JSString = "selectedIndex" + @usableFromInline static let selectedOptions: JSString = "selectedOptions" + @usableFromInline static let selectionDirection: JSString = "selectionDirection" + @usableFromInline static let selectionEnd: JSString = "selectionEnd" + @usableFromInline static let selectionStart: JSString = "selectionStart" + @usableFromInline static let send: JSString = "send" + @usableFromInline static let serviceWorker: JSString = "serviceWorker" + @usableFromInline static let sessionStorage: JSString = "sessionStorage" @usableFromInline static let set: JSString = "set" + @usableFromInline static let setAttribute: JSString = "setAttribute" + @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" + @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" + @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" + @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" + @usableFromInline static let setData: JSString = "setData" + @usableFromInline static let setDragImage: JSString = "setDragImage" + @usableFromInline static let setEnd: JSString = "setEnd" + @usableFromInline static let setEndAfter: JSString = "setEndAfter" + @usableFromInline static let setEndBefore: JSString = "setEndBefore" + @usableFromInline static let setFormValue: JSString = "setFormValue" + @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" + @usableFromInline static let setInterval: JSString = "setInterval" + @usableFromInline static let setKeyframes: JSString = "setKeyframes" + @usableFromInline static let setLineDash: JSString = "setLineDash" + @usableFromInline static let setMatrixValue: JSString = "setMatrixValue" + @usableFromInline static let setNamedItem: JSString = "setNamedItem" + @usableFromInline static let setNamedItemNS: JSString = "setNamedItemNS" + @usableFromInline static let setParameter: JSString = "setParameter" + @usableFromInline static let setRangeText: JSString = "setRangeText" + @usableFromInline static let setRequestHeader: JSString = "setRequestHeader" + @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" + @usableFromInline static let setStart: JSString = "setStart" + @usableFromInline static let setStartAfter: JSString = "setStartAfter" + @usableFromInline static let setStartBefore: JSString = "setStartBefore" + @usableFromInline static let setTimeout: JSString = "setTimeout" + @usableFromInline static let setTransform: JSString = "setTransform" + @usableFromInline static let setValidity: JSString = "setValidity" + @usableFromInline static let shadowBlur: JSString = "shadowBlur" + @usableFromInline static let shadowColor: JSString = "shadowColor" + @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" + @usableFromInline static let shadowOffsetY: JSString = "shadowOffsetY" + @usableFromInline static let shadowRoot: JSString = "shadowRoot" + @usableFromInline static let shape: JSString = "shape" + @usableFromInline static let shiftKey: JSString = "shiftKey" + @usableFromInline static let show: JSString = "show" + @usableFromInline static let showModal: JSString = "showModal" + @usableFromInline static let showPicker: JSString = "showPicker" + @usableFromInline static let signal: JSString = "signal" + @usableFromInline static let singleNodeValue: JSString = "singleNodeValue" @usableFromInline static let size: JSString = "size" + @usableFromInline static let sizes: JSString = "sizes" + @usableFromInline static let skewX: JSString = "skewX" + @usableFromInline static let skewXSelf: JSString = "skewXSelf" + @usableFromInline static let skewY: JSString = "skewY" + @usableFromInline static let skewYSelf: JSString = "skewYSelf" @usableFromInline static let slice: JSString = "slice" + @usableFromInline static let slot: JSString = "slot" + @usableFromInline static let slotAssignment: JSString = "slotAssignment" + @usableFromInline static let snapshotItem: JSString = "snapshotItem" + @usableFromInline static let snapshotLength: JSString = "snapshotLength" @usableFromInline static let sort: JSString = "sort" + @usableFromInline static let source: JSString = "source" + @usableFromInline static let span: JSString = "span" + @usableFromInline static let specified: JSString = "specified" + @usableFromInline static let spellcheck: JSString = "spellcheck" + @usableFromInline static let splitText: JSString = "splitText" + @usableFromInline static let src: JSString = "src" + @usableFromInline static let srcElement: JSString = "srcElement" + @usableFromInline static let srcdoc: JSString = "srcdoc" + @usableFromInline static let srclang: JSString = "srclang" + @usableFromInline static let srcset: JSString = "srcset" + @usableFromInline static let standby: JSString = "standby" + @usableFromInline static let start: JSString = "start" + @usableFromInline static let startContainer: JSString = "startContainer" + @usableFromInline static let startMessages: JSString = "startMessages" + @usableFromInline static let startOffset: JSString = "startOffset" + @usableFromInline static let startTime: JSString = "startTime" + @usableFromInline static let state: JSString = "state" + @usableFromInline static let status: JSString = "status" + @usableFromInline static let statusText: JSString = "statusText" + @usableFromInline static let statusbar: JSString = "statusbar" + @usableFromInline static let step: JSString = "step" + @usableFromInline static let stepDown: JSString = "stepDown" + @usableFromInline static let stepMismatch: JSString = "stepMismatch" + @usableFromInline static let stepUp: JSString = "stepUp" + @usableFromInline static let stop: JSString = "stop" + @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" + @usableFromInline static let stopPropagation: JSString = "stopPropagation" + @usableFromInline static let storageArea: JSString = "storageArea" + @usableFromInline static let stringValue: JSString = "stringValue" + @usableFromInline static let stroke: JSString = "stroke" + @usableFromInline static let strokeRect: JSString = "strokeRect" + @usableFromInline static let strokeStyle: JSString = "strokeStyle" + @usableFromInline static let strokeText: JSString = "strokeText" + @usableFromInline static let structuredClone: JSString = "structuredClone" + @usableFromInline static let submit: JSString = "submit" + @usableFromInline static let submitter: JSString = "submitter" + @usableFromInline static let substringData: JSString = "substringData" + @usableFromInline static let subtree: JSString = "subtree" + @usableFromInline static let suffixes: JSString = "suffixes" + @usableFromInline static let summary: JSString = "summary" + @usableFromInline static let supports: JSString = "supports" + @usableFromInline static let surroundContents: JSString = "surroundContents" + @usableFromInline static let systemId: JSString = "systemId" + @usableFromInline static let tBodies: JSString = "tBodies" + @usableFromInline static let tFoot: JSString = "tFoot" + @usableFromInline static let tHead: JSString = "tHead" + @usableFromInline static let tabIndex: JSString = "tabIndex" @usableFromInline static let table: JSString = "table" + @usableFromInline static let tagName: JSString = "tagName" + @usableFromInline static let taintEnabled: JSString = "taintEnabled" + @usableFromInline static let takeRecords: JSString = "takeRecords" + @usableFromInline static let target: JSString = "target" + @usableFromInline static let targetOrigin: JSString = "targetOrigin" + @usableFromInline static let tee: JSString = "tee" + @usableFromInline static let terminate: JSString = "terminate" @usableFromInline static let text: JSString = "text" + @usableFromInline static let textAlign: JSString = "textAlign" + @usableFromInline static let textBaseline: JSString = "textBaseline" + @usableFromInline static let textContent: JSString = "textContent" + @usableFromInline static let textLength: JSString = "textLength" + @usableFromInline static let textRendering: JSString = "textRendering" + @usableFromInline static let textTracks: JSString = "textTracks" + @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" @usableFromInline static let time: JSString = "time" @usableFromInline static let timeEnd: JSString = "timeEnd" @usableFromInline static let timeLog: JSString = "timeLog" + @usableFromInline static let timeOrigin: JSString = "timeOrigin" + @usableFromInline static let timeStamp: JSString = "timeStamp" + @usableFromInline static let timeline: JSString = "timeline" + @usableFromInline static let timeout: JSString = "timeout" + @usableFromInline static let title: JSString = "title" + @usableFromInline static let toDataURL: JSString = "toDataURL" + @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" + @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" @usableFromInline static let toJSON: JSString = "toJSON" @usableFromInline static let toString: JSString = "toString" + @usableFromInline static let toggle: JSString = "toggle" + @usableFromInline static let toggleAttribute: JSString = "toggleAttribute" + @usableFromInline static let tooLong: JSString = "tooLong" + @usableFromInline static let tooShort: JSString = "tooShort" + @usableFromInline static let toolbar: JSString = "toolbar" + @usableFromInline static let top: JSString = "top" + @usableFromInline static let total: JSString = "total" @usableFromInline static let trace: JSString = "trace" + @usableFromInline static let track: JSString = "track" + @usableFromInline static let transfer: JSString = "transfer" + @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" + @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" + @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" + @usableFromInline static let transform: JSString = "transform" + @usableFromInline static let transformPoint: JSString = "transformPoint" + @usableFromInline static let transformToDocument: JSString = "transformToDocument" + @usableFromInline static let transformToFragment: JSString = "transformToFragment" + @usableFromInline static let translate: JSString = "translate" + @usableFromInline static let translateSelf: JSString = "translateSelf" + @usableFromInline static let trueSpeed: JSString = "trueSpeed" @usableFromInline static let type: JSString = "type" + @usableFromInline static let typeMismatch: JSString = "typeMismatch" + @usableFromInline static let types: JSString = "types" + @usableFromInline static let unregister: JSString = "unregister" + @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" + @usableFromInline static let update: JSString = "update" + @usableFromInline static let updatePlaybackRate: JSString = "updatePlaybackRate" + @usableFromInline static let updateTiming: JSString = "updateTiming" + @usableFromInline static let updateViaCache: JSString = "updateViaCache" + @usableFromInline static let upgrade: JSString = "upgrade" + @usableFromInline static let upload: JSString = "upload" + @usableFromInline static let url: JSString = "url" + @usableFromInline static let useMap: JSString = "useMap" + @usableFromInline static let userAgent: JSString = "userAgent" @usableFromInline static let username: JSString = "username" + @usableFromInline static let vAlign: JSString = "vAlign" + @usableFromInline static let vLink: JSString = "vLink" + @usableFromInline static let valid: JSString = "valid" + @usableFromInline static let validationMessage: JSString = "validationMessage" + @usableFromInline static let validity: JSString = "validity" + @usableFromInline static let value: JSString = "value" + @usableFromInline static let valueAsDate: JSString = "valueAsDate" + @usableFromInline static let valueAsNumber: JSString = "valueAsNumber" + @usableFromInline static let valueMissing: JSString = "valueMissing" + @usableFromInline static let valueType: JSString = "valueType" + @usableFromInline static let vendor: JSString = "vendor" + @usableFromInline static let vendorSub: JSString = "vendorSub" + @usableFromInline static let version: JSString = "version" + @usableFromInline static let videoHeight: JSString = "videoHeight" + @usableFromInline static let videoTracks: JSString = "videoTracks" + @usableFromInline static let videoWidth: JSString = "videoWidth" + @usableFromInline static let view: JSString = "view" + @usableFromInline static let visibilityState: JSString = "visibilityState" + @usableFromInline static let visible: JSString = "visible" + @usableFromInline static let vlinkColor: JSString = "vlinkColor" + @usableFromInline static let volume: JSString = "volume" + @usableFromInline static let vspace: JSString = "vspace" + @usableFromInline static let w: JSString = "w" + @usableFromInline static let waiting: JSString = "waiting" @usableFromInline static let warn: JSString = "warn" + @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" + @usableFromInline static let whatToShow: JSString = "whatToShow" + @usableFromInline static let whenDefined: JSString = "whenDefined" + @usableFromInline static let which: JSString = "which" + @usableFromInline static let wholeText: JSString = "wholeText" + @usableFromInline static let width: JSString = "width" + @usableFromInline static let willReadFrequently: JSString = "willReadFrequently" + @usableFromInline static let willValidate: JSString = "willValidate" + @usableFromInline static let window: JSString = "window" + @usableFromInline static let withCredentials: JSString = "withCredentials" + @usableFromInline static let wordSpacing: JSString = "wordSpacing" + @usableFromInline static let wrap: JSString = "wrap" + @usableFromInline static let writable: JSString = "writable" + @usableFromInline static let writableType: JSString = "writableType" + @usableFromInline static let write: JSString = "write" + @usableFromInline static let writeln: JSString = "writeln" + @usableFromInline static let x: JSString = "x" + @usableFromInline static let y: JSString = "y" + @usableFromInline static let z: JSString = "z" } diff --git a/Sources/DOMKitConsole/DOMKitConsole.swift b/Sources/DOMKitConsole/DOMKitConsole.swift deleted file mode 100644 index 1bc9b851..00000000 --- a/Sources/DOMKitConsole/DOMKitConsole.swift +++ /dev/null @@ -1,133 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import ECMAScript -import JavaScriptEventLoop -import JavaScriptKit - -public enum console { - @inlinable public static var jsObject: JSObject { - JSObject.global[Strings.console].object! - } - - @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func clear() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public static func debug(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func error(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func info(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func log(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) - } - - @inlinable public static func trace(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func warn(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) - } - - @inlinable public static func dirxml(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func count(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func countReset(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func group(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupCollapsed(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupEnd() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupEnd].function!(this: this, arguments: []) - } - - @inlinable public static func time(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func timeEnd(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } -} - -/* variadic generics please */ - -@usableFromInline enum Strings { - static let _self: JSString = "self" - @usableFromInline static let assert: JSString = "assert" - @usableFromInline static let clear: JSString = "clear" - @usableFromInline static let console: JSString = "console" - @usableFromInline static let count: JSString = "count" - @usableFromInline static let countReset: JSString = "countReset" - @usableFromInline static let debug: JSString = "debug" - @usableFromInline static let dir: JSString = "dir" - @usableFromInline static let dirxml: JSString = "dirxml" - @usableFromInline static let error: JSString = "error" - @usableFromInline static let group: JSString = "group" - @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" - @usableFromInline static let groupEnd: JSString = "groupEnd" - @usableFromInline static let info: JSString = "info" - @usableFromInline static let log: JSString = "log" - @usableFromInline static let table: JSString = "table" - @usableFromInline static let time: JSString = "time" - @usableFromInline static let timeEnd: JSString = "timeEnd" - @usableFromInline static let timeLog: JSString = "timeLog" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let trace: JSString = "trace" - @usableFromInline static let warn: JSString = "warn" -} diff --git a/Sources/DOMKitFetch/DOMKitFetch.swift b/Sources/DOMKitFetch/DOMKitFetch.swift deleted file mode 100644 index 2b79e6a1..00000000 --- a/Sources/DOMKitFetch/DOMKitFetch.swift +++ /dev/null @@ -1,721 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Body: JSBridgedClass {} -public extension Body { - // XXX: attribute 'body' is ignored - - @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } - - @inlinable func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func blob() -> JSPromise { - let this = jsObject - return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func blob() async throws -> Blob { - let this = jsObject - let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func formData() -> JSPromise { - let this = jsObject - return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func formData() async throws -> FormData { - let this = jsObject - let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func json() -> JSPromise { - let this = jsObject - return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func json() async throws -> JSValue { - let this = jsObject - let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class Headers: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Headers].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(init: HeadersInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } -} - -public class Request: JSBridgedClass, Body { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Request].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _method = ReadonlyAttribute(jsObject: jsObject, name: Strings.method) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) - _destination = ReadonlyAttribute(jsObject: jsObject, name: Strings.destination) - _referrer = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrer) - _referrerPolicy = ReadonlyAttribute(jsObject: jsObject, name: Strings.referrerPolicy) - _mode = ReadonlyAttribute(jsObject: jsObject, name: Strings.mode) - _credentials = ReadonlyAttribute(jsObject: jsObject, name: Strings.credentials) - _cache = ReadonlyAttribute(jsObject: jsObject, name: Strings.cache) - _redirect = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirect) - _integrity = ReadonlyAttribute(jsObject: jsObject, name: Strings.integrity) - _keepalive = ReadonlyAttribute(jsObject: jsObject, name: Strings.keepalive) - _isReloadNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isReloadNavigation) - _isHistoryNavigation = ReadonlyAttribute(jsObject: jsObject, name: Strings.isHistoryNavigation) - _signal = ReadonlyAttribute(jsObject: jsObject, name: Strings.signal) - self.jsObject = jsObject - } - - @inlinable public convenience init(input: RequestInfo, init: RequestInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [input.jsValue, `init`?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var method: String - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var headers: Headers - - @ReadonlyAttribute - public var destination: RequestDestination - - @ReadonlyAttribute - public var referrer: String - - @ReadonlyAttribute - public var referrerPolicy: ReferrerPolicy - - @ReadonlyAttribute - public var mode: RequestMode - - @ReadonlyAttribute - public var credentials: RequestCredentials - - @ReadonlyAttribute - public var cache: RequestCache - - @ReadonlyAttribute - public var redirect: RequestRedirect - - @ReadonlyAttribute - public var integrity: String - - @ReadonlyAttribute - public var keepalive: Bool - - @ReadonlyAttribute - public var isReloadNavigation: Bool - - @ReadonlyAttribute - public var isHistoryNavigation: Bool - - @ReadonlyAttribute - public var signal: AbortSignal - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } -} - -public enum RequestCache: JSString, JSValueCompatible { - case `default` = "default" - case noStore = "no-store" - case reload = "reload" - case noCache = "no-cache" - case forceCache = "force-cache" - case onlyIfCached = "only-if-cached" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum RequestCredentials: JSString, JSValueCompatible { - case omit = "omit" - case sameOrigin = "same-origin" - case include = "include" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum RequestDestination: JSString, JSValueCompatible { - case _empty = "" - case audio = "audio" - case audioworklet = "audioworklet" - case document = "document" - case embed = "embed" - case font = "font" - case frame = "frame" - case iframe = "iframe" - case image = "image" - case manifest = "manifest" - case object = "object" - case paintworklet = "paintworklet" - case report = "report" - case script = "script" - case sharedworker = "sharedworker" - case style = "style" - case track = "track" - case video = "video" - case worker = "worker" - case xslt = "xslt" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class RequestInit: BridgedDictionary { - public convenience init(method: String, headers: HeadersInit, body: BodyInit?, referrer: String, referrerPolicy: ReferrerPolicy, mode: RequestMode, credentials: RequestCredentials, cache: RequestCache, redirect: RequestRedirect, integrity: String, keepalive: Bool, signal: AbortSignal?, window: JSValue) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.method] = method.jsValue - object[Strings.headers] = headers.jsValue - object[Strings.body] = body.jsValue - object[Strings.referrer] = referrer.jsValue - object[Strings.referrerPolicy] = referrerPolicy.jsValue - object[Strings.mode] = mode.jsValue - object[Strings.credentials] = credentials.jsValue - object[Strings.cache] = cache.jsValue - object[Strings.redirect] = redirect.jsValue - object[Strings.integrity] = integrity.jsValue - object[Strings.keepalive] = keepalive.jsValue - object[Strings.signal] = signal.jsValue - object[Strings.window] = window.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _method = ReadWriteAttribute(jsObject: object, name: Strings.method) - _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) - _body = ReadWriteAttribute(jsObject: object, name: Strings.body) - _referrer = ReadWriteAttribute(jsObject: object, name: Strings.referrer) - _referrerPolicy = ReadWriteAttribute(jsObject: object, name: Strings.referrerPolicy) - _mode = ReadWriteAttribute(jsObject: object, name: Strings.mode) - _credentials = ReadWriteAttribute(jsObject: object, name: Strings.credentials) - _cache = ReadWriteAttribute(jsObject: object, name: Strings.cache) - _redirect = ReadWriteAttribute(jsObject: object, name: Strings.redirect) - _integrity = ReadWriteAttribute(jsObject: object, name: Strings.integrity) - _keepalive = ReadWriteAttribute(jsObject: object, name: Strings.keepalive) - _signal = ReadWriteAttribute(jsObject: object, name: Strings.signal) - _window = ReadWriteAttribute(jsObject: object, name: Strings.window) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var method: String - - @ReadWriteAttribute - public var headers: HeadersInit - - @ReadWriteAttribute - public var body: BodyInit? - - @ReadWriteAttribute - public var referrer: String - - @ReadWriteAttribute - public var referrerPolicy: ReferrerPolicy - - @ReadWriteAttribute - public var mode: RequestMode - - @ReadWriteAttribute - public var credentials: RequestCredentials - - @ReadWriteAttribute - public var cache: RequestCache - - @ReadWriteAttribute - public var redirect: RequestRedirect - - @ReadWriteAttribute - public var integrity: String - - @ReadWriteAttribute - public var keepalive: Bool - - @ReadWriteAttribute - public var signal: AbortSignal? - - @ReadWriteAttribute - public var window: JSValue -} - -public enum RequestMode: JSString, JSValueCompatible { - case navigate = "navigate" - case sameOrigin = "same-origin" - case noCors = "no-cors" - case cors = "cors" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum RequestRedirect: JSString, JSValueCompatible { - case follow = "follow" - case error = "error" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class Response: JSBridgedClass, Body { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Response].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _url = ReadonlyAttribute(jsObject: jsObject, name: Strings.url) - _redirected = ReadonlyAttribute(jsObject: jsObject, name: Strings.redirected) - _status = ReadonlyAttribute(jsObject: jsObject, name: Strings.status) - _ok = ReadonlyAttribute(jsObject: jsObject, name: Strings.ok) - _statusText = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusText) - _headers = ReadonlyAttribute(jsObject: jsObject, name: Strings.headers) - self.jsObject = jsObject - } - - @inlinable public convenience init(body: BodyInit? = nil, init: ResponseInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [body?.jsValue ?? .undefined, `init`?.jsValue ?? .undefined])) - } - - @inlinable public static func error() -> Self { - let this = constructor - return this[Strings.error].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public static func redirect(url: String, status: UInt16? = nil) -> Self { - let this = constructor - return this[Strings.redirect].function!(this: this, arguments: [url.jsValue, status?.jsValue ?? .undefined]).fromJSValue()! - } - - @ReadonlyAttribute - public var type: ResponseType - - @ReadonlyAttribute - public var url: String - - @ReadonlyAttribute - public var redirected: Bool - - @ReadonlyAttribute - public var status: UInt16 - - @ReadonlyAttribute - public var ok: Bool - - @ReadonlyAttribute - public var statusText: String - - @ReadonlyAttribute - public var headers: Headers - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class ResponseInit: BridgedDictionary { - public convenience init(status: UInt16, statusText: String, headers: HeadersInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.status] = status.jsValue - object[Strings.statusText] = statusText.jsValue - object[Strings.headers] = headers.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _status = ReadWriteAttribute(jsObject: object, name: Strings.status) - _statusText = ReadWriteAttribute(jsObject: object, name: Strings.statusText) - _headers = ReadWriteAttribute(jsObject: object, name: Strings.headers) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var status: UInt16 - - @ReadWriteAttribute - public var statusText: String - - @ReadWriteAttribute - public var headers: HeadersInit -} - -public enum ResponseType: JSString, JSValueCompatible { - case basic = "basic" - case cors = "cors" - case `default` = "default" - case error = "error" - case opaque = "opaque" - case opaqueredirect = "opaqueredirect" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol WindowOrWorkerGlobalScope: JSBridgedClass {} -public extension WindowOrWorkerGlobalScope { - @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) -> JSPromise { - let this = jsObject - return this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func fetch(input: RequestInfo, init: RequestInit? = nil) async throws -> Response { - let this = jsObject - let _promise: JSPromise = this[Strings.fetch].function!(this: this, arguments: [input.jsValue, `init`?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -/* variadic generics please */ - -@usableFromInline enum Strings { - static let _self: JSString = "self" - @usableFromInline static let Headers: JSString = "Headers" - @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let Request: JSString = "Request" - @usableFromInline static let Response: JSString = "Response" - @usableFromInline static let append: JSString = "append" - @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" - @usableFromInline static let blob: JSString = "blob" - @usableFromInline static let body: JSString = "body" - @usableFromInline static let bodyUsed: JSString = "bodyUsed" - @usableFromInline static let cache: JSString = "cache" - @usableFromInline static let clone: JSString = "clone" - @usableFromInline static let credentials: JSString = "credentials" - @usableFromInline static let delete: JSString = "delete" - @usableFromInline static let destination: JSString = "destination" - @usableFromInline static let error: JSString = "error" - @usableFromInline static let fetch: JSString = "fetch" - @usableFromInline static let formData: JSString = "formData" - @usableFromInline static let get: JSString = "get" - @usableFromInline static let has: JSString = "has" - @usableFromInline static let headers: JSString = "headers" - @usableFromInline static let integrity: JSString = "integrity" - @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" - @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" - @usableFromInline static let json: JSString = "json" - @usableFromInline static let keepalive: JSString = "keepalive" - @usableFromInline static let method: JSString = "method" - @usableFromInline static let mode: JSString = "mode" - @usableFromInline static let ok: JSString = "ok" - @usableFromInline static let redirect: JSString = "redirect" - @usableFromInline static let redirected: JSString = "redirected" - @usableFromInline static let referrer: JSString = "referrer" - @usableFromInline static let referrerPolicy: JSString = "referrerPolicy" - @usableFromInline static let set: JSString = "set" - @usableFromInline static let signal: JSString = "signal" - @usableFromInline static let status: JSString = "status" - @usableFromInline static let statusText: JSString = "statusText" - @usableFromInline static let text: JSString = "text" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let type: JSString = "type" - @usableFromInline static let url: JSString = "url" - @usableFromInline static let window: JSString = "window" -} - -public protocol Any_HeadersInit: ConvertibleToJSValue {} -extension Dictionary: Any_HeadersInit where Key == String, Value == String {} -extension Array: Any_HeadersInit where Element == [String] {} - -public enum HeadersInit: JSValueCompatible, Any_HeadersInit { - case record_String_to_String([String: String]) - case seq_of_seq_of_String([[String]]) - - var record_String_to_String: [String: String]? { - switch self { - case let .record_String_to_String(record_String_to_String): return record_String_to_String - default: return nil - } - } - - var seq_of_seq_of_String: [[String]]? { - switch self { - case let .seq_of_seq_of_String(seq_of_seq_of_String): return seq_of_seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let record_String_to_String: [String: String] = value.fromJSValue() { - return .record_String_to_String(record_String_to_String) - } - if let seq_of_seq_of_String: [[String]] = value.fromJSValue() { - return .seq_of_seq_of_String(seq_of_seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .record_String_to_String(record_String_to_String): - return record_String_to_String.jsValue - case let .seq_of_seq_of_String(seq_of_seq_of_String): - return seq_of_seq_of_String.jsValue - } - } -} - -public protocol Any_RequestInfo: ConvertibleToJSValue {} -extension Request: Any_RequestInfo {} -extension String: Any_RequestInfo {} - -public enum RequestInfo: JSValueCompatible, Any_RequestInfo { - case request(Request) - case string(String) - - var request: Request? { - switch self { - case let .request(request): return request - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let request: Request = value.fromJSValue() { - return .request(request) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .request(request): - return request.jsValue - case let .string(string): - return string.jsValue - } - } -} - -public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} -extension Blob: Any_XMLHttpRequestBodyInit {} -extension BufferSource: Any_XMLHttpRequestBodyInit {} -extension FormData: Any_XMLHttpRequestBodyInit {} -extension String: Any_XMLHttpRequestBodyInit {} -extension URLSearchParams: Any_XMLHttpRequestBodyInit {} - -public enum XMLHttpRequestBodyInit: JSValueCompatible, Any_XMLHttpRequestBodyInit { - case blob(Blob) - case bufferSource(BufferSource) - case formData(FormData) - case string(String) - case urlSearchParams(URLSearchParams) - - var blob: Blob? { - switch self { - case let .blob(blob): return blob - default: return nil - } - } - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var formData: FormData? { - switch self { - case let .formData(formData): return formData - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var urlSearchParams: URLSearchParams? { - switch self { - case let .urlSearchParams(urlSearchParams): return urlSearchParams - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let blob: Blob = value.fromJSValue() { - return .blob(blob) - } - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - if let urlSearchParams: URLSearchParams = value.fromJSValue() { - return .urlSearchParams(urlSearchParams) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .blob(blob): - return blob.jsValue - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue - case let .urlSearchParams(urlSearchParams): - return urlSearchParams.jsValue - } - } -} diff --git a/Sources/DOMKitFetch/Support.swift b/Sources/DOMKitFetch/Support.swift deleted file mode 100644 index 2c2778f8..00000000 --- a/Sources/DOMKitFetch/Support.swift +++ /dev/null @@ -1,2 +0,0 @@ -@_exported import ECMAScript -@_exported import DOMKitHTML diff --git a/Sources/DOMKitFileAPI/DOMKitFileAPI.swift b/Sources/DOMKitFileAPI/DOMKitFileAPI.swift deleted file mode 100644 index 4c979a34..00000000 --- a/Sources/DOMKitFileAPI/DOMKitFileAPI.swift +++ /dev/null @@ -1,289 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import DOMKitWebIDL -import ECMAScript -import JavaScriptEventLoop -import JavaScriptKit - -public class Blob: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - self.jsObject = jsObject - } - - @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var size: UInt64 - - @ReadonlyAttribute - public var type: String - - @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { - let this = jsObject - return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! - } - - // XXX: member 'stream' is ignored - - @inlinable public func text() -> JSPromise { - let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} - -public class BlobPropertyBag: BridgedDictionary { - public convenience init(type: String, endings: EndingType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.endings] = endings.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var endings: EndingType -} - -public enum EndingType: JSString, JSValueCompatible { - case transparent = "transparent" - case native = "native" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class File: Blob { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.File].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _lastModified = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastModified) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(fileBits: [BlobPart], fileName: String, options: FilePropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [fileBits.jsValue, fileName.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var lastModified: Int64 -} - -public class FileList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.FileList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> File? { - jsObject[key].fromJSValue() - } - - @ReadonlyAttribute - public var length: UInt32 -} - -public class FilePropertyBag: BridgedDictionary { - public convenience init(lastModified: Int64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.lastModified] = lastModified.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _lastModified = ReadWriteAttribute(jsObject: object, name: Strings.lastModified) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var lastModified: Int64 -} - -public class FileReader: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.FileReader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _result = ReadonlyAttribute(jsObject: jsObject, name: Strings.result) - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - _onloadstart = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadstart) - _onprogress = ReadWriteAttribute(jsObject: jsObject, name: Strings.onprogress) - _onload = ReadWriteAttribute(jsObject: jsObject, name: Strings.onload) - _onabort = ReadWriteAttribute(jsObject: jsObject, name: Strings.onabort) - _onerror = ReadWriteAttribute(jsObject: jsObject, name: Strings.onerror) - _onloadend = ReadWriteAttribute(jsObject: jsObject, name: Strings.onloadend) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public func readAsArrayBuffer(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsArrayBuffer].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func readAsBinaryString(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsBinaryString].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func readAsText(blob: Blob, encoding: String? = nil) { - let this = jsObject - _ = this[Strings.readAsText].function!(this: this, arguments: [blob.jsValue, encoding?.jsValue ?? .undefined]) - } - - @inlinable public func readAsDataURL(blob: Blob) { - let this = jsObject - _ = this[Strings.readAsDataURL].function!(this: this, arguments: [blob.jsValue]) - } - - @inlinable public func abort() { - let this = jsObject - _ = this[Strings.abort].function!(this: this, arguments: []) - } - - public static let EMPTY: UInt16 = 0 - - public static let LOADING: UInt16 = 1 - - public static let DONE: UInt16 = 2 - - @ReadonlyAttribute - public var readyState: UInt16 - - @ReadonlyAttribute - public var result: JSValue? - - @ReadonlyAttribute - public var error: DOMException? - - @ReadWriteAttribute - public var onloadstart: EventHandler - - @ReadWriteAttribute - public var onprogress: EventHandler - - @ReadWriteAttribute - public var onload: EventHandler - - @ReadWriteAttribute - public var onabort: EventHandler - - @ReadWriteAttribute - public var onerror: EventHandler - - @ReadWriteAttribute - public var onloadend: EventHandler -} - -public class URL: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public static func createObjectURL(obj: JSValue) -> String { - let this = constructor - return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! - } - - @inlinable public static func revokeObjectURL(url: String) { - let this = constructor - _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) - } -} - -/* variadic generics please */ - -@usableFromInline enum Strings { - static let _self: JSString = "self" - @usableFromInline static let Blob: JSString = "Blob" - @usableFromInline static let File: JSString = "File" - @usableFromInline static let FileList: JSString = "FileList" - @usableFromInline static let FileReader: JSString = "FileReader" - @usableFromInline static let Object: JSString = "Object" - @usableFromInline static let URL: JSString = "URL" - @usableFromInline static let abort: JSString = "abort" - @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" - @usableFromInline static let createObjectURL: JSString = "createObjectURL" - @usableFromInline static let endings: JSString = "endings" - @usableFromInline static let error: JSString = "error" - @usableFromInline static let lastModified: JSString = "lastModified" - @usableFromInline static let length: JSString = "length" - @usableFromInline static let name: JSString = "name" - @usableFromInline static let onabort: JSString = "onabort" - @usableFromInline static let onerror: JSString = "onerror" - @usableFromInline static let onload: JSString = "onload" - @usableFromInline static let onloadend: JSString = "onloadend" - @usableFromInline static let onloadstart: JSString = "onloadstart" - @usableFromInline static let onprogress: JSString = "onprogress" - @usableFromInline static let readAsArrayBuffer: JSString = "readAsArrayBuffer" - @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" - @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" - @usableFromInline static let readAsText: JSString = "readAsText" - @usableFromInline static let readyState: JSString = "readyState" - @usableFromInline static let result: JSString = "result" - @usableFromInline static let revokeObjectURL: JSString = "revokeObjectURL" - @usableFromInline static let size: JSString = "size" - @usableFromInline static let slice: JSString = "slice" - @usableFromInline static let text: JSString = "text" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let type: JSString = "type" -} diff --git a/Sources/DOMKitFileAPI/Support.swift b/Sources/DOMKitFileAPI/Support.swift deleted file mode 100644 index c79d4add..00000000 --- a/Sources/DOMKitFileAPI/Support.swift +++ /dev/null @@ -1,16 +0,0 @@ -import JavaScriptKit - -public class EventTarget: JSBridgedClass { - public class var constructor: JSFunction { - JSObject.global["EventTarget"].function! - } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - -} -public typealias Blob_or_MediaSource = JSValue -public typealias EventHandler = JSValue diff --git a/Sources/DOMKitURL/DOMKitURL.swift b/Sources/DOMKitURL/DOMKitURL.swift deleted file mode 100644 index abcda9bd..00000000 --- a/Sources/DOMKitURL/DOMKitURL.swift +++ /dev/null @@ -1,159 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import ECMAScript -import JavaScriptEventLoop -import JavaScriptKit - -public class URL: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) - _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) - self.jsObject = jsObject - } - - @inlinable public convenience init(url: String, base: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) - } - - @ReadWriteAttribute - public var href: String - - @ReadonlyAttribute - public var origin: String - - @ReadWriteAttribute - public var `protocol`: String - - @ReadWriteAttribute - public var username: String - - @ReadWriteAttribute - public var password: String - - @ReadWriteAttribute - public var host: String - - @ReadWriteAttribute - public var hostname: String - - @ReadWriteAttribute - public var port: String - - @ReadWriteAttribute - public var pathname: String - - @ReadWriteAttribute - public var search: String - - @ReadonlyAttribute - public var searchParams: URLSearchParams - - @ReadWriteAttribute - public var hash: String - - @inlinable public func toJSON() -> String { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} - -public class URLSearchParams: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public convenience init(init: JSValue? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func delete(name: String) { - let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) - } - - @inlinable public func get(name: String) -> String? { - let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func getAll(name: String) -> [String] { - let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func has(name: String) -> Bool { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable public func set(name: String, value: String) { - let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } - - @inlinable public func sort() { - let this = jsObject - _ = this[Strings.sort].function!(this: this, arguments: []) - } - - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) - } - - @inlinable public var description: String { - jsObject[Strings.toString]!().fromJSValue()! - } -} - -/* variadic generics please */ - -@usableFromInline enum Strings { - static let _self: JSString = "self" - @usableFromInline static let URL: JSString = "URL" - @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" - @usableFromInline static let append: JSString = "append" - @usableFromInline static let delete: JSString = "delete" - @usableFromInline static let get: JSString = "get" - @usableFromInline static let getAll: JSString = "getAll" - @usableFromInline static let has: JSString = "has" - @usableFromInline static let hash: JSString = "hash" - @usableFromInline static let host: JSString = "host" - @usableFromInline static let hostname: JSString = "hostname" - @usableFromInline static let href: JSString = "href" - @usableFromInline static let origin: JSString = "origin" - @usableFromInline static let password: JSString = "password" - @usableFromInline static let pathname: JSString = "pathname" - @usableFromInline static let port: JSString = "port" - @usableFromInline static let `protocol`: JSString = "protocol" - @usableFromInline static let search: JSString = "search" - @usableFromInline static let searchParams: JSString = "searchParams" - @usableFromInline static let set: JSString = "set" - @usableFromInline static let sort: JSString = "sort" - @usableFromInline static let toJSON: JSString = "toJSON" - @usableFromInline static let toString: JSString = "toString" - @usableFromInline static let username: JSString = "username" -} diff --git a/Sources/DOMKitWebIDL/DOMKitWebIDL.swift b/Sources/DOMKitWebIDL/DOMKitWebIDL.swift deleted file mode 100644 index bf0c1eaf..00000000 --- a/Sources/DOMKitWebIDL/DOMKitWebIDL.swift +++ /dev/null @@ -1,156 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import ECMAScript -import JavaScriptEventLoop -import JavaScriptKit - -public class DOMException: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.DOMException].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) - _code = ReadonlyAttribute(jsObject: jsObject, name: Strings.code) - self.jsObject = jsObject - } - - @inlinable public convenience init(message: String? = nil, name: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [message?.jsValue ?? .undefined, name?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var name: String - - @ReadonlyAttribute - public var message: String - - @ReadonlyAttribute - public var code: UInt16 - - public static let INDEX_SIZE_ERR: UInt16 = 1 - - public static let DOMSTRING_SIZE_ERR: UInt16 = 2 - - public static let HIERARCHY_REQUEST_ERR: UInt16 = 3 - - public static let WRONG_DOCUMENT_ERR: UInt16 = 4 - - public static let INVALID_CHARACTER_ERR: UInt16 = 5 - - public static let NO_DATA_ALLOWED_ERR: UInt16 = 6 - - public static let NO_MODIFICATION_ALLOWED_ERR: UInt16 = 7 - - public static let NOT_FOUND_ERR: UInt16 = 8 - - public static let NOT_SUPPORTED_ERR: UInt16 = 9 - - public static let INUSE_ATTRIBUTE_ERR: UInt16 = 10 - - public static let INVALID_STATE_ERR: UInt16 = 11 - - public static let SYNTAX_ERR: UInt16 = 12 - - public static let INVALID_MODIFICATION_ERR: UInt16 = 13 - - public static let NAMESPACE_ERR: UInt16 = 14 - - public static let INVALID_ACCESS_ERR: UInt16 = 15 - - public static let VALIDATION_ERR: UInt16 = 16 - - public static let TYPE_MISMATCH_ERR: UInt16 = 17 - - public static let SECURITY_ERR: UInt16 = 18 - - public static let NETWORK_ERR: UInt16 = 19 - - public static let ABORT_ERR: UInt16 = 20 - - public static let URL_MISMATCH_ERR: UInt16 = 21 - - public static let QUOTA_EXCEEDED_ERR: UInt16 = 22 - - public static let TIMEOUT_ERR: UInt16 = 23 - - public static let INVALID_NODE_TYPE_ERR: UInt16 = 24 - - public static let DATA_CLONE_ERR: UInt16 = 25 -} - -public typealias DOMTimeStamp = UInt64 -public typealias VoidFunction = () -> Void - -/* variadic generics please */ -@propertyWrapper public final class ClosureAttribute0OptionalVoid { - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: (() -> Void)? { - get { ClosureAttribute0OptionalVoid[name, in: jsObject] } - set { ClosureAttribute0OptionalVoid[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> (() -> Void)? { - get { - guard let function = jsObject[name].function else { - return nil - } - return { function() } - } - set { - if let newValue = newValue { - jsObject[name] = JSClosure { _ in - newValue() - return .undefined - }.jsValue - } else { - jsObject[name] = .null - } - } - } -} - -@propertyWrapper public final class ClosureAttribute0Void { - @usableFromInline let jsObject: JSObject - @usableFromInline let name: JSString - - public init(jsObject: JSObject, name: JSString) { - self.jsObject = jsObject - self.name = name - } - - @inlinable public var wrappedValue: () -> Void { - get { ClosureAttribute0Void[name, in: jsObject] } - set { ClosureAttribute0Void[name, in: jsObject] = newValue } - } - - @inlinable public static subscript(name: JSString, in jsObject: JSObject) -> () -> Void { - get { - let function = jsObject[name].function! - return { function() } - } - set { - jsObject[name] = JSClosure { _ in - newValue() - return .undefined - }.jsValue - } - } -} - -@usableFromInline enum Strings { - static let _self: JSString = "self" - @usableFromInline static let DOMException: JSString = "DOMException" - @usableFromInline static let code: JSString = "code" - @usableFromInline static let message: JSString = "message" - @usableFromInline static let name: JSString = "name" - @usableFromInline static let toString: JSString = "toString" -} diff --git a/Sources/WebIDL/Attribute.swift b/Sources/WebIDL/Attribute.swift index 29f10b84..53fde676 100644 --- a/Sources/WebIDL/Attribute.swift +++ b/Sources/WebIDL/Attribute.swift @@ -5,4 +5,7 @@ public struct IDLAttribute: IDLNode, IDLNamed { public let readonly: Bool public let idlType: IDLType public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Callback.swift b/Sources/WebIDL/Callback.swift index db48a232..ebe79068 100644 --- a/Sources/WebIDL/Callback.swift +++ b/Sources/WebIDL/Callback.swift @@ -5,4 +5,7 @@ public struct IDLCallback: IDLNode, IDLNamed { public let idlType: IDLType public let arguments: [IDLArgument] public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Constant.swift b/Sources/WebIDL/Constant.swift index 900e3af3..dba8d91c 100644 --- a/Sources/WebIDL/Constant.swift +++ b/Sources/WebIDL/Constant.swift @@ -4,4 +4,7 @@ public struct IDLConstant: IDLNode, IDLNamed { public let idlType: IDLType public let value: IDLValue public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Declaration.swift b/Sources/WebIDL/Declaration.swift index 7b7ced1a..c6df79dd 100644 --- a/Sources/WebIDL/Declaration.swift +++ b/Sources/WebIDL/Declaration.swift @@ -10,6 +10,9 @@ public struct IDLMapLikeDeclaration: IDLDeclaration { public let readonly: Bool public let arguments: [IDLArgument] public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } public struct IDLSetLikeDeclaration: IDLDeclaration { @@ -18,6 +21,9 @@ public struct IDLSetLikeDeclaration: IDLDeclaration { public let readonly: Bool public let arguments: [IDLArgument] public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } public struct IDLIterableDeclaration: IDLDeclaration { @@ -26,4 +32,7 @@ public struct IDLIterableDeclaration: IDLDeclaration { public let async: Bool public let arguments: [IDLArgument] public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Dictionary.swift b/Sources/WebIDL/Dictionary.swift index 9c74a1d1..4d5bfb9c 100644 --- a/Sources/WebIDL/Dictionary.swift +++ b/Sources/WebIDL/Dictionary.swift @@ -15,4 +15,7 @@ public struct IDLDictionary: IDLNode, IDLNamed { public let extAttrs: [IDLExtendedAttribute] public let `default`: IDLValue? } + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } diff --git a/Sources/WebIDL/Namespace.swift b/Sources/WebIDL/Namespace.swift index 763186b6..ed6a785b 100644 --- a/Sources/WebIDL/Namespace.swift +++ b/Sources/WebIDL/Namespace.swift @@ -5,6 +5,9 @@ public struct IDLNamespace: IDLNode, IDLNamed { public let partial: Bool public let members: GenericCollection public let extAttrs: [IDLExtendedAttribute] + public func accept(visitor: inout V) where V : IDLDeclVisitor { + visitor.visit(self) + } } public protocol IDLNamespaceMember: IDLNode {} diff --git a/Sources/WebIDL/Node.swift b/Sources/WebIDL/Node.swift index 171e2ea6..cb315a42 100644 --- a/Sources/WebIDL/Node.swift +++ b/Sources/WebIDL/Node.swift @@ -56,11 +56,19 @@ public protocol IDLDeclVisitor { mutating func visit(_ interfaceMixin: IDLInterfaceMixin) mutating func visit(_ include: IDLIncludes) mutating func visit(_ callback: IDLCallback) + mutating func visit(_ callbackInterface: IDLCallbackInterface) mutating func visit(_ typedef: IDLTypedef) mutating func visit(_ operation: IDLOperation) mutating func visit(_ constructor: IDLConstructor) mutating func visit(_ enum: IDLEnum) mutating func visit(_ argument: IDLArgument) + mutating func visit(_ constant: IDLConstant) + mutating func visit(_ attribute: IDLAttribute) + mutating func visit(_ dictionary: IDLDictionary) + mutating func visit(_ namespace: IDLNamespace) + mutating func visit(_ iterableDecl: IDLIterableDeclaration) + mutating func visit(_ setLikeDecl: IDLSetLikeDeclaration) + mutating func visit(_ mapLikeDecl: IDLMapLikeDeclaration) mutating func visit(_ rawNode: IDLNode) } diff --git a/Sources/WebIDLToSwift/DeclGraph.swift b/Sources/WebIDLToSwift/DeclGraph.swift index 42f712e5..d1895aaf 100644 --- a/Sources/WebIDLToSwift/DeclGraph.swift +++ b/Sources/WebIDLToSwift/DeclGraph.swift @@ -9,10 +9,14 @@ class IDLSource { protocol IDLCodeGenUnit: IDLNode { var identifier: String? { get } + var partial: Bool { get } } extension IDLCodeGenUnit where Self: IDLNamed { var identifier: String? { name } } +extension IDLCodeGenUnit { + var partial: Bool { false } +} extension IDLInterface: IDLCodeGenUnit {} extension IDLInterfaceMixin: IDLCodeGenUnit {} extension IDLTypedef: IDLCodeGenUnit {} @@ -25,6 +29,46 @@ extension IDLCallback: IDLCodeGenUnit {} extension IDLCallbackInterface: IDLCodeGenUnit {} extension IDLNamespace: IDLCodeGenUnit {} +extension IDLType { + fileprivate static func shouldIgnore(name: String) -> Bool { + // https://webidl.spec.whatwg.org/#idl-types + [ + "Int8Array", "Int16Array", "Int32Array", "Uint8Array", "Uint16Array", "Uint32Array", + "Uint8ClampedArray", "BigInt64Array", "BigUint64Array", "Float32Array", "Float64Array", + "ArrayBuffer", + "FrozenArray", + "ObservableArray", + "DataView", + "Promise", + "sequence", + "record", + "boolean", + "any", + "DOMString", + "USVString", + "CSSOMString", + "ByteString", + "object", + "undefined", + "float", + "unrestricted float", + "double", + "unrestricted double", + "octet", + "unsigned short", + "unsigned long", + "unsigned long long", + "byte", + "short", + "long", + "long long", + "Function", + "bigint" + ] + .contains(name) + } +} + struct DeclGraph { struct UnownedNode { @@ -50,18 +94,20 @@ struct DeclGraph { hasher.combine(ObjectIdentifier(self)) } var description: String { - "\(source.name).\(declNode.identifier ?? _typeName(type(of: declNode)))" + "\(declNode.partial ? "(P) " : "")\(source.name).\(declNode.identifier ?? _typeName(type(of: declNode)))" } } private var resolutions: [UnresolvedRef: [NodeId]] = [:] - private var nodes: [Node] = [] + private var nodes: [Node?] = [] private(set) var forwardEdges: [NodeId: Set] = [:] - private var nodeByName: [String: NodeId] = [:] + typealias NodeByNameRecord = (primary: NodeId?, all: [NodeId]) + private var nodeByName: [String: NodeByNameRecord] = [:] private var sources: [String: IDLSource] = [:] mutating func addEdge(from source: NodeId, to destination: NodeId) { + guard source != destination else { return } self.forwardEdges[source, default: []].insert(destination) } @@ -75,7 +121,17 @@ struct DeclGraph { let newNode = Node(declNode: decl, source: source) nodes.append(newNode) if let identifier = decl.identifier { - nodeByName[identifier] = newNodeId + let record: NodeByNameRecord + if var existing = nodeByName[identifier] { + existing.all.append(newNodeId) + if existing.primary == nil, !decl.partial { + existing.primary = newNodeId + } + record = existing + } else { + record = (primary: decl.partial ? nil : newNodeId, all: [newNodeId]) + } + nodeByName[identifier] = record } IDLDeclWalker.walk( @@ -109,19 +165,20 @@ struct DeclGraph { return resolve(id: id).map { [$0] } ?? [] case .union(let types): return types.flatMap { resolve(ref: .type($0)) } - default: - print("IDLType \(ref) is not handled") - return [] + case .generic(let base, let args): + return (resolve(id: base).map { [$0] } ?? []) + args.flatMap { resolve(ref: .type($0)) } } } } private func resolve(id: String) -> NodeId? { guard let node = nodeByName[id] else { - print("'\(id)' not found") + if !IDLType.shouldIgnore(name: id) { + print("'\(id)' not found") + } return nil } - return node + return node.primary } func transposed() -> DeclGraph { @@ -149,6 +206,24 @@ struct DeclGraph { visit(node) } + mutating func compact() { + for (_, nodes) in nodeByName { + let nodesBySource = Dictionary(grouping: nodes.all, by: { + self.nodes[$0]?.source.name + }) + for (_, nodes) in nodesBySource { + guard nodes.count >= 2 else { continue } + let primary = nodes[0] + for other in nodes[1...] { + let otherEdges = self.forwardEdges[other] ?? [] + self.forwardEdges[primary]?.formUnion(otherEdges) + self.forwardEdges[other]?.removeAll() + self.nodes[other] = nil + } + } + } + } + func buildSCC() -> [Set] { var postOrder: [NodeId] = [] do { @@ -187,7 +262,7 @@ struct DeclGraph { var output = "digraph DependenciesGraph {\n" output += " node [shape = box]\n" func renderNode(node id: NodeId) { - let node = self.nodes[id] + guard let node = self.nodes[id] else { return } output += #" "_\#(id)" [label="\#(node)"]"# + "\n" } for node in nodes.indices { @@ -218,6 +293,9 @@ fileprivate struct IDLDeclWalker: IDLDeclVisitor { } mutating public func visit(_ interface: IDLInterface) { + if let inheritance = interface.inheritance { + self.process(.identifier(inheritance)) + } for member in interface.members { self.process(member) } @@ -241,6 +319,15 @@ fileprivate struct IDLDeclWalker: IDLDeclVisitor { } } + mutating func visit(_ callbackInterface: IDLCallbackInterface) { + if let inheritance = callbackInterface.inheritance { + self.process(.identifier(inheritance)) + } + for member in callbackInterface.members { + self.process(member) + } + } + public mutating func visit(_ typedef: IDLTypedef) { process(.type(typedef.idlType)) } @@ -265,7 +352,35 @@ fileprivate struct IDLDeclWalker: IDLDeclVisitor { mutating func visit(_ argument: IDLArgument) { process(.type(argument.idlType)) } - + + mutating func visit(_ constant: IDLConstant) { + process(.type(constant.idlType)) + } + + mutating func visit(_ attribute: IDLAttribute) { + process(.type(attribute.idlType)) + } + + mutating func visit(_ dictionary: IDLDictionary) { + for member in dictionary.members { + process(.type(member.idlType)) + } + } + + mutating func visit(_ namespace: IDLNamespace) { + for member in namespace.members { + process(member) + } + } + mutating func visit(_ decl: T) { + for type in decl.idlType { + process(.type(type)) + } + for arg in decl.arguments { + process(arg) + } + } + public func visit(_ rawNode: IDLNode) { print("Unhandled IDLNode in IDLDeclWalker: \(type(of: rawNode))") } diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 4c96d656..21cb2064 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -24,35 +24,31 @@ enum IDLParser { } static func defaultIDLs() -> [(name: String, path: URL)] { - let enabledIDLs: [(moduleName: String, idlNames: [String], imports: [String])] = [ -// ("DOMKit", [ -// "fetch", -// "geometry", -// "hr-time", -// "referrer-policy", -// "uievents", -// "wai-aria", -// "web-animations", -// "xhr", -// "service-workers", -// "streams", -// "dom", -// "html", -// ], ["DOMKitConsole", "DOMKitFileAPI", "DOMKitWebIDL", "DOMKitURL"]), - ("DOMKitWebIDL", ["webidl"], []), - ("DOMKitURL", ["url"], []), - ("DOMKitConsole", ["console"], []), - ("DOMKitFileAPI", ["FileAPI"], ["DOMKitWebIDL"]), + let enabledIDLs = [ + "fetch", + "geometry", + "hr-time", + "referrer-policy", + "uievents", + "wai-aria", + "web-animations", + "xhr", + "service-workers", + "streams", + "dom", + "html", + "webidl", + "url", + "console", + "FileAPI" ] - return enabledIDLs.flatMap { idl in - idl.idlNames.map { - let path = packageDir - .appendingPathComponent("node_modules") - .appendingPathComponent("@webref") - .appendingPathComponent("idl") - .appendingPathComponent($0 + ".idl") - return ($0, path) - } + return enabledIDLs.map { idl in + let path = packageDir + .appendingPathComponent("node_modules") + .appendingPathComponent("@webref") + .appendingPathComponent("idl") + .appendingPathComponent(idl + ".idl") + return (idl, path) } } } diff --git a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift index b5b560a1..d1962c02 100644 --- a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift +++ b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift @@ -640,7 +640,7 @@ extension IDLType: SwiftRepresentable { extension IDLTypedef: SwiftRepresentable { var swiftRepresentation: SwiftSource { if case .union = idlType.value { - return "" + return "public typealias \(name) = JSValue" } return "public typealias \(name) = \(idlType)" } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index e7a8688f..695bedce 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -19,9 +19,12 @@ func main() { let startTime = Date() print("Generating bindings for \(idlInputs.map(\.path))...") let idls = try idlInputs.map { try (name: $0.name, collection: IDLParser.parseIDL(path: $0.path)) } - let graph = DeclGraph.build(from: idls.map { ($0, $1.array) }) - print(graph.render()) -// let scc = graph.buildSCC() + var graph = DeclGraph.build(from: idls.map { ($0, $1.array) }) + graph.compact() + + if let graphPath = ProcessInfo.processInfo.environment["WEBIDL_TO_SWIFT_DUMP_GRAPH"] { + try graph.render().write(toFile: graphPath, atomically: true, encoding: .utf8) + } try generate(idls: idls.map(\.collection), imports: [], outputPath: "Sources/DOMKit/DOMKit.swift") print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") From 63914f8e7ae1f3c2cd76b08f7682319f1c3a7c7c Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 17:00:25 +0900 Subject: [PATCH 21/24] WIP --- Sources/WebIDLToSwift/IDLBuilder.swift | 9 --------- Sources/WebIDLToSwift/main.swift | 2 -- 2 files changed, 11 deletions(-) diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index f00f1a35..7ce09035 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -127,13 +127,4 @@ enum IDLBuilder { } """ } - - static func generateUnions() throws -> SwiftSource { - var contents: [SwiftSource] = [] - for union in Record.current.unions.sorted(by: { $0.name < $1.name }) { - guard !ignoredNames.contains(union.name) else { continue } - contents.append(union.swiftRepresentation) - } - return "\(lines: contents)" - } } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 695bedce..e670872e 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -44,8 +44,6 @@ private func generate(idls: [GenericCollection], contents.append(try IDLBuilder.generateClosureTypes()) print("Generating JSString constants...") contents.append(try IDLBuilder.generateStrings()) - print("Generating union protocols...") - contents.append(try IDLBuilder.generateUnions()) try fileManager.createDirectory( at: URL(fileURLWithPath: outputPath).deletingLastPathComponent(), withIntermediateDirectories: true From 76a6e253c111244da2265e9948d1c410d09cdf6f Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 17:04:00 +0900 Subject: [PATCH 22/24] Repair build --- Sources/DOMKit/CanvasImageSource.swift | 101 ------------------ .../DOMKit/OffscreenRenderingContext.swift | 87 --------------- Sources/DOMKit/RenderingContext.swift | 83 -------------- Sources/DOMKit/Support.swift | 5 - 4 files changed, 276 deletions(-) diff --git a/Sources/DOMKit/CanvasImageSource.swift b/Sources/DOMKit/CanvasImageSource.swift index 9c93d9b6..8b137891 100644 --- a/Sources/DOMKit/CanvasImageSource.swift +++ b/Sources/DOMKit/CanvasImageSource.swift @@ -1,102 +1 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CanvasImageSource: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_CanvasImageSource {} -extension HTMLOrSVGImageElement: Any_CanvasImageSource {} -extension HTMLVideoElement: Any_CanvasImageSource {} -extension ImageBitmap: Any_CanvasImageSource {} -extension OffscreenCanvas: Any_CanvasImageSource {} -//extension VideoFrame: Any_CanvasImageSource {} - -public enum CanvasImageSource: JSValueCompatible, Any_CanvasImageSource { - case htmlCanvasElement(HTMLCanvasElement) - case htmlOrSVGImageElement(HTMLOrSVGImageElement) - case htmlVideoElement(HTMLVideoElement) - case imageBitmap(ImageBitmap) - case offscreenCanvas(OffscreenCanvas) -// case videoFrame(VideoFrame) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var htmlOrSVGImageElement: HTMLOrSVGImageElement? { - switch self { - case let .htmlOrSVGImageElement(htmlOrSVGImageElement): return htmlOrSVGImageElement - default: return nil - } - } - - var htmlVideoElement: HTMLVideoElement? { - switch self { - case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement - default: return nil - } - } - - var imageBitmap: ImageBitmap? { - switch self { - case let .imageBitmap(imageBitmap): return imageBitmap - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - -// var videoFrame: VideoFrame? { -// switch self { -// case let .videoFrame(videoFrame): return videoFrame -// default: return nil -// } -// } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let htmlOrSVGImageElement: HTMLOrSVGImageElement = value.fromJSValue() { - return .htmlOrSVGImageElement(htmlOrSVGImageElement) - } - if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { - return .htmlVideoElement(htmlVideoElement) - } - if let imageBitmap: ImageBitmap = value.fromJSValue() { - return .imageBitmap(imageBitmap) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } -// if let videoFrame: VideoFrame = value.fromJSValue() { -// return .videoFrame(videoFrame) -// } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .htmlOrSVGImageElement(htmlOrSVGImageElement): - return htmlOrSVGImageElement.jsValue - case let .htmlVideoElement(htmlVideoElement): - return htmlVideoElement.jsValue - case let .imageBitmap(imageBitmap): - return imageBitmap.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue -// case let .videoFrame(videoFrame): -// return videoFrame.jsValue - } - } -} diff --git a/Sources/DOMKit/OffscreenRenderingContext.swift b/Sources/DOMKit/OffscreenRenderingContext.swift index 12bcb462..8b137891 100644 --- a/Sources/DOMKit/OffscreenRenderingContext.swift +++ b/Sources/DOMKit/OffscreenRenderingContext.swift @@ -1,88 +1 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_OffscreenRenderingContext: ConvertibleToJSValue {} -//extension GPUCanvasContext: Any_OffscreenRenderingContext {} -extension ImageBitmapRenderingContext: Any_OffscreenRenderingContext {} -extension OffscreenCanvasRenderingContext2D: Any_OffscreenRenderingContext {} -//extension WebGL2RenderingContext: Any_OffscreenRenderingContext {} -//extension WebGLRenderingContext: Any_OffscreenRenderingContext {} - -public enum OffscreenRenderingContext: JSValueCompatible, Any_OffscreenRenderingContext { -// case gpuCanvasContext(GPUCanvasContext) - case imageBitmapRenderingContext(ImageBitmapRenderingContext) - case offscreenCanvasRenderingContext2D(OffscreenCanvasRenderingContext2D) -// case webGL2RenderingContext(WebGL2RenderingContext) -// case webGLRenderingContext(WebGLRenderingContext) - -// var gpuCanvasContext: GPUCanvasContext? { -// switch self { -// case let .gpuCanvasContext(gpuCanvasContext): return gpuCanvasContext -// default: return nil -// } -// } - - var imageBitmapRenderingContext: ImageBitmapRenderingContext? { - switch self { - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext - default: return nil - } - } - - var offscreenCanvasRenderingContext2D: OffscreenCanvasRenderingContext2D? { - switch self { - case let .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D): return offscreenCanvasRenderingContext2D - default: return nil - } - } - -// var webGL2RenderingContext: WebGL2RenderingContext? { -// switch self { -// case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext -// default: return nil -// } -// } -// -// var webGLRenderingContext: WebGLRenderingContext? { -// switch self { -// case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext -// default: return nil -// } -// } - - public static func construct(from value: JSValue) -> Self? { -// if let gpuCanvasContext: GPUCanvasContext = value.fromJSValue() { -// return .gpuCanvasContext(gpuCanvasContext) -// } - if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { - return .imageBitmapRenderingContext(imageBitmapRenderingContext) - } - if let offscreenCanvasRenderingContext2D: OffscreenCanvasRenderingContext2D = value.fromJSValue() { - return .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D) - } -// if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { -// return .webGL2RenderingContext(webGL2RenderingContext) -// } -// if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { -// return .webGLRenderingContext(webGLRenderingContext) -// } - return nil - } - - public var jsValue: JSValue { - switch self { -// case let .gpuCanvasContext(gpuCanvasContext): -// return gpuCanvasContext.jsValue - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): - return imageBitmapRenderingContext.jsValue - case let .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D): - return offscreenCanvasRenderingContext2D.jsValue -// case let .webGL2RenderingContext(webGL2RenderingContext): -// return webGL2RenderingContext.jsValue -// case let .webGLRenderingContext(webGLRenderingContext): -// return webGLRenderingContext.jsValue - } - } -} diff --git a/Sources/DOMKit/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift index ad42b922..3141479e 100644 --- a/Sources/DOMKit/RenderingContext.swift +++ b/Sources/DOMKit/RenderingContext.swift @@ -3,86 +3,3 @@ import JavaScriptEventLoop import JavaScriptKit -public protocol Any_RenderingContext: ConvertibleToJSValue {} -extension CanvasRenderingContext2D: Any_RenderingContext {} -//extension GPUCanvasContext: Any_RenderingContext {} -extension ImageBitmapRenderingContext: Any_RenderingContext {} -//extension WebGL2RenderingContext: Any_RenderingContext {} -//extension WebGLRenderingContext: Any_RenderingContext {} - -public enum RenderingContext: JSValueCompatible, Any_RenderingContext { - case canvasRenderingContext2D(CanvasRenderingContext2D) -// case gpuCanvasContext(GPUCanvasContext) - case imageBitmapRenderingContext(ImageBitmapRenderingContext) -// case webGL2RenderingContext(WebGL2RenderingContext) -// case webGLRenderingContext(WebGLRenderingContext) - - var canvasRenderingContext2D: CanvasRenderingContext2D? { - switch self { - case let .canvasRenderingContext2D(canvasRenderingContext2D): return canvasRenderingContext2D - default: return nil - } - } - -// var gpuCanvasContext: GPUCanvasContext? { -// switch self { -// case let .gpuCanvasContext(gpuCanvasContext): return gpuCanvasContext -// default: return nil -// } -// } - - var imageBitmapRenderingContext: ImageBitmapRenderingContext? { - switch self { - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext - default: return nil - } - } - -// var webGL2RenderingContext: WebGL2RenderingContext? { -// switch self { -// case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext -// default: return nil -// } -// } -// -// var webGLRenderingContext: WebGLRenderingContext? { -// switch self { -// case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext -// default: return nil -// } -// } - - public static func construct(from value: JSValue) -> Self? { - if let canvasRenderingContext2D: CanvasRenderingContext2D = value.fromJSValue() { - return .canvasRenderingContext2D(canvasRenderingContext2D) - } -// if let gpuCanvasContext: GPUCanvasContext = value.fromJSValue() { -// return .gpuCanvasContext(gpuCanvasContext) -// } - if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { - return .imageBitmapRenderingContext(imageBitmapRenderingContext) - } -// if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { -// return .webGL2RenderingContext(webGL2RenderingContext) -// } -// if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { -// return .webGLRenderingContext(webGLRenderingContext) -// } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasRenderingContext2D(canvasRenderingContext2D): - return canvasRenderingContext2D.jsValue -// case let .gpuCanvasContext(gpuCanvasContext): -// return gpuCanvasContext.jsValue - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): - return imageBitmapRenderingContext.jsValue -// case let .webGL2RenderingContext(webGL2RenderingContext): -// return webGL2RenderingContext.jsValue -// case let .webGLRenderingContext(webGLRenderingContext): -// return webGLRenderingContext.jsValue - } - } -} diff --git a/Sources/DOMKit/Support.swift b/Sources/DOMKit/Support.swift index 7ea147e4..ffa2f1fd 100644 --- a/Sources/DOMKit/Support.swift +++ b/Sources/DOMKit/Support.swift @@ -1,6 +1,5 @@ import JavaScriptKit import ECMAScript -import DOMKitFileAPI /* TODO: fix this */ public typealias __UNSUPPORTED_BIGINT__ = JSValue @@ -18,8 +17,4 @@ public let globalThis = Window(from: JSObject.global.jsValue)! public typealias Uint8ClampedArray = JSUInt8ClampedArray // public typealias CSSColorValue_or_CSSStyleValue = CSSStyleValue // public typealias Any_CSSColorValue_or_CSSStyleValue = CSSStyleValue -public typealias Blob_or_MediaSource = Blob -public typealias HTMLOrSVGImageElement = HTMLImageElement -public typealias HTMLOrSVGScriptElement = HTMLScriptElement -public typealias BodyInit = XMLHttpRequestBodyInit public typealias CustomElementConstructor = JSFunction From 43356379990c55bcae3a09516ee077fbe6c171bf Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 20:49:02 +0900 Subject: [PATCH 23/24] WIP --- Sources/WebIDLToSwift/DeclGraph.swift | 116 ++++++++++++++++++++++++-- Sources/WebIDLToSwift/main.swift | 15 +++- 2 files changed, 122 insertions(+), 9 deletions(-) diff --git a/Sources/WebIDLToSwift/DeclGraph.swift b/Sources/WebIDLToSwift/DeclGraph.swift index d1895aaf..1f024306 100644 --- a/Sources/WebIDLToSwift/DeclGraph.swift +++ b/Sources/WebIDLToSwift/DeclGraph.swift @@ -71,10 +71,6 @@ extension IDLType { struct DeclGraph { - struct UnownedNode { - unowned let value: Node - } - typealias NodeId = Array.Index final class Node: Hashable, CustomStringConvertible { @@ -99,7 +95,7 @@ struct DeclGraph { } private var resolutions: [UnresolvedRef: [NodeId]] = [:] - private var nodes: [Node?] = [] + private(set) var nodes: [Node?] = [] private(set) var forwardEdges: [NodeId: Set] = [:] typealias NodeByNameRecord = (primary: NodeId?, all: [NodeId]) @@ -251,7 +247,6 @@ struct DeclGraph { var graph = DeclGraph() for idl in idls { - print("Building graph from \(idl.unitName)") graph.collect(unitName: idl.unitName, decls: idl.collection) } graph.resolve() @@ -276,7 +271,114 @@ struct DeclGraph { } } -enum UnresolvedRef: Hashable { + +struct DeclSetDAG { + struct Node: CustomStringConvertible { + let sources: Set + let decls: Set + + var description: String { + sources.joined(separator: ", ") + } + } + typealias NodeId = Array.Index + + private(set) var nodes: [Node?] = [] + private(set) var forwardEdges: [NodeId: Set] = [:] + private(set) var backEdges: [NodeId: Set] = [:] + + static func build(from declGraph: DeclGraph) -> DeclSetDAG { + var graph = DeclSetDAG() + let scc = declGraph.buildSCC() + + var declToNode: [DeclGraph.NodeId: NodeId] = [:] + for declNodes in scc { + let sources = Set(declNodes.compactMap { declGraph.nodes[$0]?.source.name }) + guard !sources.isEmpty else { continue } + let newNode = Node(sources: sources, decls: declNodes) + let nodeId = graph.nodes.count + graph.nodes.append(newNode) + for decl in declNodes { + declToNode[decl] = nodeId + } + } + + for declNodes in scc { + let selfNode = declToNode[declNodes.first!]! + for declNode in declNodes { + for destDecl in declGraph.forwardEdges[declNode] ?? [] { + // If the edge is not SCC internal, add edge between components + guard let destNode = declToNode[destDecl], + !declNodes.contains(destDecl) else { continue } + graph.addEdge(from: selfNode, to: destNode) + } + } + } + return graph + } + + mutating func addEdge(from source: NodeId, to dest: NodeId) { + if source != dest { + self.forwardEdges[source, default: []].insert(dest) + self.backEdges[dest, default: []].insert(source) + } + } + + mutating func removeEdge(from source: NodeId, to dest: NodeId) { + self.forwardEdges[source]?.remove(dest) + self.backEdges[dest]?.remove(source) + } + + mutating func merge(keep: NodeId, remove: NodeId) { + for pointer in self.forwardEdges[remove] ?? [] { + removeEdge(from: remove, to: pointer) + addEdge(from: keep, to: pointer) + } + self.forwardEdges[remove] = nil + for pointer in self.backEdges[remove] ?? [] { + removeEdge(from: pointer, to: remove) + addEdge(from: pointer, to: keep) + } + self.backEdges[remove] = nil + self.nodes[remove] = nil + } + + mutating func compact() { + var visited: Set = [] + for nodeId in nodes.indices { + guard !visited.contains(nodeId) else { continue } + visited.insert(nodeId) + guard let node = self.nodes[nodeId] else { continue } + let edges = self.forwardEdges[nodeId] ?? [] + for dest in edges { + guard let destNode = nodes[dest] else { continue } + // Merge if the edge connects the same sources + if destNode.sources == node.sources { + merge(keep: nodeId, remove: dest) + } + } + } + } + + func render() -> String { + var output = "digraph DependenciesGraph {\n" + output += " node [shape = box]\n" + func renderNode(node id: NodeId) { + guard let node = self.nodes[id] else { return } + output += #" "_\#(id)" [label="\#(id)_\#(node)"]"# + "\n" + } + for node in nodes.indices { + renderNode(node: node) + for edge in forwardEdges[node] ?? [] { + output += #" "_\#(node)" -> "_\#(edge)""# + "\n" + } + } + output += "}\n" + return output + } +} + +fileprivate enum UnresolvedRef: Hashable { case identifier(String) case type(IDLType) } diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index e670872e..53df2ea7 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -19,13 +19,24 @@ func main() { let startTime = Date() print("Generating bindings for \(idlInputs.map(\.path))...") let idls = try idlInputs.map { try (name: $0.name, collection: IDLParser.parseIDL(path: $0.path)) } - var graph = DeclGraph.build(from: idls.map { ($0, $1.array) }) - graph.compact() + let graph = DeclGraph.build(from: idls.map { ($0, $1.array) }) if let graphPath = ProcessInfo.processInfo.environment["WEBIDL_TO_SWIFT_DUMP_GRAPH"] { try graph.render().write(toFile: graphPath, atomically: true, encoding: .utf8) } + let dag = DeclSetDAG.build(from: graph) + + if let graphPath = ProcessInfo.processInfo.environment["WEBIDL_TO_SWIFT_DUMP_DAG"] { + try dag.render().write(toFile: graphPath, atomically: true, encoding: .utf8) + } + + for (node, nodeId) in zip(dag.nodes, dag.nodes.indices) { + guard let node = node else { continue } + guard let dests = dag.forwardEdges[nodeId]?.map({ dag.nodes[$0] }) else { continue } + print("\(node) --> \(dests)") + } + try generate(idls: idls.map(\.collection), imports: [], outputPath: "Sources/DOMKit/DOMKit.swift") print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") } catch { From b4673fb24abf39337ee5e90ac8b5adfc0a82b576 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 3 May 2022 21:16:41 +0900 Subject: [PATCH 24/24] Setup tests --- Package.swift | 7 +++++- Sources/WebIDL/GenericCollection.swift | 4 +++ .../{main.swift => Command.swift} | 4 +-- Sources/WebIDLToSwift/IDLParser.swift | 25 +++++-------------- Sources/idl2swift/main.swift | 3 +++ .../WebIDLToSwiftTests.swift | 14 +++++++++++ 6 files changed, 34 insertions(+), 23 deletions(-) rename Sources/WebIDLToSwift/{main.swift => Command.swift} (99%) create mode 100644 Sources/idl2swift/main.swift create mode 100644 Tests/WebIDLToSwiftTests/WebIDLToSwiftTests.swift diff --git a/Package.swift b/Package.swift index cfa1e246..806f8bfe 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( name: "DOMKit", targets: ["DOMKit"]), .library(name: "WebIDL", targets: ["WebIDL"]), - .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), + .executable(name: "idl2swift", targets: ["idl2swift"]), ], dependencies: [ .package( @@ -37,8 +37,13 @@ let package = Package( .target( name: "WebIDLToSwift", dependencies: ["WebIDL"]), + .target( + name: "idl2swift", + dependencies: ["WebIDLToSwift"]), .testTarget( name: "DOMKitTests", dependencies: ["DOMKit"]), + .testTarget( + name: "WebIDLToSwiftTests", dependencies: ["WebIDLToSwift"]), ] ) diff --git a/Sources/WebIDL/GenericCollection.swift b/Sources/WebIDL/GenericCollection.swift index 867d1044..8bfd4f4d 100644 --- a/Sources/WebIDL/GenericCollection.swift +++ b/Sources/WebIDL/GenericCollection.swift @@ -7,6 +7,10 @@ public struct GenericCollection: Collection, Decodable { public subscript(index: Array.Index) -> Element { array[index] as! Element } public func index(after index: Array.Index) -> Array.Index { array.index(after: index) } + init(_ array: [IDLNode]) { + self.array = array + } + public init(from decoder: Decoder) throws { let wrappers = try decoder.singleValueContainer().decode([IDLNodeDecoder].self) array = wrappers.map(\.node) diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/Command.swift similarity index 99% rename from Sources/WebIDLToSwift/main.swift rename to Sources/WebIDLToSwift/Command.swift index 53df2ea7..01e0ca6b 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/Command.swift @@ -10,9 +10,7 @@ func parseOptions() -> [(name: String, path: URL)] { } } -main() - -func main() { +public func main() { do { let idlInputs = parseOptions() Record.reset() diff --git a/Sources/WebIDLToSwift/IDLParser.swift b/Sources/WebIDLToSwift/IDLParser.swift index 21cb2064..ee5786eb 100644 --- a/Sources/WebIDLToSwift/IDLParser.swift +++ b/Sources/WebIDLToSwift/IDLParser.swift @@ -23,25 +23,12 @@ enum IDLParser { return try JSONDecoder().decode(GenericCollection.self, from: data) } - static func defaultIDLs() -> [(name: String, path: URL)] { - let enabledIDLs = [ - "fetch", - "geometry", - "hr-time", - "referrer-policy", - "uievents", - "wai-aria", - "web-animations", - "xhr", - "service-workers", - "streams", - "dom", - "html", - "webidl", - "url", - "console", - "FileAPI" - ] + static let defaultEnabledIDLs = [ + "fetch", "geometry", "hr-time", "referrer-policy", "uievents", "wai-aria", + "web-animations", "xhr", "service-workers", "streams", "dom", "html", + "webidl", "url", "console", "FileAPI" + ] + static func defaultIDLs(enabledIDLs: [String] = defaultEnabledIDLs) -> [(name: String, path: URL)] { return enabledIDLs.map { idl in let path = packageDir .appendingPathComponent("node_modules") diff --git a/Sources/idl2swift/main.swift b/Sources/idl2swift/main.swift new file mode 100644 index 00000000..7c0a1a7a --- /dev/null +++ b/Sources/idl2swift/main.swift @@ -0,0 +1,3 @@ +import WebIDLToSwift + +WebIDLToSwift.main() diff --git a/Tests/WebIDLToSwiftTests/WebIDLToSwiftTests.swift b/Tests/WebIDLToSwiftTests/WebIDLToSwiftTests.swift new file mode 100644 index 00000000..f2aeca36 --- /dev/null +++ b/Tests/WebIDLToSwiftTests/WebIDLToSwiftTests.swift @@ -0,0 +1,14 @@ +@testable import WebIDLToSwift +@testable import WebIDL +import XCTest + +final class WebIDLToSwiftTests: XCTestCase { + func testDeclGraph() throws { + let idlPaths = IDLParser.defaultIDLs(enabledIDLs: ["url"]) + let idls = try idlPaths.map { + ($0.name, try IDLParser.parseIDL(path: $0.path)) + } + let graph = DeclGraph.build(from: idls.map { ($0, $1.array) }) + + } +}