blob: 6ddf89205f78a26a55df73d85fcb5759b2a5efb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
document.designMode = "on";
window.find("AA");
document.addEventListener(
"selectionchange",
onSelectionChangeOrDOMNodeInserted,
{once: true}
);
document.querySelector("output").addEventListener(
"DOMNodeInserted",
onSelectionChangeOrDOMNodeInserted
);
document.execCommand("forwarddelete");
});
function onSelectionChangeOrDOMNodeInserted() {
document.execCommand("delete");
document.querySelector("output").value = "";
}
</script>
</head>
<body>
<output>
<ruby></ruby>
<div>
AAA
</div></output></body>
</html>
|