mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Implement Document's supported property names closer to the spec
Our implementation was errantly matching HTML tags other than the list
specified by the spec. For example, a <meta name=title> tag would be a
match for document.title.
For example, bandcamp will dynamically update its title when audio is
played as follows:
document.title = "▶︎ " + document.title;
And bandcamp also has a <meta name=title> tag. The result was that the
title would become "▶︎ [object HTMLMetaElement]".
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 02:06:40 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/43e55668eb Pull-request: https://github.com/SerenityOS/serenity/pull/23758 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -5,6 +5,7 @@
|
||||
<img id="baz" src="http://www.example.com" alt="Example" />
|
||||
<form name="foo">
|
||||
</form>
|
||||
<meta name="kangaroo" />
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
@@ -41,5 +42,7 @@
|
||||
document.body.removeChild(document.greg);
|
||||
|
||||
println(`no more greg or banana: ${document.greg === undefined}, ${document.banana === undefined}`);
|
||||
|
||||
println(`meta tag does not match: ${document.kangaroo === undefined}`);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user