/** * Focus a username field before DOMContentLoaded. */ "use strict"; const DELAY = 2 * 1000; // Delay two seconds before completing the request. // In an SJS file we need to get the setTimeout bits ourselves, despite // what eslint might think applies for browser tests. // eslint-disable-next-line mozilla/no-redeclare-with-import-autofix let { setTimeout } = ChromeUtils.importESModule( "resource://gre/modules/Timer.sys.mjs" ); function handleRequest(request, response) { response.processAsync(); response.setHeader("Content-Type", "text/html;charset=utf-8", false); response.setHeader("Cache-Control", "no-cache", false); response.write(`
`); setTimeout(function finishOutput() { response.write(``); response.finish(); }, DELAY); }