Is possible to use await in js expression?

Is possible to use await in the js expression statement here?

1 Like

What is the error you are getting? I believe it is looking for a url as that value or a base64 encoded value. Try creating a JS query and passing the results of your function into the image source.

Hi @AnsonHwang I agree that a JS query may be a better solution here.

Can you share more details about why you want to use await?

I just don't want to write more JS query. keep the app more cleaner. QRCode is library I put it in the preload JS library. I want to use it directly in any where I want to use, don't need to wrap it in a extra JS query.

Got it! For now, I'd use a JS query for anything where you need intentional control over when and where the JS will be running. I'll link this use case to an internal ticket where we're tracking requests for more extended Javascript functionality inside double curlies {{}}.