spelling-markers-005.html (873B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta charset="utf-8"> 4 <title>Turning off spellcheck on editable elements via an ancestor</title> 5 <link rel=match href="references/spelling-markers-001-ref.html"> 6 <link rel=help href="https://html.spec.whatwg.org/multipage/interaction.html#spelling-and-grammar-checking"> 7 <meta name=assert content="Spellchecking stops applying to editable elements when the spellcheck attribute becomes false on an ancestor"> 8 9 <div id="test" contenteditable=true>This test passes if there is no visual marker indicating the <span id=child><span>spellinnnnnggg</span></span> mistake in this sentence, and fails otherwise.</div> 10 11 <script> 12 var test = document.getElementById("test"); 13 // Force spellcheck by focus then blur 14 test.focus(); 15 test.blur(); 16 var child = document.getElementById("child"); 17 child.setAttribute("spellcheck", false); 18 </script>