Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <style type="text/css"> | |
|
zino
2016/09/28 17:07:14
Need <!DOCTYPE html>
| |
| 2 #s { | |
| 3 min-width: 100px; | |
| 4 } | |
| 5 </style> | |
| 6 | |
| 7 <title>Test for HTMLSelectElement.remove() on an Options object</title> | |
| 8 | |
| 9 <select id="s"> | |
|
zino
2016/09/28 17:07:14
We don't need id attributes here if they doesn't b
| |
| 10 <option id="o" selected >hello</option> | |
| 11 </select> | |
| 12 | |
| 13 <a id="a" herf="#">Remove option</a> | |
| 14 | |
| 15 <script> | |
| 16 function load() { | |
|
zino
2016/09/28 17:07:14
This is unnecessary.
| |
| 17 var removeLink = document.querySelector('a'); | |
| 18 removeLink.addEventListener('click', () => { | |
| 19 document.querySelector('option').remove(); | |
| 20 }); | |
| 21 removeLink.click(); | |
| 22 | |
| 23 } | |
| 24 window.onload = load; | |
|
zino
2016/09/28 17:07:14
This is unnecessary.
| |
| 25 </script> | |
| 26 | |
| OLD | NEW |