LibWeb: Move some classes from the DOM namespace to the HTML namespace

The following classes are in the HTML spec and thus belong in the HTML
namespace:

* BeforeUnloadEvent
* HTMLFormControlsCollection
* RadioNodeList
This commit is contained in:
Timothy Flynn 2024-11-02 09:22:13 -04:00 committed by Tim Flynn
commit 13b7355ec1
Notes: github-actions[bot] 2024-11-02 15:17:36 +00:00
22 changed files with 72 additions and 71 deletions

View file

@ -8,7 +8,6 @@ source_set("DOM") {
"AccessibilityTreeNode.cpp", "AccessibilityTreeNode.cpp",
"AdoptedStyleSheets.cpp", "AdoptedStyleSheets.cpp",
"Attr.cpp", "Attr.cpp",
"BeforeUnloadEvent.cpp",
"CDATASection.cpp", "CDATASection.cpp",
"CharacterData.cpp", "CharacterData.cpp",
"Comment.cpp", "Comment.cpp",
@ -28,7 +27,6 @@ source_set("DOM") {
"EventDispatcher.cpp", "EventDispatcher.cpp",
"EventTarget.cpp", "EventTarget.cpp",
"HTMLCollection.cpp", "HTMLCollection.cpp",
"HTMLFormControlsCollection.cpp",
"IDLEventListener.cpp", "IDLEventListener.cpp",
"LiveNodeList.cpp", "LiveNodeList.cpp",
"MutationObserver.cpp", "MutationObserver.cpp",
@ -44,7 +42,6 @@ source_set("DOM") {
"Position.cpp", "Position.cpp",
"ProcessingInstruction.cpp", "ProcessingInstruction.cpp",
"QualifiedName.cpp", "QualifiedName.cpp",
"RadioNodeList.cpp",
"Range.cpp", "Range.cpp",
"ShadowRoot.cpp", "ShadowRoot.cpp",
"Slot.cpp", "Slot.cpp",

View file

@ -18,6 +18,7 @@ source_set("HTML") {
"AttributeNames.cpp", "AttributeNames.cpp",
"AudioTrack.cpp", "AudioTrack.cpp",
"AudioTrackList.cpp", "AudioTrackList.cpp",
"BeforeUnloadEvent.cpp",
"BroadcastChannel.cpp", "BroadcastChannel.cpp",
"BrowsingContext.cpp", "BrowsingContext.cpp",
"BrowsingContextGroup.cpp", "BrowsingContextGroup.cpp",
@ -73,6 +74,7 @@ source_set("HTML") {
"HTMLEmbedElement.cpp", "HTMLEmbedElement.cpp",
"HTMLFieldSetElement.cpp", "HTMLFieldSetElement.cpp",
"HTMLFontElement.cpp", "HTMLFontElement.cpp",
"HTMLFormControlsCollection.cpp",
"HTMLFormElement.cpp", "HTMLFormElement.cpp",
"HTMLFrameElement.cpp", "HTMLFrameElement.cpp",
"HTMLFrameSetElement.cpp", "HTMLFrameSetElement.cpp",
@ -163,6 +165,7 @@ source_set("HTML") {
"PopStateEvent.cpp", "PopStateEvent.cpp",
"PotentialCORSRequest.cpp", "PotentialCORSRequest.cpp",
"PromiseRejectionEvent.cpp", "PromiseRejectionEvent.cpp",
"RadioNodeList.cpp",
"SelectItem.cpp", "SelectItem.cpp",
"SelectedFile.cpp", "SelectedFile.cpp",
"ServiceWorker.cpp", "ServiceWorker.cpp",

View file

@ -67,7 +67,6 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/DOM/AbortSignal.idl", "//Userland/Libraries/LibWeb/DOM/AbortSignal.idl",
"//Userland/Libraries/LibWeb/DOM/AbstractRange.idl", "//Userland/Libraries/LibWeb/DOM/AbstractRange.idl",
"//Userland/Libraries/LibWeb/DOM/Attr.idl", "//Userland/Libraries/LibWeb/DOM/Attr.idl",
"//Userland/Libraries/LibWeb/DOM/BeforeUnloadEvent.idl",
"//Userland/Libraries/LibWeb/DOM/CDATASection.idl", "//Userland/Libraries/LibWeb/DOM/CDATASection.idl",
"//Userland/Libraries/LibWeb/DOM/CharacterData.idl", "//Userland/Libraries/LibWeb/DOM/CharacterData.idl",
"//Userland/Libraries/LibWeb/DOM/Comment.idl", "//Userland/Libraries/LibWeb/DOM/Comment.idl",
@ -81,7 +80,6 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/DOM/Event.idl", "//Userland/Libraries/LibWeb/DOM/Event.idl",
"//Userland/Libraries/LibWeb/DOM/EventTarget.idl", "//Userland/Libraries/LibWeb/DOM/EventTarget.idl",
"//Userland/Libraries/LibWeb/DOM/HTMLCollection.idl", "//Userland/Libraries/LibWeb/DOM/HTMLCollection.idl",
"//Userland/Libraries/LibWeb/DOM/HTMLFormControlsCollection.idl",
"//Userland/Libraries/LibWeb/DOM/MutationObserver.idl", "//Userland/Libraries/LibWeb/DOM/MutationObserver.idl",
"//Userland/Libraries/LibWeb/DOM/MutationRecord.idl", "//Userland/Libraries/LibWeb/DOM/MutationRecord.idl",
"//Userland/Libraries/LibWeb/DOM/NamedNodeMap.idl", "//Userland/Libraries/LibWeb/DOM/NamedNodeMap.idl",
@ -90,7 +88,6 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/DOM/NodeIterator.idl", "//Userland/Libraries/LibWeb/DOM/NodeIterator.idl",
"//Userland/Libraries/LibWeb/DOM/NodeList.idl", "//Userland/Libraries/LibWeb/DOM/NodeList.idl",
"//Userland/Libraries/LibWeb/DOM/ProcessingInstruction.idl", "//Userland/Libraries/LibWeb/DOM/ProcessingInstruction.idl",
"//Userland/Libraries/LibWeb/DOM/RadioNodeList.idl",
"//Userland/Libraries/LibWeb/DOM/Range.idl", "//Userland/Libraries/LibWeb/DOM/Range.idl",
"//Userland/Libraries/LibWeb/DOM/ShadowRoot.idl", "//Userland/Libraries/LibWeb/DOM/ShadowRoot.idl",
"//Userland/Libraries/LibWeb/DOM/StaticRange.idl", "//Userland/Libraries/LibWeb/DOM/StaticRange.idl",
@ -120,6 +117,7 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/HighResolutionTime/Performance.idl", "//Userland/Libraries/LibWeb/HighResolutionTime/Performance.idl",
"//Userland/Libraries/LibWeb/HTML/AudioTrack.idl", "//Userland/Libraries/LibWeb/HTML/AudioTrack.idl",
"//Userland/Libraries/LibWeb/HTML/AudioTrackList.idl", "//Userland/Libraries/LibWeb/HTML/AudioTrackList.idl",
"//Userland/Libraries/LibWeb/HTML/BeforeUnloadEvent.idl",
"//Userland/Libraries/LibWeb/HTML/BroadcastChannel.idl", "//Userland/Libraries/LibWeb/HTML/BroadcastChannel.idl",
"//Userland/Libraries/LibWeb/HTML/CanvasGradient.idl", "//Userland/Libraries/LibWeb/HTML/CanvasGradient.idl",
"//Userland/Libraries/LibWeb/HTML/CanvasPattern.idl", "//Userland/Libraries/LibWeb/HTML/CanvasPattern.idl",
@ -161,6 +159,7 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/HTML/HTMLEmbedElement.idl", "//Userland/Libraries/LibWeb/HTML/HTMLEmbedElement.idl",
"//Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.idl", "//Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.idl",
"//Userland/Libraries/LibWeb/HTML/HTMLFontElement.idl", "//Userland/Libraries/LibWeb/HTML/HTMLFontElement.idl",
"//Userland/Libraries/LibWeb/HTML/HTMLFormControlsCollection.idl",
"//Userland/Libraries/LibWeb/HTML/HTMLFormElement.idl", "//Userland/Libraries/LibWeb/HTML/HTMLFormElement.idl",
"//Userland/Libraries/LibWeb/HTML/HTMLFrameElement.idl", "//Userland/Libraries/LibWeb/HTML/HTMLFrameElement.idl",
"//Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.idl", "//Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.idl",
@ -237,6 +236,7 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/HTML/PluginArray.idl", "//Userland/Libraries/LibWeb/HTML/PluginArray.idl",
"//Userland/Libraries/LibWeb/HTML/PopStateEvent.idl", "//Userland/Libraries/LibWeb/HTML/PopStateEvent.idl",
"//Userland/Libraries/LibWeb/HTML/PromiseRejectionEvent.idl", "//Userland/Libraries/LibWeb/HTML/PromiseRejectionEvent.idl",
"//Userland/Libraries/LibWeb/HTML/RadioNodeList.idl",
"//Userland/Libraries/LibWeb/HTML/ServiceWorker.idl", "//Userland/Libraries/LibWeb/HTML/ServiceWorker.idl",
"//Userland/Libraries/LibWeb/HTML/ServiceWorkerContainer.idl", "//Userland/Libraries/LibWeb/HTML/ServiceWorkerContainer.idl",
"//Userland/Libraries/LibWeb/HTML/ServiceWorkerRegistration.idl", "//Userland/Libraries/LibWeb/HTML/ServiceWorkerRegistration.idl",

View file

@ -164,7 +164,6 @@ set(SOURCES
DOM/AccessibilityTreeNode.cpp DOM/AccessibilityTreeNode.cpp
DOM/AdoptedStyleSheets.cpp DOM/AdoptedStyleSheets.cpp
DOM/Attr.cpp DOM/Attr.cpp
DOM/BeforeUnloadEvent.cpp
DOM/CDATASection.cpp DOM/CDATASection.cpp
DOM/CharacterData.cpp DOM/CharacterData.cpp
DOM/Comment.cpp DOM/Comment.cpp
@ -185,7 +184,6 @@ set(SOURCES
DOM/EventDispatcher.cpp DOM/EventDispatcher.cpp
DOM/EventTarget.cpp DOM/EventTarget.cpp
DOM/HTMLCollection.cpp DOM/HTMLCollection.cpp
DOM/HTMLFormControlsCollection.cpp
DOM/IDLEventListener.cpp DOM/IDLEventListener.cpp
DOM/LiveNodeList.cpp DOM/LiveNodeList.cpp
DOM/MutationObserver.cpp DOM/MutationObserver.cpp
@ -201,7 +199,6 @@ set(SOURCES
DOM/Position.cpp DOM/Position.cpp
DOM/ProcessingInstruction.cpp DOM/ProcessingInstruction.cpp
DOM/QualifiedName.cpp DOM/QualifiedName.cpp
DOM/RadioNodeList.cpp
DOM/Range.cpp DOM/Range.cpp
DOM/ShadowRoot.cpp DOM/ShadowRoot.cpp
DOM/Slot.cpp DOM/Slot.cpp
@ -274,6 +271,7 @@ set(SOURCES
HTML/AttributeNames.cpp HTML/AttributeNames.cpp
HTML/AudioTrack.cpp HTML/AudioTrack.cpp
HTML/AudioTrackList.cpp HTML/AudioTrackList.cpp
HTML/BeforeUnloadEvent.cpp
HTML/BroadcastChannel.cpp HTML/BroadcastChannel.cpp
HTML/BrowsingContext.cpp HTML/BrowsingContext.cpp
HTML/BrowsingContextGroup.cpp HTML/BrowsingContextGroup.cpp
@ -343,6 +341,7 @@ set(SOURCES
HTML/HTMLEmbedElement.cpp HTML/HTMLEmbedElement.cpp
HTML/HTMLFieldSetElement.cpp HTML/HTMLFieldSetElement.cpp
HTML/HTMLFontElement.cpp HTML/HTMLFontElement.cpp
HTML/HTMLFormControlsCollection.cpp
HTML/HTMLFormElement.cpp HTML/HTMLFormElement.cpp
HTML/HTMLFrameElement.cpp HTML/HTMLFrameElement.cpp
HTML/HTMLFrameSetElement.cpp HTML/HTMLFrameSetElement.cpp
@ -439,6 +438,7 @@ set(SOURCES
HTML/PluginArray.cpp HTML/PluginArray.cpp
HTML/PotentialCORSRequest.cpp HTML/PotentialCORSRequest.cpp
HTML/PromiseRejectionEvent.cpp HTML/PromiseRejectionEvent.cpp
HTML/RadioNodeList.cpp
HTML/Scripting/ClassicScript.cpp HTML/Scripting/ClassicScript.cpp
HTML/Scripting/Environments.cpp HTML/Scripting/Environments.cpp
HTML/Scripting/EnvironmentSettingsSnapshot.cpp HTML/Scripting/EnvironmentSettingsSnapshot.cpp

View file

@ -40,7 +40,6 @@
#include <LibWeb/Cookie/ParsedCookie.h> #include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/DOM/AdoptedStyleSheets.h> #include <LibWeb/DOM/AdoptedStyleSheets.h>
#include <LibWeb/DOM/Attr.h> #include <LibWeb/DOM/Attr.h>
#include <LibWeb/DOM/BeforeUnloadEvent.h>
#include <LibWeb/DOM/CDATASection.h> #include <LibWeb/DOM/CDATASection.h>
#include <LibWeb/DOM/Comment.h> #include <LibWeb/DOM/Comment.h>
#include <LibWeb/DOM/CustomEvent.h> #include <LibWeb/DOM/CustomEvent.h>
@ -69,6 +68,7 @@
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h> #include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
#include <LibWeb/FileAPI/BlobURLStore.h> #include <LibWeb/FileAPI/BlobURLStore.h>
#include <LibWeb/HTML/AttributeNames.h> #include <LibWeb/HTML/AttributeNames.h>
#include <LibWeb/HTML/BeforeUnloadEvent.h>
#include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/HTML/CustomElements/CustomElementDefinition.h> #include <LibWeb/HTML/CustomElements/CustomElementDefinition.h>
#include <LibWeb/HTML/CustomElements/CustomElementReactionNames.h> #include <LibWeb/HTML/CustomElements/CustomElementReactionNames.h>
@ -1763,7 +1763,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Event>> Document::create_event(StringView i
// 2. If interface is an ASCII case-insensitive match for any of the strings in the first column in the following table, // 2. If interface is an ASCII case-insensitive match for any of the strings in the first column in the following table,
// then set constructor to the interface in the second column on the same row as the matching string: // then set constructor to the interface in the second column on the same row as the matching string:
if (Infra::is_ascii_case_insensitive_match(interface, "beforeunloadevent"sv)) { if (Infra::is_ascii_case_insensitive_match(interface, "beforeunloadevent"sv)) {
event = BeforeUnloadEvent::create(realm, FlyString {}); event = HTML::BeforeUnloadEvent::create(realm, FlyString {});
} else if (Infra::is_ascii_case_insensitive_match(interface, "compositionevent"sv)) { } else if (Infra::is_ascii_case_insensitive_match(interface, "compositionevent"sv)) {
event = UIEvents::CompositionEvent::create(realm, String {}); event = UIEvents::CompositionEvent::create(realm, String {});
} else if (Infra::is_ascii_case_insensitive_match(interface, "customevent"sv)) { } else if (Infra::is_ascii_case_insensitive_match(interface, "customevent"sv)) {
@ -5697,7 +5697,7 @@ Document::StepsToFireBeforeunloadResult Document::steps_to_fire_beforeunload(boo
// using BeforeUnloadEvent, with the cancelable attribute initialized to true. // using BeforeUnloadEvent, with the cancelable attribute initialized to true.
auto& global_object = HTML::relevant_global_object(*this); auto& global_object = HTML::relevant_global_object(*this);
auto& window = verify_cast<HTML::Window>(global_object); auto& window = verify_cast<HTML::Window>(global_object);
auto beforeunload_event = BeforeUnloadEvent::create(realm(), HTML::EventNames::beforeunload); auto beforeunload_event = HTML::BeforeUnloadEvent::create(realm(), HTML::EventNames::beforeunload);
beforeunload_event->set_cancelable(true); beforeunload_event->set_cancelable(true);
auto event_firing_result = window.dispatch_event(*beforeunload_event); auto event_firing_result = window.dispatch_event(*beforeunload_event);

View file

@ -16,13 +16,13 @@
#include <LibWeb/Bindings/EventTargetPrototype.h> #include <LibWeb/Bindings/EventTargetPrototype.h>
#include <LibWeb/Bindings/MainThreadVM.h> #include <LibWeb/Bindings/MainThreadVM.h>
#include <LibWeb/DOM/AbortSignal.h> #include <LibWeb/DOM/AbortSignal.h>
#include <LibWeb/DOM/BeforeUnloadEvent.h>
#include <LibWeb/DOM/DOMEventListener.h> #include <LibWeb/DOM/DOMEventListener.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h> #include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/EventDispatcher.h> #include <LibWeb/DOM/EventDispatcher.h>
#include <LibWeb/DOM/EventTarget.h> #include <LibWeb/DOM/EventTarget.h>
#include <LibWeb/DOM/IDLEventListener.h> #include <LibWeb/DOM/IDLEventListener.h>
#include <LibWeb/HTML/BeforeUnloadEvent.h>
#include <LibWeb/HTML/CloseWatcherManager.h> #include <LibWeb/HTML/CloseWatcherManager.h>
#include <LibWeb/HTML/ErrorEvent.h> #include <LibWeb/HTML/ErrorEvent.h>
#include <LibWeb/HTML/EventHandler.h> #include <LibWeb/HTML/EventHandler.h>
@ -691,7 +691,7 @@ JS::ThrowCompletionOr<void> EventTarget::process_event_handler_for_event(FlyStri
auto return_value = *return_value_or_error.value(); auto return_value = *return_value_or_error.value();
// 5. Process return value as follows: // 5. Process return value as follows:
if (is<BeforeUnloadEvent>(event) && event.type() == "beforeunload") { if (is<HTML::BeforeUnloadEvent>(event) && event.type() == "beforeunload") {
// -> If event is a BeforeUnloadEvent object and event's type is "beforeunload" // -> If event is a BeforeUnloadEvent object and event's type is "beforeunload"
// If return value is not null, then: // If return value is not null, then:
if (!return_value.is_nullish()) { if (!return_value.is_nullish()) {
@ -699,7 +699,7 @@ JS::ThrowCompletionOr<void> EventTarget::process_event_handler_for_event(FlyStri
event.set_cancelled(true); event.set_cancelled(true);
// 2. If event's returnValue attribute's value is the empty string, then set event's returnValue attribute's value to return value. // 2. If event's returnValue attribute's value is the empty string, then set event's returnValue attribute's value to return value.
auto& before_unload_event = static_cast<BeforeUnloadEvent&>(event); auto& before_unload_event = static_cast<HTML::BeforeUnloadEvent&>(event);
if (before_unload_event.return_value().is_empty()) if (before_unload_event.return_value().is_empty())
before_unload_event.set_return_value(TRY(return_value.to_string(vm()))); before_unload_event.set_return_value(TRY(return_value.to_string(vm())));
} }

View file

@ -254,7 +254,6 @@ class AbortSignal;
class AbstractRange; class AbstractRange;
class AccessibilityTreeNode; class AccessibilityTreeNode;
class Attr; class Attr;
class BeforeUnloadEvent;
class CDATASection; class CDATASection;
class CharacterData; class CharacterData;
class Comment; class Comment;
@ -273,7 +272,6 @@ class Event;
class EventHandler; class EventHandler;
class EventTarget; class EventTarget;
class HTMLCollection; class HTMLCollection;
class HTMLFormControlsCollection;
class IDLEventListener; class IDLEventListener;
class LiveNodeList; class LiveNodeList;
class MutationObserver; class MutationObserver;
@ -286,7 +284,6 @@ class NodeList;
class ParentNode; class ParentNode;
class Position; class Position;
class ProcessingInstruction; class ProcessingInstruction;
class RadioNodeList;
class Range; class Range;
class RegisteredObserver; class RegisteredObserver;
class ShadowRoot; class ShadowRoot;
@ -378,6 +375,7 @@ namespace Web::HTML {
class AnimationFrameCallbackDriver; class AnimationFrameCallbackDriver;
class AudioTrack; class AudioTrack;
class AudioTrackList; class AudioTrackList;
class BeforeUnloadEvent;
class BroadcastChannel; class BroadcastChannel;
class BrowsingContext; class BrowsingContext;
class BrowsingContextGroup; class BrowsingContextGroup;
@ -426,6 +424,7 @@ class HTMLElement;
class HTMLEmbedElement; class HTMLEmbedElement;
class HTMLFieldSetElement; class HTMLFieldSetElement;
class HTMLFontElement; class HTMLFontElement;
class HTMLFormControlsCollection;
class HTMLFormElement; class HTMLFormElement;
class HTMLFrameElement; class HTMLFrameElement;
class HTMLFrameSetElement; class HTMLFrameSetElement;
@ -507,6 +506,7 @@ class Path2D;
class Plugin; class Plugin;
class PluginArray; class PluginArray;
class PromiseRejectionEvent; class PromiseRejectionEvent;
class RadioNodeList;
class SelectedFile; class SelectedFile;
class ServiceWorkerContainer; class ServiceWorkerContainer;
class ServiceWorkerRegistration; class ServiceWorkerRegistration;

View file

@ -6,9 +6,9 @@
#include <LibWeb/Bindings/BeforeUnloadEventPrototype.h> #include <LibWeb/Bindings/BeforeUnloadEventPrototype.h>
#include <LibWeb/Bindings/Intrinsics.h> #include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/DOM/BeforeUnloadEvent.h> #include <LibWeb/HTML/BeforeUnloadEvent.h>
namespace Web::DOM { namespace Web::HTML {
JS_DEFINE_ALLOCATOR(BeforeUnloadEvent); JS_DEFINE_ALLOCATOR(BeforeUnloadEvent);

View file

@ -9,7 +9,7 @@
#include <AK/FlyString.h> #include <AK/FlyString.h>
#include <LibWeb/DOM/Event.h> #include <LibWeb/DOM/Event.h>
namespace Web::DOM { namespace Web::HTML {
class BeforeUnloadEvent final : public DOM::Event { class BeforeUnloadEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(BeforeUnloadEvent, DOM::Event); WEB_PLATFORM_OBJECT(BeforeUnloadEvent, DOM::Event);

View file

@ -8,20 +8,21 @@
#include <LibWeb/Bindings/Intrinsics.h> #include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/DOM/Element.h> #include <LibWeb/DOM/Element.h>
#include <LibWeb/DOM/HTMLCollection.h> #include <LibWeb/DOM/HTMLCollection.h>
#include <LibWeb/DOM/HTMLFormControlsCollection.h>
#include <LibWeb/DOM/ParentNode.h> #include <LibWeb/DOM/ParentNode.h>
#include <LibWeb/HTML/HTMLFormControlsCollection.h>
#include <LibWeb/HTML/RadioNodeList.h>
namespace Web::DOM { namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLFormControlsCollection); JS_DEFINE_ALLOCATOR(HTMLFormControlsCollection);
JS::NonnullGCPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(ParentNode& root, Scope scope, Function<bool(Element const&)> filter) JS::NonnullGCPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(DOM::ParentNode& root, Scope scope, Function<bool(DOM::Element const&)> filter)
{ {
return root.heap().allocate<HTMLFormControlsCollection>(root.realm(), root, scope, move(filter)); return root.heap().allocate<HTMLFormControlsCollection>(root.realm(), root, scope, move(filter));
} }
HTMLFormControlsCollection::HTMLFormControlsCollection(ParentNode& root, Scope scope, Function<bool(Element const&)> filter) HTMLFormControlsCollection::HTMLFormControlsCollection(DOM::ParentNode& root, Scope scope, Function<bool(DOM::Element const&)> filter)
: HTMLCollection(root, scope, move(filter)) : DOM::HTMLCollection(root, scope, move(filter))
{ {
} }
@ -34,7 +35,7 @@ void HTMLFormControlsCollection::initialize(JS::Realm& realm)
} }
// https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlformcontrolscollection-nameditem // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlformcontrolscollection-nameditem
Variant<Empty, Element*, JS::Handle<RadioNodeList>> HTMLFormControlsCollection::named_item_or_radio_node_list(FlyString const& name) const Variant<Empty, DOM::Element*, JS::Handle<RadioNodeList>> HTMLFormControlsCollection::named_item_or_radio_node_list(FlyString const& name) const
{ {
// 1. If name is the empty string, return null and stop the algorithm. // 1. If name is the empty string, return null and stop the algorithm.
if (name.is_empty()) if (name.is_empty())
@ -42,7 +43,7 @@ Variant<Empty, Element*, JS::Handle<RadioNodeList>> HTMLFormControlsCollection::
// 2. If, at the time the method is called, there is exactly one node in the collection that has either an id attribute or a name attribute equal to name, then return that node and stop the algorithm. // 2. If, at the time the method is called, there is exactly one node in the collection that has either an id attribute or a name attribute equal to name, then return that node and stop the algorithm.
// 3. Otherwise, if there are no nodes in the collection that have either an id attribute or a name attribute equal to name, then return null and stop the algorithm. // 3. Otherwise, if there are no nodes in the collection that have either an id attribute or a name attribute equal to name, then return null and stop the algorithm.
Element* matching_element = nullptr; DOM::Element* matching_element = nullptr;
bool multiple_matching = false; bool multiple_matching = false;
auto collection = collect_matching_elements(); auto collection = collect_matching_elements();
@ -67,11 +68,11 @@ Variant<Empty, Element*, JS::Handle<RadioNodeList>> HTMLFormControlsCollection::
// 4. Otherwise, create a new RadioNodeList object representing a live view of the HTMLFormControlsCollection object, further filtered so that the only nodes in the // 4. Otherwise, create a new RadioNodeList object representing a live view of the HTMLFormControlsCollection object, further filtered so that the only nodes in the
// RadioNodeList object are those that have either an id attribute or a name attribute equal to name. The nodes in the RadioNodeList object must be sorted in tree // RadioNodeList object are those that have either an id attribute or a name attribute equal to name. The nodes in the RadioNodeList object must be sorted in tree
// order. Return that RadioNodeList object. // order. Return that RadioNodeList object.
return JS::make_handle(RadioNodeList::create(realm(), root(), LiveNodeList::Scope::Descendants, [name](Node const& node) { return JS::make_handle(RadioNodeList::create(realm(), root(), DOM::LiveNodeList::Scope::Descendants, [name](auto const& node) {
if (!is<Element>(node)) if (!is<DOM::Element>(node))
return false; return false;
auto const& element = verify_cast<Element>(node); auto const& element = verify_cast<DOM::Element>(node);
return element.id() == name || element.name() == name; return element.id() == name || element.name() == name;
})); }));
} }

View file

@ -7,20 +7,19 @@
#pragma once #pragma once
#include <LibWeb/DOM/HTMLCollection.h> #include <LibWeb/DOM/HTMLCollection.h>
#include <LibWeb/DOM/RadioNodeList.h>
namespace Web::DOM { namespace Web::HTML {
class HTMLFormControlsCollection : public HTMLCollection { class HTMLFormControlsCollection : public DOM::HTMLCollection {
WEB_PLATFORM_OBJECT(HTMLFormControlsCollection, HTMLCollection); WEB_PLATFORM_OBJECT(HTMLFormControlsCollection, DOM::HTMLCollection);
JS_DECLARE_ALLOCATOR(HTMLFormControlsCollection); JS_DECLARE_ALLOCATOR(HTMLFormControlsCollection);
public: public:
[[nodiscard]] static JS::NonnullGCPtr<HTMLFormControlsCollection> create(ParentNode& root, Scope, ESCAPING Function<bool(Element const&)> filter); [[nodiscard]] static JS::NonnullGCPtr<HTMLFormControlsCollection> create(DOM::ParentNode& root, Scope, ESCAPING Function<bool(DOM::Element const&)> filter);
virtual ~HTMLFormControlsCollection() override; virtual ~HTMLFormControlsCollection() override;
Variant<Empty, Element*, JS::Handle<RadioNodeList>> named_item_or_radio_node_list(FlyString const& name) const; Variant<Empty, DOM::Element*, JS::Handle<RadioNodeList>> named_item_or_radio_node_list(FlyString const& name) const;
protected: protected:
virtual void initialize(JS::Realm&) override; virtual void initialize(JS::Realm&) override;
@ -28,7 +27,7 @@ protected:
virtual JS::Value named_item_value(FlyString const& name) const final; virtual JS::Value named_item_value(FlyString const& name) const final;
private: private:
HTMLFormControlsCollection(ParentNode& root, Scope, ESCAPING Function<bool(Element const&)> filter); HTMLFormControlsCollection(DOM::ParentNode& root, Scope, ESCAPING Function<bool(DOM::Element const&)> filter);
}; };
} }

View file

@ -1,5 +1,5 @@
#import <DOM/HTMLCollection.idl> #import <DOM/HTMLCollection.idl>
#import <DOM/RadioNodeList.idl> #import <HTML/RadioNodeList.idl>
// https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#htmlformcontrolscollection // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#htmlformcontrolscollection
[Exposed=Window] [Exposed=Window]

View file

@ -14,7 +14,6 @@
#include <LibWeb/DOM/DOMTokenList.h> #include <LibWeb/DOM/DOMTokenList.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h> #include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/HTMLFormControlsCollection.h>
#include <LibWeb/DOMURL/DOMURL.h> #include <LibWeb/DOMURL/DOMURL.h>
#include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/HTML/EventNames.h> #include <LibWeb/HTML/EventNames.h>
@ -22,6 +21,7 @@
#include <LibWeb/HTML/HTMLButtonElement.h> #include <LibWeb/HTML/HTMLButtonElement.h>
#include <LibWeb/HTML/HTMLDialogElement.h> #include <LibWeb/HTML/HTMLDialogElement.h>
#include <LibWeb/HTML/HTMLFieldSetElement.h> #include <LibWeb/HTML/HTMLFieldSetElement.h>
#include <LibWeb/HTML/HTMLFormControlsCollection.h>
#include <LibWeb/HTML/HTMLFormElement.h> #include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/HTML/HTMLImageElement.h> #include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/HTML/HTMLInputElement.h> #include <LibWeb/HTML/HTMLInputElement.h>
@ -29,6 +29,7 @@
#include <LibWeb/HTML/HTMLOutputElement.h> #include <LibWeb/HTML/HTMLOutputElement.h>
#include <LibWeb/HTML/HTMLSelectElement.h> #include <LibWeb/HTML/HTMLSelectElement.h>
#include <LibWeb/HTML/HTMLTextAreaElement.h> #include <LibWeb/HTML/HTMLTextAreaElement.h>
#include <LibWeb/HTML/RadioNodeList.h>
#include <LibWeb/HTML/SubmitEvent.h> #include <LibWeb/HTML/SubmitEvent.h>
#include <LibWeb/Infra/CharacterTypes.h> #include <LibWeb/Infra/CharacterTypes.h>
#include <LibWeb/Infra/Strings.h> #include <LibWeb/Infra/Strings.h>
@ -516,11 +517,11 @@ static bool is_form_control(DOM::Element const& element, HTMLFormElement const&
} }
// https://html.spec.whatwg.org/multipage/forms.html#dom-form-elements // https://html.spec.whatwg.org/multipage/forms.html#dom-form-elements
JS::NonnullGCPtr<DOM::HTMLFormControlsCollection> HTMLFormElement::elements() const JS::NonnullGCPtr<HTMLFormControlsCollection> HTMLFormElement::elements() const
{ {
if (!m_elements) { if (!m_elements) {
auto& root = verify_cast<ParentNode>(const_cast<HTMLFormElement*>(this)->root()); auto& root = verify_cast<ParentNode>(const_cast<HTMLFormElement*>(this)->root());
m_elements = DOM::HTMLFormControlsCollection::create(root, DOM::HTMLCollection::Scope::Descendants, [this](Element const& element) { m_elements = HTMLFormControlsCollection::create(root, DOM::HTMLCollection::Scope::Descendants, [this](Element const& element) {
return is_form_control(element, *this); return is_form_control(element, *this);
}); });
} }
@ -1021,7 +1022,7 @@ JS::Value HTMLFormElement::named_item_value(FlyString const& name) const
// 1. Let candidates be a live RadioNodeList object containing all the listed elements, whose form owner is the form // 1. Let candidates be a live RadioNodeList object containing all the listed elements, whose form owner is the form
// element, that have either an id attribute or a name attribute equal to name, with the exception of input // element, that have either an id attribute or a name attribute equal to name, with the exception of input
// elements whose type attribute is in the Image Button state, in tree order. // elements whose type attribute is in the Image Button state, in tree order.
auto candidates = DOM::RadioNodeList::create(realm, root, DOM::LiveNodeList::Scope::Descendants, [this, name](auto& node) -> bool { auto candidates = RadioNodeList::create(realm, root, DOM::LiveNodeList::Scope::Descendants, [this, name](auto& node) -> bool {
if (!is<DOM::Element>(node)) if (!is<DOM::Element>(node))
return false; return false;
auto const& element = static_cast<DOM::Element const&>(node); auto const& element = static_cast<DOM::Element const&>(node);
@ -1038,7 +1039,7 @@ JS::Value HTMLFormElement::named_item_value(FlyString const& name) const
// whose form owner is the form element, that have either an id attribute or a name attribute equal to name, // whose form owner is the form element, that have either an id attribute or a name attribute equal to name,
// in tree order. // in tree order.
if (candidates->length() == 0) { if (candidates->length() == 0) {
candidates = DOM::RadioNodeList::create(realm, root, DOM::LiveNodeList::Scope::Descendants, [this, name](auto& node) -> bool { candidates = RadioNodeList::create(realm, root, DOM::LiveNodeList::Scope::Descendants, [this, name](auto& node) -> bool {
if (!is<HTMLImageElement>(node)) if (!is<HTMLImageElement>(node))
return false; return false;

View file

@ -75,7 +75,7 @@ public:
Vector<JS::NonnullGCPtr<DOM::Element>> get_submittable_elements(); Vector<JS::NonnullGCPtr<DOM::Element>> get_submittable_elements();
JS::NonnullGCPtr<DOM::HTMLFormControlsCollection> elements() const; JS::NonnullGCPtr<HTMLFormControlsCollection> elements() const;
unsigned length() const; unsigned length() const;
WebIDL::ExceptionOr<bool> check_validity(); WebIDL::ExceptionOr<bool> check_validity();
@ -136,7 +136,7 @@ private:
}; };
HashMap<FlyString, PastNameEntry> mutable m_past_names_map; HashMap<FlyString, PastNameEntry> mutable m_past_names_map;
JS::GCPtr<DOM::HTMLFormControlsCollection> mutable m_elements; JS::GCPtr<HTMLFormControlsCollection> mutable m_elements;
bool m_constructing_entry_list { false }; bool m_constructing_entry_list { false };

View file

@ -1,5 +1,5 @@
#import <DOM/HTMLFormControlsCollection.idl>
#import <HTML/HTMLElement.idl> #import <HTML/HTMLElement.idl>
#import <HTML/HTMLFormControlsCollection.idl>
// https://html.spec.whatwg.org/multipage/forms.html#attr-form-autocomplete // https://html.spec.whatwg.org/multipage/forms.html#attr-form-autocomplete
[MissingValueDefault=on, InvalidValueDefault=on] [MissingValueDefault=on, InvalidValueDefault=on]

View file

@ -7,20 +7,20 @@
#include <LibWeb/Bindings/Intrinsics.h> #include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/RadioNodeListPrototype.h> #include <LibWeb/Bindings/RadioNodeListPrototype.h>
#include <LibWeb/DOM/Element.h> #include <LibWeb/DOM/Element.h>
#include <LibWeb/DOM/RadioNodeList.h>
#include <LibWeb/HTML/HTMLInputElement.h> #include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/HTML/RadioNodeList.h>
namespace Web::DOM { namespace Web::HTML {
JS_DEFINE_ALLOCATOR(RadioNodeList); JS_DEFINE_ALLOCATOR(RadioNodeList);
JS::NonnullGCPtr<RadioNodeList> RadioNodeList::create(JS::Realm& realm, Node const& root, Scope scope, Function<bool(Node const&)> filter) JS::NonnullGCPtr<RadioNodeList> RadioNodeList::create(JS::Realm& realm, DOM::Node const& root, Scope scope, Function<bool(DOM::Node const&)> filter)
{ {
return realm.heap().allocate<RadioNodeList>(realm, realm, root, scope, move(filter)); return realm.heap().allocate<RadioNodeList>(realm, realm, root, scope, move(filter));
} }
RadioNodeList::RadioNodeList(JS::Realm& realm, Node const& root, Scope scope, Function<bool(Node const&)> filter) RadioNodeList::RadioNodeList(JS::Realm& realm, DOM::Node const& root, Scope scope, Function<bool(DOM::Node const&)> filter)
: LiveNodeList(realm, root, scope, move(filter)) : DOM::LiveNodeList(realm, root, scope, move(filter))
{ {
} }
@ -32,13 +32,13 @@ void RadioNodeList::initialize(JS::Realm& realm)
WEB_SET_PROTOTYPE_FOR_INTERFACE(RadioNodeList); WEB_SET_PROTOTYPE_FOR_INTERFACE(RadioNodeList);
} }
static HTML::HTMLInputElement const* radio_button(Node const& node) static HTMLInputElement const* radio_button(DOM::Node const& node)
{ {
if (!is<HTML::HTMLInputElement>(node)) if (!is<HTMLInputElement>(node))
return nullptr; return nullptr;
auto const& input_element = verify_cast<HTML::HTMLInputElement>(node); auto const& input_element = verify_cast<HTMLInputElement>(node);
if (input_element.type_state() != HTML::HTMLInputElement::TypeAttributeState::RadioButton) if (input_element.type_state() != HTMLInputElement::TypeAttributeState::RadioButton)
return nullptr; return nullptr;
return &input_element; return &input_element;
@ -49,7 +49,7 @@ FlyString RadioNodeList::value() const
{ {
// 1. Let element be the first element in tree order represented by the RadioNodeList object that is an input element whose type // 1. Let element be the first element in tree order represented by the RadioNodeList object that is an input element whose type
// attribute is in the Radio Button state and whose checkedness is true. Otherwise, let it be null. // attribute is in the Radio Button state and whose checkedness is true. Otherwise, let it be null.
auto* element = verify_cast<HTML::HTMLInputElement>(first_matching([](Node const& node) -> bool { auto* element = verify_cast<HTMLInputElement>(first_matching([](DOM::Node const& node) -> bool {
auto const* button = radio_button(node); auto const* button = radio_button(node);
if (!button) if (!button)
return false; return false;
@ -63,23 +63,23 @@ FlyString RadioNodeList::value() const
// 3. If element is an element with no value attribute, return the string "on". // 3. If element is an element with no value attribute, return the string "on".
// 4. Otherwise, return the value of element's value attribute. // 4. Otherwise, return the value of element's value attribute.
return element->get_attribute(HTML::AttributeNames::value).value_or("on"_string); return element->get_attribute(AttributeNames::value).value_or("on"_string);
} }
void RadioNodeList::set_value(FlyString const& value) void RadioNodeList::set_value(FlyString const& value)
{ {
HTML::HTMLInputElement* element = nullptr; HTMLInputElement* element = nullptr;
// 1. If the new value is the string "on": let element be the first element in tree order represented by the RadioNodeList object // 1. If the new value is the string "on": let element be the first element in tree order represented by the RadioNodeList object
// that is an input element whose type attribute is in the Radio Button state and whose value content attribute is either absent, // that is an input element whose type attribute is in the Radio Button state and whose value content attribute is either absent,
// or present and equal to the new value, if any. If no such element exists, then instead let element be null. // or present and equal to the new value, if any. If no such element exists, then instead let element be null.
if (value == "on"sv) { if (value == "on"sv) {
element = verify_cast<HTML::HTMLInputElement>(first_matching([&value](auto const& node) { element = verify_cast<HTMLInputElement>(first_matching([&value](auto const& node) {
auto const* button = radio_button(node); auto const* button = radio_button(node);
if (!button) if (!button)
return false; return false;
auto const maybe_value = button->get_attribute(HTML::AttributeNames::value); auto const maybe_value = button->get_attribute(AttributeNames::value);
return !maybe_value.has_value() || maybe_value.value() == value; return !maybe_value.has_value() || maybe_value.value() == value;
})); }));
} }
@ -87,12 +87,12 @@ void RadioNodeList::set_value(FlyString const& value)
// type attribute is in the Radio Button state and whose value content attribute is present and equal to the new value, if any. If // type attribute is in the Radio Button state and whose value content attribute is present and equal to the new value, if any. If
// no such element exists, then instead let element be null. // no such element exists, then instead let element be null.
else { else {
element = verify_cast<HTML::HTMLInputElement>(first_matching([&value](auto const& node) { element = verify_cast<HTMLInputElement>(first_matching([&value](auto const& node) {
auto const* button = radio_button(node); auto const* button = radio_button(node);
if (!button) if (!button)
return false; return false;
auto const maybe_value = button->get_attribute(HTML::AttributeNames::value); auto const maybe_value = button->get_attribute(AttributeNames::value);
return maybe_value.has_value() && maybe_value.value() == value; return maybe_value.has_value() && maybe_value.value() == value;
})); }));
} }

View file

@ -8,15 +8,15 @@
#include <LibWeb/DOM/LiveNodeList.h> #include <LibWeb/DOM/LiveNodeList.h>
namespace Web::DOM { namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#radionodelist // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#radionodelist
class RadioNodeList : public LiveNodeList { class RadioNodeList : public DOM::LiveNodeList {
WEB_PLATFORM_OBJECT(RadioNodeList, LiveNodeList); WEB_PLATFORM_OBJECT(RadioNodeList, DOM::LiveNodeList);
JS_DECLARE_ALLOCATOR(RadioNodeList); JS_DECLARE_ALLOCATOR(RadioNodeList);
public: public:
[[nodiscard]] static JS::NonnullGCPtr<RadioNodeList> create(JS::Realm& realm, Node const& root, Scope scope, ESCAPING Function<bool(Node const&)> filter); [[nodiscard]] static JS::NonnullGCPtr<RadioNodeList> create(JS::Realm& realm, DOM::Node const& root, Scope scope, ESCAPING Function<bool(DOM::Node const&)> filter);
virtual ~RadioNodeList() override; virtual ~RadioNodeList() override;
@ -27,7 +27,7 @@ protected:
virtual void initialize(JS::Realm&) override; virtual void initialize(JS::Realm&) override;
private: private:
explicit RadioNodeList(JS::Realm& realm, Node const& root, Scope scope, ESCAPING Function<bool(Node const&)> filter); explicit RadioNodeList(JS::Realm& realm, DOM::Node const& root, Scope scope, ESCAPING Function<bool(DOM::Node const&)> filter);
}; };
} }

View file

@ -48,7 +48,6 @@ libweb_js_bindings(DOM/AbstractRange)
libweb_js_bindings(DOM/Attr) libweb_js_bindings(DOM/Attr)
libweb_js_bindings(DOM/AbortController) libweb_js_bindings(DOM/AbortController)
libweb_js_bindings(DOM/AbortSignal) libweb_js_bindings(DOM/AbortSignal)
libweb_js_bindings(DOM/BeforeUnloadEvent)
libweb_js_bindings(DOM/CDATASection) libweb_js_bindings(DOM/CDATASection)
libweb_js_bindings(DOM/CharacterData) libweb_js_bindings(DOM/CharacterData)
libweb_js_bindings(DOM/Comment) libweb_js_bindings(DOM/Comment)
@ -62,7 +61,6 @@ libweb_js_bindings(DOM/Element)
libweb_js_bindings(DOM/Event) libweb_js_bindings(DOM/Event)
libweb_js_bindings(DOM/EventTarget) libweb_js_bindings(DOM/EventTarget)
libweb_js_bindings(DOM/HTMLCollection) libweb_js_bindings(DOM/HTMLCollection)
libweb_js_bindings(DOM/HTMLFormControlsCollection)
libweb_js_bindings(DOM/MutationObserver) libweb_js_bindings(DOM/MutationObserver)
libweb_js_bindings(DOM/MutationRecord) libweb_js_bindings(DOM/MutationRecord)
libweb_js_bindings(DOM/NamedNodeMap) libweb_js_bindings(DOM/NamedNodeMap)
@ -71,7 +69,6 @@ libweb_js_bindings(DOM/NodeFilter)
libweb_js_bindings(DOM/NodeIterator) libweb_js_bindings(DOM/NodeIterator)
libweb_js_bindings(DOM/NodeList) libweb_js_bindings(DOM/NodeList)
libweb_js_bindings(DOM/ProcessingInstruction) libweb_js_bindings(DOM/ProcessingInstruction)
libweb_js_bindings(DOM/RadioNodeList)
libweb_js_bindings(DOM/Range) libweb_js_bindings(DOM/Range)
libweb_js_bindings(DOM/ShadowRoot) libweb_js_bindings(DOM/ShadowRoot)
libweb_js_bindings(DOM/StaticRange) libweb_js_bindings(DOM/StaticRange)
@ -102,6 +99,7 @@ libweb_js_bindings(Geometry/DOMRectList)
libweb_js_bindings(Geometry/DOMRectReadOnly) libweb_js_bindings(Geometry/DOMRectReadOnly)
libweb_js_bindings(HTML/AudioTrack) libweb_js_bindings(HTML/AudioTrack)
libweb_js_bindings(HTML/AudioTrackList) libweb_js_bindings(HTML/AudioTrackList)
libweb_js_bindings(HTML/BeforeUnloadEvent)
libweb_js_bindings(HTML/BroadcastChannel) libweb_js_bindings(HTML/BroadcastChannel)
libweb_js_bindings(HTML/CanvasGradient) libweb_js_bindings(HTML/CanvasGradient)
libweb_js_bindings(HTML/CanvasPattern) libweb_js_bindings(HTML/CanvasPattern)
@ -144,6 +142,7 @@ libweb_js_bindings(HTML/HTMLElement)
libweb_js_bindings(HTML/HTMLEmbedElement) libweb_js_bindings(HTML/HTMLEmbedElement)
libweb_js_bindings(HTML/HTMLFieldSetElement) libweb_js_bindings(HTML/HTMLFieldSetElement)
libweb_js_bindings(HTML/HTMLFontElement) libweb_js_bindings(HTML/HTMLFontElement)
libweb_js_bindings(HTML/HTMLFormControlsCollection)
libweb_js_bindings(HTML/HTMLFormElement) libweb_js_bindings(HTML/HTMLFormElement)
libweb_js_bindings(HTML/HTMLFrameElement) libweb_js_bindings(HTML/HTMLFrameElement)
libweb_js_bindings(HTML/HTMLFrameSetElement) libweb_js_bindings(HTML/HTMLFrameSetElement)
@ -219,6 +218,7 @@ libweb_js_bindings(HTML/Plugin)
libweb_js_bindings(HTML/PluginArray) libweb_js_bindings(HTML/PluginArray)
libweb_js_bindings(HTML/PopStateEvent) libweb_js_bindings(HTML/PopStateEvent)
libweb_js_bindings(HTML/PromiseRejectionEvent) libweb_js_bindings(HTML/PromiseRejectionEvent)
libweb_js_bindings(HTML/RadioNodeList)
libweb_js_bindings(HTML/ServiceWorker) libweb_js_bindings(HTML/ServiceWorker)
libweb_js_bindings(HTML/ServiceWorkerContainer) libweb_js_bindings(HTML/ServiceWorkerContainer)
libweb_js_bindings(HTML/ServiceWorkerRegistration) libweb_js_bindings(HTML/ServiceWorkerRegistration)