Nothing Special   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
Spellcheck inheritance across shadow boundary.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanketj committed Jan 9, 2024
1 parent a04b9f7 commit ed4d3c4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spellcheck-inheritance.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,24 @@
<div contenteditable="true" style="border:2px black solid"></div>
<br/>
<div contenteditable="true" style="border:2px black solid" spellcheck="true"></div>
<br/>
<div contenteditable="true" id="div-with-shadow"></div>
<br/>
<div contenteditable="true" spellcheck="true" id="div-with-spellcheck-and-shadow"></div>
<script>
let divWithShadow = document.getElementById("div-with-shadow");
let shadow = divWithShadow.attachShadow({mode: "open"});
let div = document.createElement("div");
div.setAttribute("contenteditable", "true");
div.setAttribute("style", "border:2px black solid");
shadow.appendChild(div);

let divWithSpellcheckAndShadow = document.getElementById("div-with-spellcheck-and-shadow");
let shadow2 = divWithSpellcheckAndShadow.attachShadow({mode: "open"});
let div2 = document.createElement("div");
div2.setAttribute("contenteditable", "true");
div2.setAttribute("style", "border:2px black solid");
shadow2.appendChild(div2);
</script>
</body>
</html>

0 comments on commit ed4d3c4

Please sign in to comment.