multiple-base.sub.html (803B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>document base URL: multiple base elements</title> 4 <base target="_blank" > 5 <base href="http://{{domains[www]}}:{{ports[http][0]}}/"> 6 <base href="http://{{domains[www1]}}:{{ports[http][0]}}/"> 7 <base href="http://{{domains[www2]}}:{{ports[http][0]}}/"> 8 <link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <div id="log"></div> 12 <script> 13 test(function(){ 14 var base = document.querySelectorAll("base"); 15 assert_equals(document.baseURI, document.querySelectorAll("base[href]")[0].href); 16 }, "If there are multiple <base> elements, the document base URL is the frozen base URL of the first one that has an href attribute"); 17 </script>