mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-17 07:50:04 +00:00
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:
parent
69f96122b6
commit
13b7355ec1
Notes:
github-actions[bot]
2024-11-02 15:17:36 +00:00
Author: https://github.com/trflynn89
Commit: 13b7355ec1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2123
22 changed files with 72 additions and 71 deletions
|
@ -40,7 +40,6 @@
|
|||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWeb/DOM/AdoptedStyleSheets.h>
|
||||
#include <LibWeb/DOM/Attr.h>
|
||||
#include <LibWeb/DOM/BeforeUnloadEvent.h>
|
||||
#include <LibWeb/DOM/CDATASection.h>
|
||||
#include <LibWeb/DOM/Comment.h>
|
||||
#include <LibWeb/DOM/CustomEvent.h>
|
||||
|
@ -69,6 +68,7 @@
|
|||
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
|
||||
#include <LibWeb/FileAPI/BlobURLStore.h>
|
||||
#include <LibWeb/HTML/AttributeNames.h>
|
||||
#include <LibWeb/HTML/BeforeUnloadEvent.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/CustomElements/CustomElementDefinition.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,
|
||||
// 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)) {
|
||||
event = BeforeUnloadEvent::create(realm, FlyString {});
|
||||
event = HTML::BeforeUnloadEvent::create(realm, FlyString {});
|
||||
} else if (Infra::is_ascii_case_insensitive_match(interface, "compositionevent"sv)) {
|
||||
event = UIEvents::CompositionEvent::create(realm, String {});
|
||||
} 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.
|
||||
auto& global_object = HTML::relevant_global_object(*this);
|
||||
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);
|
||||
auto event_firing_result = window.dispatch_event(*beforeunload_event);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue