Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://raw.githubusercontent.com/mozilla-firefox/firefox/main/testing/web-platform/tests/svg/linking/scripted/a.hyperlink-getter-01.svg
<?xml version="1.0" encoding="UTF-8"?>
<title>SVGAElement HyperlinkElementUtils getters</title>
<metadata>
</metadata>
<a id="test" href="http://www.example.com:8080/default.htm"></a>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<script><![CDATA[
const a = document.getElementById("test");
test(function() {
assert_equals(a.protocol, "http:");
}, "Test anchor's protocol getter");
test(function() {
assert_equals(a.hostname, "www.example.com");
}, "Test anchor's hostname getter");
test(function() {
assert_equals(a.port, "8080");
}, "Test anchor's port getter");
]]></script>
</svg>