aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/textarea.html
diff options
context:
space:
mode:
authorMatthew Rasmus <mattr@zzntd.com>2014-12-07 12:55:43 -0800
committerMatthew Rasmus <mattr@zzntd.com>2014-12-16 11:34:04 -0800
commita5c0bb708d03b1e878f419617fb016853d2200bb (patch)
tree0db6c5c19f3b72218bfc25244536dbbe9f2f7388 /tests/html/textarea.html
parent4d0a6a6bd6f2aed259988969fab1f14c880c2257 (diff)
downloadservo-a5c0bb708d03b1e878f419617fb016853d2200bb.tar.gz
servo-a5c0bb708d03b1e878f419617fb016853d2200bb.zip
htmltextarea: Fixed some value_changed issues
Also modified tests/html/textarea.html to allow for the testing of the textarea's dirty value flag.
Diffstat (limited to 'tests/html/textarea.html')
-rw-r--r--tests/html/textarea.html21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/html/textarea.html b/tests/html/textarea.html
index b499465dff6..21705f1daab 100644
--- a/tests/html/textarea.html
+++ b/tests/html/textarea.html
@@ -1,6 +1,25 @@
<html>
<head></head>
<body>
-<textarea name="textarea">Write something here
+<form>
+<textarea id="textarea">Write something here
and maybe here</textarea>
+<button id=setcontent type=button>setContent</button>
+<button id=setvalue type=button>setValue</button>
+<input type=reset>
+<script>
+var text_area = document.getElementById("textarea");
+var set_c = document.getElementById("setcontent");
+var value = document.getElementById("setvalue");
+var x = 0;
+
+set_c.addEventListener("click", function () {
+ text_area.textContent = x;
+ x++;
+});
+
+value.addEventListener("click", function () {
+ text_area.value = "new value!";
+});
+</script>
</body>