Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/update-dom-during-undoing-in-textarea.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test for updating the DOM tree while execCommand("undo") is running in the textarea</title>
<script>
"use strict";
let count = 0;
addEventListener("load", () => {
document.execCommand("insertText", false, "F");
document.execCommand("undo");
});
function onInputOfTextarea() {
if (count) {
document.querySelector("base").appendChild(
document.querySelector("content")
);
}
count++;
}
</script>
</head>
<body>
<iframe></iframe>
<textarea autofocus oninput="onInputOfTextarea()">a</textarea>
<base></base>
<content>
<menu>
</body>
</html>