2.2.52 [HTML] Section 18.2.1, The SCRIPT element
The specification states:
All Document Modes (All Versions)
If an author incorrectly adds document.write() within a deferred script tag, only the script-generated content will be displayed. Rendering of the remainder of the page will fail.