mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
As the internal algorithms perform case sensitive matching. Fixes a crash in the included test, seen on gmail.com.
20 lines
659 B
HTML
20 lines
659 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<div id="editor" contenteditable="true">
|
|
This is <span id="target">some text</span> to test.
|
|
</div>
|
|
<script>
|
|
test(() => {
|
|
const target = document.getElementById("target");
|
|
const range = document.createRange();
|
|
const selection = window.getSelection();
|
|
|
|
// println(`strikeThrough active?: ${document.queryCommandState("strikeThrough")}`);
|
|
range.selectNodeContents(target);
|
|
selection.removeAllRanges();
|
|
selection.addRange(range);
|
|
document.execCommand("strikeThrough");
|
|
|
|
println(`strikeThrough active?: ${document.queryCommandState("strikeThrough")}`);
|
|
});
|
|
</script>
|