Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/linking/scripted/a.hyperlink-getter-01.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="UTF-8"?>
<title>SVGAElement HyperlinkElementUtils getters</title>
<metadata>
<h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/linking.html#InterfaceSVGAElement"/>
</metadata>
<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>