Top-level await?

I am having trouble recalling the current status on top-level await.
It looks like it doesn’t work in UXP plugins (one has to use the IIFE workaround), I would have bet there was some talk of implementing it, some time ago.

@DavideBarranca global(top-level) await was only for Scripts and we don’t see a need for plugins to have global await, as we have plugin, panel lifecycle events and entry points etc to achieve things

Global await was never planned for plugins.

can you give details on where you are trying to use Global Await so that we can understand better and suggest how to achieve it.

Hi Vinay,
thanks for replying! Nothing in particular, actually—I’m writing the 2nd edition of my book on PS Scripting and I wanted to make sure I’m on top of things :slight_smile:
So, Scripts only, :+1:

I was under the impression that top-level await is part of V8 scripting engine that you just put into UXP as it is.
See: Top-level await · V8

But maybe my impression was wrong?