mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Support (and validate) prefixes in Document.createElementNS()
1% progression on ACID3. :^)
This commit is contained in:
parent
4fb67c1621
commit
bfa7aad0f6
Notes:
sideshowbarker
2024-07-17 18:04:29 +09:00
Author: https://github.com/awesomekling
Commit: bfa7aad0f6
5 changed files with 41 additions and 14 deletions
|
@ -101,13 +101,15 @@ ExceptionOr<void> Element::set_attribute(const FlyString& name, const String& va
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#validate-and-extract
|
||||
static ExceptionOr<QualifiedName> validate_and_extract(FlyString namespace_, FlyString qualified_name)
|
||||
ExceptionOr<QualifiedName> validate_and_extract(FlyString namespace_, FlyString qualified_name)
|
||||
{
|
||||
// 1. If namespace is the empty string, then set it to null.
|
||||
if (namespace_.is_empty())
|
||||
namespace_ = {};
|
||||
|
||||
// FIXME: 2. Validate qualifiedName.
|
||||
// 2. Validate qualifiedName.
|
||||
if (auto result = Document::validate_qualified_name(qualified_name); result.is_exception())
|
||||
return result.exception();
|
||||
|
||||
// 3. Let prefix be null.
|
||||
FlyString prefix = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue