Skip to content

Truly independent web browser

645 B
Raw Blame
<!DOCTYPE html>
<style id="style"></style>
<script src="../include.js"></script>
<script>
    test(() => {
        let selectors = [
            ":has(:yakthonk)",
            ":has(:not(:yakthonk))",
            ":has(:has(span))",
            ":has(:not(:has(span)))",
            ":has(::before)",
            ":has(:not(::before))",
        ];

        let style = document.getElementById("style");

        for (let selector of selectors) {
            style.innerText = `${selector} { color: red; }`;
            println(`${selector} should be invalid: ${style.sheet.cssRules.length === 0 ? "PASS" : "FAIL"}`);
        }
    });
</script>