Function("arg1", "arg2", "return arg1 + arg2")(10, 20)
// 30

みたいなことを async 版でやりたいとき
↓ を準備

window.AsyncFunction = (async()=>{}).constructor

あとは同じように使える

await AsyncFunction("arg1", "return await fetch(arg1).then(e => e.text())")(location.href)
// <!doctype html> ……