Care to elaborate? There are some nifty tricks when it comes to golfing JS.
Well the body can’t have any dom elements according to the challenger
That means I had to create the dom elements as well and I was unable to figure out a way within the given character limit
f.addEventListener('keypress',e=>{if(e.keyCode==000) etc()}) f.addEventListener('keypress',e=>{...})
With the older but essentially equivalent f.onkeypress=e=>{...}
and save 18 characters. You can even use `onkeyup` and save 3 more characters.