<!DOCTYPE html> <html> <head> <script src="../../resources/js-test.js"></script> <script src="resources/common.js"></script> <script> window.jsTestIsAsync = true; waitUntilLoadedAndAutofocused(function() { shouldBe('document.activeElement', 'document.querySelector("keygen")'); shouldBe('document.activeElement.autofocus', 'true'); finishJSTest(); }); </script> </head> <body> <keygen autofocus> <pre id="console"> This tests whether the keygen element supports the autofocus attribute. </pre> </body> </html>