mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
:host() and ::slotted() both take a `<compound-selector>` as their argument, but we currently allow a sneaky combinator in there too, as this demonstrates. That will be solved over subsequent commits, but adding this now to track progress.
17 lines
524 B
HTML
17 lines
524 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
function test_invalid(selector) {
|
|
let supported = CSS.supports(`selector(${selector})`);
|
|
println(`${selector} is invalid: ${supported ? 'FAIL' : 'PASS'}`);
|
|
}
|
|
test_invalid("::slotted(> a)");
|
|
test_invalid("::slotted(+ a)");
|
|
test_invalid("::slotted(~ a)");
|
|
test_invalid(":host(> a)");
|
|
test_invalid(":host(+ a)");
|
|
test_invalid(":host(~ a)");
|
|
});
|
|
</script>
|