OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
leviw_travelin_and_unemployed
2013/04/22 23:31:22
Add a doctype
aurimas (slooooooooow)
2013/04/23 01:00:53
Done.
| |
2 <head> | |
3 <script> | |
4 if (window.testRunner) | |
5 testRunner.dumpAsText(); | |
6 | |
7 function deleteAndCheckShadowTreeDivIsEmpty(id) | |
8 { | |
9 var elem = document.getElementById(id); | |
10 elem.focus(); | |
11 elem.setSelectionRange(elem.value.length, elem.value.length); | |
12 document.execCommand("Delete"); | |
13 if (internals.shadowRoot(elem).firstChild.innerHTML == '') | |
14 return true; | |
15 else | |
16 return false; | |
17 } | |
18 </script> | |
19 </head> | |
20 <body><input id="input" value="A" /><textarea id="textarea">B</textarea> | |
21 <script> | |
22 document.write((deleteAndCheckShadowTreeDivIsEmpty("input") && deleteAndCheckSha dowTreeDivIsEmpty("textarea")) ? 'PASS' : 'FAIL' ); | |
23 </script></body> | |
24 </html> | |
OLD | NEW |