1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

LibWeb: Fix bogus result from "validate and extract" DOM operation

We were returning a QualifiedName with the localName and namespace
fields swapped.
This commit is contained in:
Andreas Kling 2022-03-02 10:21:57 +01:00
parent 05e9dceba6
commit 7231c1c895

View file

@ -140,7 +140,7 @@ static ExceptionOr<QualifiedName> validate_and_extract(FlyString namespace_, Fly
return NamespaceError::create("Namespace is the XMLNS namespace and neither qualifiedName nor prefix is 'xmlns'.");
// 10. Return namespace, prefix, and localName.
return QualifiedName { namespace_, prefix, local_name };
return QualifiedName { local_name, prefix, namespace_ };
}
// https://dom.spec.whatwg.org/#dom-element-setattributens