There is a lot of documentation about how async and defer affect the timing of the loading and the start of execution of external scripts, but I can't find anything that mentions when the script finishes executing.
For instance, suppose the external script defines functions one(), two(), three(), and four():
<head>
…
<script async="async" src="…"></script>
…
</head>
<body>
…
<script> window.onload="one()" </script>
…
<script> two() </script>
</body>
<script> three() </script>
</html>
<script> four() </script>
The external script starts loading in parallel with the HTML, and then executes as soon as it's loaded.
I'm pretty sure that two() is unrealiable, as it could be undefined when it gets called, but I don't know about the others.
Are any of the functions guaranteed to be available when they are called?

