blob: 05038ab21311780a98021dba8d7e8f09a37e250a (
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
|
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Ensuring that mutation event with text modification on a textarea doesn't crash");
span = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
document.implementation.createDocument("", "", null).adoptNode(span);
textarea = document.createElementNS("http://www.w3.org/1999/xhtml", "textarea");
textarea.textContent = "Value";
textarea.addEventListener("DOMCharacterDataModified", function (evt) { console.log(evt.target); textarea.textContent = ""; }, false);
document.body.appendChild(textarea);
text = document.createTextNode("Hello?");
textarea.appendChild(text);
span.appendChild(text);
testPassed("unless crash.")
</script>
</body>
|