diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-11-19 00:10:47 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-11-19 00:10:47 +0100 |
| commit | 15b0afc98c0cfb685379b3680552bbe5d0f7a003 (patch) | |
| tree | 19c5702008c0b397966f8f39c16c265c07b9773e /test | |
| parent | e05761118941bdf729facde4838b7dddb255b818 (diff) | |
| download | chawan-15b0afc98c0cfb685379b3680552bbe5d0f7a003.tar.gz | |
dom: add HTMLHyperlinkElementUtils setters
Diffstat (limited to 'test')
| -rw-r--r-- | test/js/hyperlink.html | 12 |
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> |