Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / html / test / test_anchor_href_cache_invalidation.html
blobc1a8327e62cffd62268295919767cfcb119edbb5
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test for anchor cache invalidation</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
7 </head>
8 <body>
9 <p id="display"></p>
10 <div id="content" style="display: none">
11 <a id="x" href="http://example.com"></a>
12 </div>
13 <pre id="test">
14 <script type="application/javascript">
16 is($("x").href, "http://example.com/");
17 is($("x").host, "example.com");
19 $("x").href = "http://www.example.com";
21 is($("x").href, "http://www.example.com/");
22 is($("x").host, "www.example.com");
24 $("x").setAttribute("href", "http://www.example.net/");
25 is($("x").host, "www.example.net");
27 </script>
28 </pre>
29 </body>
30 </html>