OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipa
ge/text-level-semantics.html#dom-a-text"> |
| 5 <script src="../../../resources/js-test.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <script> |
| 9 description("Tests that HTMLAnchorElement.text can be set."); |
| 10 |
| 11 var a = document.createElement("a"); |
| 12 shouldBe("a.__proto__", "HTMLAnchorElement.prototype"); |
| 13 |
| 14 shouldBeEqualToString("a.textContent", ""); |
| 15 shouldBeEqualToString("a.text", ""); |
| 16 |
| 17 a.textContent = "text1"; |
| 18 shouldBeEqualToString("a.textContent", "text1"); |
| 19 shouldBeEqualToString("a.text", "text1"); |
| 20 |
| 21 a.text = "text2"; |
| 22 shouldBeEqualToString("a.textContent", "text2"); |
| 23 shouldBeEqualToString("a.text", "text2"); |
| 24 </script> |
| 25 </body> |
| 26 </html> |
OLD | NEW |