Help - Special attribute <script async

Hello everyone,

In one addon I need to add a script async with a viewlet into html head.

When add this script it render as:

<script async="" src="..."></script>

Instead of:

<script async src="..."></script>

And the script don't work as expected.

I look for the documentation and don't find a way to fix it.

Even with the tal:replace="structure trick it don't work.

Is it needed to add an exception in plone.transform? can someone guide me on this?

I found that if use:

<script async="async" src="..."></script>

Should work, but at my tests it loads just sometimes at the expected time (after all other non async scripts)

In the end we switched to:

<script defer src="..." />

And now it is working as expected!