Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/html/reftests/autofocus/reftest.list
<!DOCTYPE html>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<script>
var body = document.body;
var i = document.createElement('textarea');
i.autofocus = false;
body.appendChild(i);
i = document.createElement('textarea');
i.autofocus = true;
i.onfocus = function() { setTimeout(document.documentElement.removeAttribute('class'), 0); };
body.appendChild(i);
i = document.createElement('textarea');
i.autofocus = true;
i.onfocus = function() { setTimeout(document.documentElement.removeAttribute('class'), 0); };
body.appendChild(i);
</script>
</body>
</html>