mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
LibWeb: Move ExceptionOr from DOM/ to WebIDL/
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
This commit is contained in:
parent
c0eda77928
commit
ad04d7ac9b
107 changed files with 441 additions and 440 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_text)
|
||||
WebIDL::ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_text)
|
||||
{
|
||||
auto maybe_selectors = parse_selector(CSS::Parser::ParsingContext(*this), selector_text);
|
||||
if (!maybe_selectors.has_value())
|
||||
|
@ -41,7 +41,7 @@ ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_t
|
|||
return result;
|
||||
}
|
||||
|
||||
ExceptionOr<JS::NonnullGCPtr<NodeList>> ParentNode::query_selector_all(StringView selector_text)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<NodeList>> ParentNode::query_selector_all(StringView selector_text)
|
||||
{
|
||||
auto maybe_selectors = parse_selector(CSS::Parser::ParsingContext(*this), selector_text);
|
||||
if (!maybe_selectors.has_value())
|
||||
|
@ -168,7 +168,7 @@ JS::NonnullGCPtr<HTMLCollection> ParentNode::get_elements_by_tag_name_ns(FlyStri
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-parentnode-prepend
|
||||
ExceptionOr<void> ParentNode::prepend(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
WebIDL::ExceptionOr<void> ParentNode::prepend(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
{
|
||||
// 1. Let node be the result of converting nodes into a node given nodes and this’s node document.
|
||||
auto node = TRY(convert_nodes_to_single_node(nodes, document()));
|
||||
|
@ -179,7 +179,7 @@ ExceptionOr<void> ParentNode::prepend(Vector<Variant<JS::Handle<Node>, String>>
|
|||
return {};
|
||||
}
|
||||
|
||||
ExceptionOr<void> ParentNode::append(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
WebIDL::ExceptionOr<void> ParentNode::append(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
{
|
||||
// 1. Let node be the result of converting nodes into a node given nodes and this’s node document.
|
||||
auto node = TRY(convert_nodes_to_single_node(nodes, document()));
|
||||
|
@ -190,7 +190,7 @@ ExceptionOr<void> ParentNode::append(Vector<Variant<JS::Handle<Node>, String>> c
|
|||
return {};
|
||||
}
|
||||
|
||||
ExceptionOr<void> ParentNode::replace_children(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
WebIDL::ExceptionOr<void> ParentNode::replace_children(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
{
|
||||
// 1. Let node be the result of converting nodes into a node given nodes and this’s node document.
|
||||
auto node = TRY(convert_nodes_to_single_node(nodes, document()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue