It was mentioned as a comment by @henri-chan, but I think it deserves some more attention:
When you update the content of an element with new html using jQuery/javascript, and this new html contains <script>
tags, those are executed synchronously and thus triggering this error. Same goes for stylesheets.
You know this is happening when you see (multiple) scripts or stylesheets being loaded as XHR
in the console window. (firefox).