/** @param {import(".").NS } ns */
const doc = eval('document');

export async function main(ns) {
    // ns.disableLog('ALL');

    const terminalInput = doc.getElementById("terminal-input");
    const handler = Object.keys(terminalInput)[1];

    terminalInput.value = "COMMAND";
    terminalInput[handler].onChange({ target: terminalInput });
    terminalInput[handler].onKeyDown({ key: 'Enter', preventDefault: () => null });
}