aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-11-19 00:10:47 +0100
committerbptato <nincsnevem662@gmail.com>2024-11-19 00:10:47 +0100
commit15b0afc98c0cfb685379b3680552bbe5d0f7a003 (patch)
tree19c5702008c0b397966f8f39c16c265c07b9773e /test
parente05761118941bdf729facde4838b7dddb255b818 (diff)
downloadchawan-15b0afc98c0cfb685379b3680552bbe5d0f7a003.tar.gz
dom: add HTMLHyperlinkElementUtils setters
Diffstat (limited to 'test')
-rw-r--r--test/js/hyperlink.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/js/hyperlink.html b/test/js/hyperlink.html
index 92a1d674..ff7115c1 100644
--- a/test/js/hyperlink.html
+++ b/test/js/hyperlink.html
@@ -20,5 +20,17 @@ for (const x in ["href", "origin", "protocol", "username", "password", "host",
}
invalid.remove();
valid.remove();
+const a = document.createElement("a");
+a.href = "https://example.org";
+assertEquals(a + "", "https://example.org/");
+assertEquals(a.protocol, "https:");
+a.protocol = "http"
+assertEquals(a + "", "http://example.org/")
+assertEquals(a.href, "http://example.org/");
+a.protocol = "ftp"
+a.protocol = "http"
+assertEquals(a.href, "http://example.org/");
+assertEquals(a.toString(), "http://example.org/");
+assertEquals(JSON.stringify(Object.getOwnPropertyDescriptors(a)), "{}");
document.getElementById("x").textContent = "Success";
</script>