LibWeb: Treat support IDLs like normal bindings inputs

Allow the WebIDL parser to accept files without a top-level interface,
and have the exposed-interface generator skip those modules.

With that in place, register support IDLs through
libweb_js_bindings() as well, including generated CSS IDLs from the
build directory, and remove the separate support-idl plumbing.

This is enabled now that the IDL generator rules have been simplified
so that every IDL file produces a corresponding header and cpp file.
This commit is contained in:
Shannon Booth 2026-05-09 16:32:33 +02:00 committed by Shannon Booth
parent 9d605f1237
commit 4b9f6450bd
5 changed files with 125 additions and 137 deletions

View file

@ -14,9 +14,7 @@ interface HTMLDetailsElement : HTMLElement {
};
```
2. Add the IDL file to [`LibWeb/idl_files.cmake`](../Libraries/LibWeb/idl_files.cmake):
- Use `libweb_js_bindings(HTML/HTMLDetailsElement)` for top-level interfaces.
- Use `libweb_support_idl(...)` for support IDL files that do not generate a top-level bindings class.
2. Add the IDL file to [`LibWeb/idl_files.cmake`](../Libraries/LibWeb/idl_files.cmake).
3. Forward declare the generated class in [`LibWeb/Forward.h`](../Libraries/LibWeb/Forward.h):
- `HTMLDetailsElement` in its namespace.

View file

@ -1,6 +1,7 @@
# This file is included from "Meta/CMake/libweb_data.cmake"
# It is defined here so that there is no need to go to the Meta directory when adding new idl files
libweb_js_bindings(Animations/Animatable)
libweb_js_bindings(Animations/Animation)
libweb_js_bindings(Animations/AnimationEffect)
libweb_js_bindings(Animations/AnimationPlaybackEvent)
@ -8,12 +9,13 @@ libweb_js_bindings(Animations/AnimationTimeline)
libweb_js_bindings(Animations/DocumentTimeline)
libweb_js_bindings(Animations/KeyframeEffect)
libweb_js_bindings(Animations/ScrollTimeline)
libweb_js_bindings(ARIA/ARIAMixin)
libweb_js_bindings(Clipboard/Clipboard)
libweb_js_bindings(Clipboard/ClipboardEvent)
libweb_js_bindings(Clipboard/ClipboardItem)
libweb_js_bindings(ContentSecurityPolicy/SecurityPolicyViolationEvent)
libweb_js_bindings(Compression/CompressionStream)
libweb_js_bindings(Compression/DecompressionStream)
libweb_js_bindings(ContentSecurityPolicy/SecurityPolicyViolationEvent)
libweb_js_bindings(CookieStore/CookieChangeEvent)
libweb_js_bindings(CookieStore/CookieStore)
libweb_js_bindings(CredentialManagement/Credential)
@ -24,6 +26,7 @@ libweb_js_bindings(Crypto/Crypto)
libweb_js_bindings(Crypto/CryptoKey)
libweb_js_bindings(Crypto/SubtleCrypto)
libweb_js_bindings(CSS/AnimationEvent)
libweb_js_bindings(CSS/CSS)
libweb_js_bindings(CSS/CSSAnimation)
libweb_js_bindings(CSS/CSSConditionRule)
libweb_js_bindings(CSS/CSSContainerRule)
@ -54,13 +57,12 @@ libweb_js_bindings(CSS/CSSMathSum)
libweb_js_bindings(CSS/CSSMathValue)
libweb_js_bindings(CSS/CSSMatrixComponent)
libweb_js_bindings(CSS/CSSMediaRule)
libweb_js_bindings(CSS/CSS)
libweb_js_bindings(CSS/CSSNamespaceRule)
libweb_js_bindings(CSS/CSSNestedDeclarations)
libweb_js_bindings(CSS/CSSNumericArray)
libweb_js_bindings(CSS/CSSNumericValue)
libweb_js_bindings(CSS/CSSPageRule)
libweb_js_bindings(CSS/CSSPageDescriptors)
libweb_js_bindings(CSS/CSSPageRule)
libweb_js_bindings(CSS/CSSPerspective)
libweb_js_bindings(CSS/CSSPropertyRule)
libweb_js_bindings(CSS/CSSRotate)
@ -83,9 +85,13 @@ libweb_js_bindings(CSS/CSSTranslate)
libweb_js_bindings(CSS/CSSUnitValue)
libweb_js_bindings(CSS/CSSUnparsedValue)
libweb_js_bindings(CSS/CSSVariableReferenceValue)
libweb_js_bindings(CSS/ElementCSSInlineStyle)
libweb_js_bindings(CSS/FontFace)
libweb_js_bindings(CSS/FontFaceSet)
libweb_js_bindings(CSS/FontFaceSetLoadEvent)
libweb_js_bindings(CSS/GeneratedCSSNumericFactoryMethods)
libweb_js_bindings(CSS/GeneratedCSSStyleProperties)
libweb_js_bindings(CSS/LinkStyle)
libweb_js_bindings(CSS/MediaList)
libweb_js_bindings(CSS/MediaQueryList)
libweb_js_bindings(CSS/MediaQueryListEvent)
@ -97,21 +103,25 @@ libweb_js_bindings(CSS/StyleSheet)
libweb_js_bindings(CSS/StyleSheetList)
libweb_js_bindings(CSS/TransitionEvent)
libweb_js_bindings(CSS/VisualViewport)
libweb_js_bindings(DOM/AbstractRange)
libweb_js_bindings(DOM/Attr)
libweb_js_bindings(DOM/AbortController)
libweb_js_bindings(DOM/AbortSignal)
libweb_js_bindings(DOM/AbstractRange)
libweb_js_bindings(DOM/Attr)
libweb_js_bindings(DOM/CDATASection)
libweb_js_bindings(DOM/CharacterData)
libweb_js_bindings(DOM/ChildNode)
libweb_js_bindings(DOM/Comment)
libweb_js_bindings(DOM/CustomEvent)
libweb_js_bindings(DOM/Document)
libweb_js_bindings(DOM/DocumentFragment)
libweb_js_bindings(DOM/DocumentOrShadowRoot)
libweb_js_bindings(DOM/DocumentType)
libweb_js_bindings(DOM/DOMImplementation)
libweb_js_bindings(DOM/DOMTokenList)
libweb_js_bindings(DOM/Element)
libweb_js_bindings(DOM/Event)
libweb_js_bindings(DOM/EventHandler)
libweb_js_bindings(DOM/EventListener)
libweb_js_bindings(DOM/EventTarget)
libweb_js_bindings(DOM/HTMLCollection)
libweb_js_bindings(DOM/MutationObserver)
@ -121,9 +131,11 @@ libweb_js_bindings(DOM/Node)
libweb_js_bindings(DOM/NodeFilter)
libweb_js_bindings(DOM/NodeIterator)
libweb_js_bindings(DOM/NodeList)
libweb_js_bindings(DOM/ParentNode)
libweb_js_bindings(DOM/ProcessingInstruction)
libweb_js_bindings(DOM/Range)
libweb_js_bindings(DOM/ShadowRoot)
libweb_js_bindings(DOM/Slottable)
libweb_js_bindings(DOM/StaticRange)
libweb_js_bindings(DOM/Text)
libweb_js_bindings(DOM/TreeWalker)
@ -132,12 +144,16 @@ libweb_js_bindings(DOMURL/DOMURL)
libweb_js_bindings(DOMURL/Origin)
libweb_js_bindings(DOMURL/URLSearchParams)
libweb_js_bindings(Encoding/TextDecoder)
libweb_js_bindings(Encoding/TextDecoderCommon)
libweb_js_bindings(Encoding/TextDecoderStream)
libweb_js_bindings(Encoding/TextEncoder)
libweb_js_bindings(Encoding/TextEncoderCommon)
libweb_js_bindings(Encoding/TextEncoderStream)
libweb_js_bindings(EncryptedMediaExtensions/MediaKeySystemAccess)
libweb_js_bindings(EntriesAPI/FileSystemEntry)
libweb_js_bindings(EventTiming/PerformanceEventTiming)
libweb_js_bindings(Fetch/Body)
libweb_js_bindings(Fetch/BodyInit)
libweb_js_bindings(Fetch/Headers)
libweb_js_bindings(Fetch/Request)
libweb_js_bindings(Fetch/Response)
@ -146,6 +162,9 @@ libweb_js_bindings(FileAPI/File)
libweb_js_bindings(FileAPI/FileList)
libweb_js_bindings(FileAPI/FileReader)
libweb_js_bindings(FileAPI/FileReaderSync)
libweb_js_bindings(Fullscreen/DocumentExtensions)
libweb_js_bindings(Fullscreen/DocumentOrShadowRootExtensions)
libweb_js_bindings(Fullscreen/ElementExtensions)
libweb_js_bindings(Gamepad/Gamepad)
libweb_js_bindings(Gamepad/GamepadButton)
libweb_js_bindings(Gamepad/GamepadEvent)
@ -162,19 +181,39 @@ libweb_js_bindings(Geometry/DOMQuad)
libweb_js_bindings(Geometry/DOMRect)
libweb_js_bindings(Geometry/DOMRectList)
libweb_js_bindings(Geometry/DOMRectReadOnly)
libweb_js_bindings(MediaCapture/MediaDeviceInfo)
libweb_js_bindings(MediaCapture/MediaDevices)
libweb_js_bindings(MediaCapture/MediaStream)
libweb_js_bindings(MediaCapture/MediaStreamTrack)
libweb_js_bindings(MediaCapture/MediaStreamTrackEvent)
libweb_js_bindings(GPC/GlobalPrivacyControl)
libweb_js_bindings(HighResolutionTime/DOMHighResTimeStamp)
libweb_js_bindings(HighResolutionTime/EpochTimeStamp)
libweb_js_bindings(HighResolutionTime/Performance)
libweb_js_bindings(HTML/AbstractWorker)
libweb_js_bindings(HTML/AnimationFrameProvider)
libweb_js_bindings(HTML/AudioTrack)
libweb_js_bindings(HTML/AudioTrackList)
libweb_js_bindings(HTML/BarProp)
libweb_js_bindings(HTML/BeforeUnloadEvent)
libweb_js_bindings(HTML/BroadcastChannel)
libweb_js_bindings(HTML/Canvas/CanvasCompositing)
libweb_js_bindings(HTML/Canvas/CanvasDrawImage)
libweb_js_bindings(HTML/Canvas/CanvasDrawPath)
libweb_js_bindings(HTML/Canvas/CanvasFillStrokeStyles)
libweb_js_bindings(HTML/Canvas/CanvasFilters)
libweb_js_bindings(HTML/Canvas/CanvasImageData)
libweb_js_bindings(HTML/Canvas/CanvasImageSmoothing)
libweb_js_bindings(HTML/Canvas/CanvasPath)
libweb_js_bindings(HTML/Canvas/CanvasPathDrawingStyles)
libweb_js_bindings(HTML/Canvas/CanvasRect)
libweb_js_bindings(HTML/Canvas/CanvasSettings)
libweb_js_bindings(HTML/Canvas/CanvasShadowStyles)
libweb_js_bindings(HTML/Canvas/CanvasState)
libweb_js_bindings(HTML/Canvas/CanvasText)
libweb_js_bindings(HTML/Canvas/CanvasTextDrawingStyles)
libweb_js_bindings(HTML/Canvas/CanvasTransform)
libweb_js_bindings(HTML/Canvas/CanvasUserInterface)
libweb_js_bindings(HTML/Canvas/OffscreenCanvasBase)
libweb_js_bindings(HTML/CanvasGradient)
libweb_js_bindings(HTML/CanvasPattern)
libweb_js_bindings(HTML/CanvasRenderingContext2D)
libweb_js_bindings(HTML/CanvasRenderingContext2DSettings)
libweb_js_bindings(HTML/CloseEvent)
libweb_js_bindings(HTML/CloseWatcher)
libweb_js_bindings(HTML/CommandEvent)
@ -210,8 +249,8 @@ libweb_js_bindings(HTML/HTMLDetailsElement)
libweb_js_bindings(HTML/HTMLDialogElement)
libweb_js_bindings(HTML/HTMLDirectoryElement)
libweb_js_bindings(HTML/HTMLDivElement)
libweb_js_bindings(HTML/HTMLDocument)
libweb_js_bindings(HTML/HTMLDListElement)
libweb_js_bindings(HTML/HTMLDocument)
libweb_js_bindings(HTML/HTMLElement)
libweb_js_bindings(HTML/HTMLEmbedElement)
libweb_js_bindings(HTML/HTMLFieldSetElement)
@ -224,6 +263,7 @@ libweb_js_bindings(HTML/HTMLHeadElement)
libweb_js_bindings(HTML/HTMLHeadingElement)
libweb_js_bindings(HTML/HTMLHRElement)
libweb_js_bindings(HTML/HTMLHtmlElement)
libweb_js_bindings(HTML/HTMLHyperlinkElementUtils)
libweb_js_bindings(HTML/HTMLIFrameElement)
libweb_js_bindings(HTML/HTMLImageElement)
libweb_js_bindings(HTML/HTMLInputElement)
@ -243,6 +283,7 @@ libweb_js_bindings(HTML/HTMLOListElement)
libweb_js_bindings(HTML/HTMLOptGroupElement)
libweb_js_bindings(HTML/HTMLOptionElement)
libweb_js_bindings(HTML/HTMLOptionsCollection)
libweb_js_bindings(HTML/HTMLOrSVGOrMathMLElement)
libweb_js_bindings(HTML/HTMLOutputElement)
libweb_js_bindings(HTML/HTMLParagraphElement)
libweb_js_bindings(HTML/HTMLParamElement)
@ -286,16 +327,26 @@ libweb_js_bindings(HTML/NavigationCurrentEntryChangeEvent)
libweb_js_bindings(HTML/NavigationDestination)
libweb_js_bindings(HTML/NavigationHistoryEntry)
libweb_js_bindings(HTML/NavigationTransition)
libweb_js_bindings(HTML/NavigationType)
libweb_js_bindings(HTML/Navigator)
libweb_js_bindings(HTML/NavigatorBeacon)
libweb_js_bindings(HTML/NavigatorConcurrentHardware)
libweb_js_bindings(HTML/NavigatorDeviceMemory)
libweb_js_bindings(HTML/NavigatorID)
libweb_js_bindings(HTML/NavigatorLanguage)
libweb_js_bindings(HTML/NavigatorOnLine)
libweb_js_bindings(HTML/OffscreenCanvas)
libweb_js_bindings(HTML/OffscreenCanvasRenderingContext2D)
libweb_js_bindings(HTML/PageTransitionEvent)
libweb_js_bindings(HTML/Path2D)
libweb_js_bindings(HTML/Plugin)
libweb_js_bindings(HTML/PluginArray)
libweb_js_bindings(HTML/PopoverTargetAttributes)
libweb_js_bindings(HTML/PopStateEvent)
libweb_js_bindings(HTML/PredefinedColorSpace)
libweb_js_bindings(HTML/PromiseRejectionEvent)
libweb_js_bindings(HTML/RadioNodeList)
libweb_js_bindings(HTML/Scripting/Fetching)
libweb_js_bindings(HTML/SharedWorker)
libweb_js_bindings(HTML/SharedWorkerGlobalScope)
libweb_js_bindings(HTML/Storage)
@ -309,18 +360,22 @@ libweb_js_bindings(HTML/TextTrackList)
libweb_js_bindings(HTML/TimeRanges)
libweb_js_bindings(HTML/ToggleEvent)
libweb_js_bindings(HTML/TrackEvent)
libweb_js_bindings(HTML/UniversalGlobalScope)
libweb_js_bindings(HTML/UserActivation)
libweb_js_bindings(HTML/ValidityState)
libweb_js_bindings(HTML/VideoTrack)
libweb_js_bindings(HTML/VideoTrackList)
libweb_js_bindings(HTML/Window)
libweb_js_bindings(HTML/WindowDeprecated)
libweb_js_bindings(HTML/WindowLocalStorage)
libweb_js_bindings(HTML/WindowOrWorkerGlobalScope)
libweb_js_bindings(HTML/WindowSessionStorage)
libweb_js_bindings(HTML/Worker)
libweb_js_bindings(HTML/WorkerGlobalScope)
libweb_js_bindings(HTML/WorkerLocation)
libweb_js_bindings(HTML/WorkerNavigator)
libweb_js_bindings(HTML/WorkletGlobalScope)
libweb_js_bindings(HTML/XMLSerializer)
libweb_js_bindings(HighResolutionTime/Performance)
libweb_js_bindings(IndexedDB/IDBCursor)
libweb_js_bindings(IndexedDB/IDBCursorWithValue)
libweb_js_bindings(IndexedDB/IDBDatabase)
@ -343,6 +398,12 @@ libweb_js_bindings(IntersectionObserver/IntersectionObserver)
libweb_js_bindings(IntersectionObserver/IntersectionObserverEntry)
libweb_js_bindings(MathML/MathMLElement)
libweb_js_bindings(MediaCapabilitiesAPI/MediaCapabilities)
libweb_js_bindings(MediaCapture/MediaDeviceInfo)
libweb_js_bindings(MediaCapture/MediaDevices)
libweb_js_bindings(MediaCapture/MediaStream)
libweb_js_bindings(MediaCapture/MediaStreamConstraints)
libweb_js_bindings(MediaCapture/MediaStreamTrack)
libweb_js_bindings(MediaCapture/MediaStreamTrackEvent)
libweb_js_bindings(MediaSourceExtensions/BufferedChangeEvent)
libweb_js_bindings(MediaSourceExtensions/ManagedMediaSource)
libweb_js_bindings(MediaSourceExtensions/ManagedSourceBuffer)
@ -350,6 +411,7 @@ libweb_js_bindings(MediaSourceExtensions/MediaSource)
libweb_js_bindings(MediaSourceExtensions/MediaSourceHandle)
libweb_js_bindings(MediaSourceExtensions/SourceBuffer)
libweb_js_bindings(MediaSourceExtensions/SourceBufferList)
libweb_js_bindings(NavigationTiming/PerformanceExtensions)
libweb_js_bindings(NavigationTiming/PerformanceNavigation)
libweb_js_bindings(NavigationTiming/PerformanceTiming)
libweb_js_bindings(NotificationsAPI/Notification)
@ -357,10 +419,12 @@ libweb_js_bindings(PerformanceTimeline/PerformanceEntry)
libweb_js_bindings(PerformanceTimeline/PerformanceObserver)
libweb_js_bindings(PerformanceTimeline/PerformanceObserverEntryList)
libweb_js_bindings(RequestIdleCallback/IdleDeadline)
libweb_js_bindings(RequestIdleCallback/IdleRequest)
libweb_js_bindings(ResizeObserver/ResizeObserver)
libweb_js_bindings(ResizeObserver/ResizeObserverEntry)
libweb_js_bindings(ResizeObserver/ResizeObserverSize)
libweb_js_bindings(ResourceTiming/PerformanceResourceTiming)
libweb_js_bindings(Selection/Selection)
libweb_js_bindings(Serial/Serial)
libweb_js_bindings(Serial/SerialPort)
libweb_js_bindings(ServiceWorker/Cache)
@ -380,24 +444,28 @@ libweb_js_bindings(Speech/SpeechRecognitionResultList)
libweb_js_bindings(Speech/SpeechSynthesis)
libweb_js_bindings(Speech/SpeechSynthesisUtterance)
libweb_js_bindings(Speech/SpeechSynthesisVoice)
libweb_js_bindings(StorageAPI/NavigatorStorage)
libweb_js_bindings(StorageAPI/StorageManager)
libweb_js_bindings(Streams/ByteLengthQueuingStrategy)
libweb_js_bindings(Streams/CountQueuingStrategy)
libweb_js_bindings(Streams/GenericTransformStream)
libweb_js_bindings(Streams/QueuingStrategy)
libweb_js_bindings(Streams/QueuingStrategyInit)
libweb_js_bindings(Streams/ReadableByteStreamController)
libweb_js_bindings(Streams/ReadableStream)
libweb_js_bindings(Streams/ReadableStreamBYOBReader)
libweb_js_bindings(Streams/ReadableStreamBYOBRequest)
libweb_js_bindings(Streams/ReadableStreamDefaultController)
libweb_js_bindings(Streams/ReadableStreamDefaultReader)
libweb_js_bindings(Streams/ReadableStreamGenericReader)
libweb_js_bindings(Streams/Transformer)
libweb_js_bindings(Streams/TransformStream)
libweb_js_bindings(Streams/TransformStreamDefaultController)
libweb_js_bindings(Streams/UnderlyingSink)
libweb_js_bindings(Streams/UnderlyingSource)
libweb_js_bindings(Streams/WritableStream)
libweb_js_bindings(Streams/WritableStreamDefaultController)
libweb_js_bindings(Streams/WritableStreamDefaultWriter)
libweb_js_bindings(TrustedTypes/TrustedHTML)
libweb_js_bindings(TrustedTypes/TrustedScript)
libweb_js_bindings(TrustedTypes/TrustedScriptURL)
libweb_js_bindings(TrustedTypes/TrustedTypePolicy)
libweb_js_bindings(TrustedTypes/TrustedTypePolicyFactory)
libweb_js_bindings(SVG/SVGAElement)
libweb_js_bindings(SVG/SVGAnimatedEnumeration)
libweb_js_bindings(SVG/SVGAnimatedInteger)
@ -409,17 +477,12 @@ libweb_js_bindings(SVG/SVGAnimatedRect)
libweb_js_bindings(SVG/SVGAnimatedString)
libweb_js_bindings(SVG/SVGAnimatedTransformList)
libweb_js_bindings(SVG/SVGAnimationElement)
libweb_js_bindings(SVG/SVGCircleElement)
libweb_js_bindings(SVG/SVGClipPathElement)
libweb_js_bindings(SVG/SVGComponentTransferFunctionElement)
libweb_js_bindings(SVG/SVGDefsElement)
libweb_js_bindings(SVG/SVGDescElement)
libweb_js_bindings(SVG/SVGElement)
libweb_js_bindings(SVG/SVGGElement)
libweb_js_bindings(SVG/SVGGeometryElement)
libweb_js_bindings(SVG/SVGGradientElement)
libweb_js_bindings(SVG/SVGGraphicsElement)
libweb_js_bindings(SVG/SVGImageElement)
libweb_js_bindings(SVG/SVGCircleElement)
libweb_js_bindings(SVG/SVGEllipseElement)
libweb_js_bindings(SVG/SVGFEBlendElement)
libweb_js_bindings(SVG/SVGFEColorMatrixElement)
@ -440,11 +503,18 @@ libweb_js_bindings(SVG/SVGFEMorphologyElement)
libweb_js_bindings(SVG/SVGFEOffsetElement)
libweb_js_bindings(SVG/SVGFETurbulenceElement)
libweb_js_bindings(SVG/SVGFilterElement)
libweb_js_bindings(SVG/SVGFilterPrimitiveStandardAttributes)
libweb_js_bindings(SVG/SVGFitToViewBox)
libweb_js_bindings(SVG/SVGForeignObjectElement)
libweb_js_bindings(SVG/SVGGElement)
libweb_js_bindings(SVG/SVGGeometryElement)
libweb_js_bindings(SVG/SVGGradientElement)
libweb_js_bindings(SVG/SVGGraphicsElement)
libweb_js_bindings(SVG/SVGImageElement)
libweb_js_bindings(SVG/SVGLength)
libweb_js_bindings(SVG/SVGLengthList)
libweb_js_bindings(SVG/SVGLineElement)
libweb_js_bindings(SVG/SVGLinearGradientElement)
libweb_js_bindings(SVG/SVGLineElement)
libweb_js_bindings(SVG/SVGMaskElement)
libweb_js_bindings(SVG/SVGMetadataElement)
libweb_js_bindings(SVG/SVGNumber)
@ -456,9 +526,9 @@ libweb_js_bindings(SVG/SVGPolylineElement)
libweb_js_bindings(SVG/SVGRadialGradientElement)
libweb_js_bindings(SVG/SVGRectElement)
libweb_js_bindings(SVG/SVGScriptElement)
libweb_js_bindings(SVG/SVGSVGElement)
libweb_js_bindings(SVG/SVGStopElement)
libweb_js_bindings(SVG/SVGStyleElement)
libweb_js_bindings(SVG/SVGSVGElement)
libweb_js_bindings(SVG/SVGSymbolElement)
libweb_js_bindings(SVG/SVGTextContentElement)
libweb_js_bindings(SVG/SVGTextElement)
@ -469,16 +539,22 @@ libweb_js_bindings(SVG/SVGTransform)
libweb_js_bindings(SVG/SVGTransformList)
libweb_js_bindings(SVG/SVGTSpanElement)
libweb_js_bindings(SVG/SVGUnitTypes)
libweb_js_bindings(SVG/SVGURIReference)
libweb_js_bindings(SVG/SVGUseElement)
libweb_js_bindings(SVG/SVGViewElement)
libweb_js_bindings(Selection/Selection)
libweb_js_bindings(StorageAPI/StorageManager)
libweb_js_bindings(TrustedTypes/TrustedHTML)
libweb_js_bindings(TrustedTypes/TrustedScript)
libweb_js_bindings(TrustedTypes/TrustedScriptURL)
libweb_js_bindings(TrustedTypes/TrustedTypePolicy)
libweb_js_bindings(TrustedTypes/TrustedTypePolicyFactory)
libweb_js_bindings(UIEvents/CompositionEvent)
libweb_js_bindings(UIEvents/EventModifier)
libweb_js_bindings(UIEvents/FocusEvent)
libweb_js_bindings(UIEvents/InputEvent)
libweb_js_bindings(UIEvents/KeyboardEvent)
libweb_js_bindings(UIEvents/MouseEvent)
libweb_js_bindings(UIEvents/PointerEvent)
libweb_js_bindings(UIEvents/PointerEventHandlers)
libweb_js_bindings(UIEvents/TextEvent)
libweb_js_bindings(UIEvents/UIEvent)
libweb_js_bindings(UIEvents/WheelEvent)
@ -503,11 +579,11 @@ libweb_js_bindings(WebAudio/AudioParam)
libweb_js_bindings(WebAudio/AudioScheduledSourceNode)
libweb_js_bindings(WebAudio/BaseAudioContext)
libweb_js_bindings(WebAudio/BiquadFilterNode)
libweb_js_bindings(WebAudio/DynamicsCompressorNode)
libweb_js_bindings(WebAudio/ChannelMergerNode)
libweb_js_bindings(WebAudio/ChannelSplitterNode)
libweb_js_bindings(WebAudio/ConstantSourceNode)
libweb_js_bindings(WebAudio/DelayNode)
libweb_js_bindings(WebAudio/DynamicsCompressorNode)
libweb_js_bindings(WebAudio/GainNode)
libweb_js_bindings(WebAudio/MediaElementAudioSourceNode)
libweb_js_bindings(WebAudio/OfflineAudioCompletionEvent)
@ -531,7 +607,10 @@ libweb_js_bindings(WebGL/Extensions/WebGLCompressedTextureS3tcSrgb)
libweb_js_bindings(WebGL/Extensions/WebGLDebugRendererInfo)
libweb_js_bindings(WebGL/Extensions/WebGLDrawBuffers)
libweb_js_bindings(WebGL/Extensions/WebGLVertexArrayObjectOES)
libweb_js_bindings(WebGL/Types)
libweb_js_bindings(WebGL/WebGL2RenderingContext)
libweb_js_bindings(WebGL/WebGL2RenderingContextBase)
libweb_js_bindings(WebGL/WebGL2RenderingContextOverloads)
libweb_js_bindings(WebGL/WebGLActiveInfo)
libweb_js_bindings(WebGL/WebGLBuffer)
libweb_js_bindings(WebGL/WebGLContextEvent)
@ -541,6 +620,8 @@ libweb_js_bindings(WebGL/WebGLProgram)
libweb_js_bindings(WebGL/WebGLQuery)
libweb_js_bindings(WebGL/WebGLRenderbuffer)
libweb_js_bindings(WebGL/WebGLRenderingContext)
libweb_js_bindings(WebGL/WebGLRenderingContextBase)
libweb_js_bindings(WebGL/WebGLRenderingContextOverloads)
libweb_js_bindings(WebGL/WebGLSampler)
libweb_js_bindings(WebGL/WebGLShader)
libweb_js_bindings(WebGL/WebGLShaderPrecisionFormat)
@ -550,6 +631,7 @@ libweb_js_bindings(WebGL/WebGLTransformFeedback)
libweb_js_bindings(WebGL/WebGLUniformLocation)
libweb_js_bindings(WebGL/WebGLVertexArrayObject)
libweb_js_bindings(WebIDL/DOMException)
libweb_js_bindings(WebIDL/Function)
libweb_js_bindings(WebIDL/QuotaExceededError)
libweb_js_bindings(WebSockets/WebSocket)
libweb_js_bindings(WebVTT/VTTCue)
@ -565,90 +647,7 @@ libweb_js_bindings(XHR/ProgressEvent)
libweb_js_bindings(XHR/XMLHttpRequest)
libweb_js_bindings(XHR/XMLHttpRequestEventTarget)
libweb_js_bindings(XHR/XMLHttpRequestUpload)
libweb_js_bindings(XPath/XPathResult)
libweb_js_bindings(XPath/XPathExpression)
libweb_js_bindings(XPath/XPathEvaluator)
libweb_support_idl(ARIA/ARIAMixin)
libweb_support_idl(Animations/Animatable)
libweb_support_idl(CSS/ElementCSSInlineStyle)
libweb_support_idl(CSS/LinkStyle)
libweb_support_idl(DOM/ChildNode)
libweb_support_idl(DOM/DocumentOrShadowRoot)
libweb_support_idl(DOM/EventHandler)
libweb_support_idl(DOM/EventListener)
libweb_support_idl(DOM/ParentNode)
libweb_support_idl(DOM/Slottable)
libweb_support_idl(Encoding/TextDecoderCommon)
libweb_support_idl(Encoding/TextEncoderCommon)
libweb_support_idl(Fetch/Body)
libweb_support_idl(Fetch/BodyInit)
libweb_support_idl(Fullscreen/DocumentExtensions)
libweb_support_idl(Fullscreen/DocumentOrShadowRootExtensions)
libweb_support_idl(Fullscreen/ElementExtensions)
libweb_support_idl(GPC/GlobalPrivacyControl)
libweb_support_idl(HTML/AbstractWorker)
libweb_support_idl(HTML/CanvasRenderingContext2DSettings)
libweb_support_idl(HTML/AnimationFrameProvider)
libweb_support_idl(HTML/Canvas/CanvasCompositing)
libweb_support_idl(HTML/Canvas/CanvasDrawImage)
libweb_support_idl(HTML/Canvas/CanvasDrawPath)
libweb_support_idl(HTML/Canvas/CanvasFillStrokeStyles)
libweb_support_idl(HTML/Canvas/CanvasFilters)
libweb_support_idl(HTML/Canvas/CanvasImageData)
libweb_support_idl(HTML/Canvas/CanvasImageSmoothing)
libweb_support_idl(HTML/Canvas/CanvasPath)
libweb_support_idl(HTML/Canvas/CanvasPathDrawingStyles)
libweb_support_idl(HTML/Canvas/CanvasRect)
libweb_support_idl(HTML/Canvas/CanvasSettings)
libweb_support_idl(HTML/Canvas/CanvasShadowStyles)
libweb_support_idl(HTML/Canvas/CanvasState)
libweb_support_idl(HTML/Canvas/CanvasText)
libweb_support_idl(HTML/Canvas/CanvasTextDrawingStyles)
libweb_support_idl(HTML/Canvas/CanvasTransform)
libweb_support_idl(HTML/Canvas/CanvasUserInterface)
libweb_support_idl(HTML/Canvas/OffscreenCanvasBase)
libweb_support_idl(HTML/HTMLHyperlinkElementUtils)
libweb_support_idl(HTML/HTMLOrSVGOrMathMLElement)
libweb_support_idl(HTML/NavigationType)
libweb_support_idl(HTML/NavigatorBeacon)
libweb_support_idl(HTML/NavigatorConcurrentHardware)
libweb_support_idl(HTML/NavigatorDeviceMemory)
libweb_support_idl(HTML/NavigatorID)
libweb_support_idl(HTML/NavigatorLanguage)
libweb_support_idl(HTML/NavigatorOnLine)
libweb_support_idl(HTML/PredefinedColorSpace)
libweb_support_idl(HTML/PopoverTargetAttributes)
libweb_support_idl(HTML/Scripting/Fetching)
libweb_support_idl(HTML/UniversalGlobalScope)
libweb_support_idl(HTML/WindowDeprecated)
libweb_support_idl(HTML/WindowLocalStorage)
libweb_support_idl(HTML/WindowOrWorkerGlobalScope)
libweb_support_idl(HTML/WindowSessionStorage)
libweb_support_idl(HighResolutionTime/DOMHighResTimeStamp)
libweb_support_idl(HighResolutionTime/EpochTimeStamp)
libweb_support_idl(MediaCapture/MediaStreamConstraints)
libweb_support_idl(NavigationTiming/PerformanceExtensions)
libweb_support_idl(RequestIdleCallback/IdleRequest)
libweb_support_idl(SVG/SVGFilterPrimitiveStandardAttributes)
libweb_support_idl(SVG/SVGFitToViewBox)
libweb_support_idl(SVG/SVGURIReference)
libweb_support_idl(StorageAPI/NavigatorStorage)
libweb_support_idl(Streams/GenericTransformStream)
libweb_support_idl(Streams/QueuingStrategy)
libweb_support_idl(Streams/QueuingStrategyInit)
libweb_support_idl(Streams/ReadableStreamGenericReader)
libweb_support_idl(Streams/UnderlyingSink)
libweb_support_idl(Streams/UnderlyingSource)
libweb_support_idl(Streams/Transformer)
libweb_support_idl(UIEvents/EventModifier)
libweb_support_idl(UIEvents/PointerEventHandlers)
libweb_support_idl(WebGL/Types)
libweb_support_idl(WebGL/WebGL2RenderingContextBase)
libweb_support_idl(WebGL/WebGL2RenderingContextOverloads)
libweb_support_idl(WebGL/WebGLRenderingContextBase)
libweb_support_idl(WebGL/WebGLRenderingContextOverloads)
libweb_support_idl(WebIDL/Function)
libweb_support_idl(XPath/XPathNSResolver)
libweb_generated_support_idl(CSS/GeneratedCSSStyleProperties)
libweb_generated_support_idl(CSS/GeneratedCSSNumericFactoryMethods)
libweb_js_bindings(XPath/XPathExpression)
libweb_js_bindings(XPath/XPathNSResolver)
libweb_js_bindings(XPath/XPathResult)

View file

@ -266,26 +266,18 @@ function (generate_js_bindings target)
endmacro()
function(libweb_js_bindings class)
get_filename_component(basename "${class}" NAME)
set(idl_path "${LIBWEB_INPUT_FOLDER}/${class}.idl")
if ("${basename}.idl" IN_LIST LIBWEB_ALL_GENERATED_IDL)
set(idl_path "${CMAKE_CURRENT_BINARY_DIR}/${class}.idl")
endif()
libweb_add_bindings_source(${class})
list(APPEND LIBWEB_ALL_IDL_FILES "${LIBWEB_INPUT_FOLDER}/${class}.idl")
list(APPEND LIBWEB_ALL_IDL_FILES "${idl_path}")
set(LIBWEB_ALL_IDL_FILES ${LIBWEB_ALL_IDL_FILES} PARENT_SCOPE)
list(APPEND LIBWEB_ALL_PARSED_IDL_FILES "${LIBWEB_INPUT_FOLDER}/${class}.idl")
set(LIBWEB_ALL_PARSED_IDL_FILES ${LIBWEB_ALL_PARSED_IDL_FILES} PARENT_SCOPE)
endfunction()
function(libweb_support_idl class)
libweb_add_bindings_source(${class})
list(APPEND LIBWEB_ALL_PARSED_IDL_FILES "${LIBWEB_INPUT_FOLDER}/${class}.idl")
set(LIBWEB_ALL_PARSED_IDL_FILES ${LIBWEB_ALL_PARSED_IDL_FILES} PARENT_SCOPE)
endfunction()
function(libweb_generated_support_idl class)
libweb_add_bindings_source(${class})
list(APPEND LIBWEB_ALL_PARSED_IDL_FILES "${CMAKE_CURRENT_BINARY_DIR}/${class}.idl")
list(APPEND LIBWEB_ALL_PARSED_IDL_FILES "${idl_path}")
set(LIBWEB_ALL_PARSED_IDL_FILES ${LIBWEB_ALL_PARSED_IDL_FILES} PARENT_SCOPE)
endfunction()

View file

@ -691,7 +691,9 @@ def main() -> int:
for path in read_input_paths(arguments.paths):
interface = parse_module(path, path.read_text(encoding="utf-8")).interface
if interface is None:
raise RuntimeError(f"Interface for file {path} missing")
continue
if not should_have_interface_object(interface):
continue
interface_sets.add_interface(interface)
write_generated_file(

View file

@ -153,9 +153,6 @@ class Parser:
self.consume_whitespace()
if module.interface is None:
self.raise_parse_error("did not find an interface, callback interface, or namespace")
return module
def set_or_check_module_interface(