blob: 7f73de048d714c99ce47ae4da61d7128e53216e8 (
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
|
<html class="reftest-wait">
<script>
var eventCount = 0;
document.addEventListener("DOMContentLoaded", () => {
const dialog = document.querySelector("dialog");
const object = document.createElement("object");
object.addEventListener("DOMSubtreeModified", () => {
dialog.show();
dialog.focus();
document.execCommand("selectAll");
dialog.close();
setTimeout(() => {
document.execCommand("selectAll");
document.execCommand("strikeThrough");
document.execCommand("indent");
document.execCommand("outdent");
eventCount--;
if (!eventCount) {
document.documentElement.removeAttribute("class");
}
});
eventCount++;
});
object.setAttribute("role", "x"); // Run DOMSubtreeModified
object.setAttribute("role", "y"); // Run DOMSubtreeModified
document.execCommand("forwardDelete");
document.execCommand("justifyRight");
})
</script>
<dialog id="a" contenteditable="true">a</dialog>
</html>
|