| <!-- | |
| @EXECUTE-AND-WAIT-FOR:changeHrefs() | |
| --> | |
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <div style="white-space: nowrap"> | |
| <a>Never has href</a> | |
| <a href="#">Always has href</a> | |
| <a href="">Empty string href</a> | |
| <a href>Null href</a> | |
| <a class="a1" target="_blank">Href set without delay</a> | |
| <a class="a2" target="_blank">Href set with delay</a> | |
| <a href="#" class="a3">Href removed with delay</a> | |
| </div> | |
| <script> | |
| document.querySelector('.a1').setAttribute('href', '#'); | |
| function changeHrefs() { | |
| document.querySelector('.a2').setAttribute('href', '#'); | |
| document.querySelector('.a3').removeAttribute('href'); | |
| document.title = 'done'; | |
| return 'done'; | |
| } | |
| </script> | |
| </body> | |
| </html> |