is it possible to use the addScript
with async="true"
?
I found a hack that uses some clever quoting to trick the embed function, but it seems as if this could be a native feature:
$doc->addScript("//myscript.js", 'text/javascript" async="true');