diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-05 13:49:29 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-05 13:49:29 +0100 |
| commit | 281f560f4423a44eafb035ea058597f79d9a400a (patch) | |
| tree | bec2544e9950b0720be2797c5df1a295f2ccead8 /test | |
| parent | 72ddcbde2c18139dd45a874886d5b0b820cc41ae (diff) | |
| download | chawan-281f560f4423a44eafb035ea058597f79d9a400a.tar.gz | |
dom: button fixes
Diffstat (limited to 'test')
| -rw-r--r-- | test/js/form.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/js/form.html b/test/js/form.html new file mode 100644 index 00000000..f53bedf7 --- /dev/null +++ b/test/js/form.html @@ -0,0 +1,15 @@ +<!doctype html> +<title>Form/form control tests</title> +<div id=x>Fail</div> +<script src=asserts.js></script> +<script> +let x = document.createElement("button"); +x.type = "test"; +assertEquals(x.type, "submit"); +assertEquals(x.getAttribute("type"), "test"); +x.type = "button"; +assertEquals(x.type, "button"); +x.value = "test"; +assertEquals(x.getAttribute("value"), "test"); +document.getElementById("x").textContent = "Success"; +</script> |