Sure, just like in any other Javascript code - the code only need to be inside a 'async' function:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
|
<action ... type="js"><![CDATA[
async function asyncCall()
{
... inside a async function you could use await ...
}
asyncCall();
]]></action>
|
or just run directly an anonymous function:
|
Quellcode
|
1
2
3
4
5
6
|
<action ... type="js"><![CDATA[
(async function()
{
... inside a async function you could use await ...
})();
]]></action>
|
But note - async, await is only syntactical sugar for promises and callbacks, there is no real asynchronous processing.
For such web-workers would need to be used.