Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
htmltextarea: Fixed some value_changed issues
Also modified tests/html/textarea.html to allow for the testing of the textarea's dirty value flag.
- Loading branch information
Showing
2 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |