When you inject HTML into a document and it includes <script>
tags, jQuery runs the script synchronously so that on the next statement
after the injection that script will have loaded/run and can be used.
Some old-school templating systems depend on this to build
HTML-and-script templates. If the script were run asynchronously the
code wouldn't know when it actually was safe to use the final template.
I definitely think it's better to avoid injecting scripts via
HTML, especially if the script is remote and the page will be blocked
while it is fetched and executed. You can use `$.getScript()` for that
and it happens asynchronously.
If you think a note is warranted it would be good to think about
where that note might go and file an issue
at https://github.com/jquery/api.jquery.com/issues . Note that HTML
can be inserted by dozens of jQuery APIs, by design, and script tags
can pretty much go anywhere any other HTML does.