inline-scripts
inline-scripts copied to clipboard
Deferred scripts are not handled correctly
Script tags such as <script src="main.js" defer></script> will not work correctly, since when they are inlined they are executed immediately in the document's head. This breaks existing code because deferred scripts assume the entire DOM has already loaded. I suspect scripts with the async tag would also break in a similar way, but I have not verified this.
A possible fix would be moving deferred script tags to the end of the page.