mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-11 05:32:59 +00:00
LibWeb: Add initial implementation of foreign content parsing
Plus sneak in a FIXME for the list of active formatting elements and a test for Element.namespaceURI
This commit is contained in:
parent
e8a9e8aed5
commit
4e8cb4558b
Notes:
sideshowbarker
2024-07-19 01:48:41 +09:00
Author: https://github.com/Lubrsi
Commit: 4e8cb4558b
Pull-request: https://github.com/SerenityOS/serenity/pull/3748
8 changed files with 304 additions and 106 deletions
|
@ -21,4 +21,19 @@ afterInitialPageLoad(() => {
|
|||
how this text
|
||||
is interpreted below. `);
|
||||
});
|
||||
|
||||
test("Element.namespaceURI basics", () => {
|
||||
const htmlNamespace = "http://www.w3.org/1999/xhtml";
|
||||
const p = document.getElementsByTagName("p")[0];
|
||||
expect(p.namespaceURI).toBe(htmlNamespace);
|
||||
|
||||
// createElement always sets the namespace to the HTML namespace in HTML documents.
|
||||
const svgElement = document.createElement("svg");
|
||||
expect(svgElement.namespaceURI).toBe(htmlNamespace);
|
||||
|
||||
const svgNamespace = "http://www.w3.org/2000/svg";
|
||||
p.innerHTML = "<svg></svg>";
|
||||
const domSVGElement = p.getElementsByTagName("svg")[0];
|
||||
expect(domSVGElement.namespaceURI).toBe(svgNamespace);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue