4 ms·
I may be wrong, but I think that document.write() will load the script synchronously while inserting a `script` element will not.
by pygy_ 9y ago
I may be wrong, but I think that document.write() will load the script synchronously while inserting a `script` element will not.
- acdha 9y agoYou can set async=false on a dynamic script element to avoid the default asynchronous behaviour.
- pygy_ 9y agoI just looked at the support matrix: IE10+. So it is reasonably supported nowadays, nice :-)
- acdha 9y agoWorking on the web is refreshing like that these days — so many things which used to be painful are now just standards + “Microsoft doesn't support that old version of IE and neither do we”.