3 ms·
I remember feeling utterly lost when my browser barfed because I typed <script src=“…”> without a closing </script> like I would for an <img> tag.
by raldi 3y ago
I remember feeling utterly lost when my browser barfed because I typed
<script src=“…”>
without a closing
</script>
like I would for an <img> tag.
- oneeyedpigeon 3y ago<script> should probably have been superseded by <link> for external files ages ago, then you could have your self-closing tag and <script>var foo=42;</script> would still work too.
- mrspuratic 3y agoI stepped on that beartrap just last week, Chrome at least will swallow the rest of the page looking for the missing </script>. Context: bulk export of thousands of legacy CGI HTML pages using "chrome --headless" to archive to PDF. The cause was a side effect of xmlstarlet which I used to inject links for CSS and JS rendering fix ups for PDF. The result was perfectly rendered 1-page blank PDFs :/