I have a line of code that uses await fetch(). I'm using some script injecting that invokes eval( "await fetch ...etc..." ), but the problem is that await doesn't go when it's called from eval().
So, the aim is to rewrite just this one line without using await. How to do that?
( await fetch( ff_url, ff_params ) )
.json()
.then( data => window.items_list = data.items );
Upd: This code is used with AutoHotkey. There's no need to split the line into two (neither split in JavaScript or AutoHotkey) to check if fetch is already done because in my case (AutoHotkey + JS) I think it's simpler to periodically verify if window.items_list has a value or is still undefined :D
P.S. Thanks for answers, it works fine!