I'm currently building a video game on the web, it's a millionaire. I came up with the idea that as one of the help, I would enable users to use google for 20 seconds. I managed to open a window with a search engine, but after 20 seconds I want to close it, this is not possible if the user has searched something.
newWindow=window.open('https://google.com','mywindow', 'width=375px, height=400px, top=200px')
setTimeout(() =>{
newWindow.close()
},22000)
I also watched this tutorial: https://www.youtube.com/watch?v=2Qu8mwQizbM