mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-04 08:01:51 +00:00
This change fixes selector matching for non-HTML elements that have mixed-case names — such as the SVG foreignObject element. Otherwise, without this change, attempting to use a selector to match such an element — e.g., document.querySelector("foreignObject") — fails.
28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
<script src="include.js"></script>
|
|
<svg>
|
|
<textPath></textPath>
|
|
<clipPath></clipPath>
|
|
<foreignObject></foreignObject>
|
|
<linearGradient></linearGradient>
|
|
<radialGradient></radialGradient>
|
|
</svg>
|
|
<script>
|
|
test(() => {
|
|
if (document.querySelector("textPath"))
|
|
println("✅ Pass: Selector match for SVG element textPath.");
|
|
else
|
|
println("❌ Fail: No selector match for SVG element textPath.");
|
|
if (document.querySelector("clipPath"))
|
|
println("✅ Pass: Selector match for SVG element clipPath.");
|
|
else
|
|
println("❌ Fail: No selector match for SVG element clipPath.");
|
|
if (document.querySelector("foreignObject"))
|
|
println("✅ Pass: Selector match for SVG element foreignObject.");
|
|
else
|
|
println("❌ Fail: No selector match for SVG element foreignObject.");
|
|
if (document.querySelector("radialGradient"))
|
|
println("✅ Pass: Selector match for SVG element radialGradient.");
|
|
else
|
|
println("❌ Fail: No selector match for SVG element radialGradient.");
|
|
});
|
|
</script>
|