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 returns the same value as the tex
tContent attribute."); |
| 10 |
| 11 var div = document.createElement('div'); |
| 12 div.innerHTML = '<a>a<br>b</a>'; |
| 13 var a = div.firstChild; |
| 14 shouldBe("a.__proto__", "HTMLAnchorElement.prototype"); |
| 15 |
| 16 shouldBeEqualToString('a.text', 'ab'); |
| 17 shouldBeEqualToString('a.textContent', 'ab'); |
| 18 </script> |
| 19 </body> |
| 20 </html> |
OLD | NEW |