ChipokiaTech news, without the noise
← All stories

Inline rendering with document​.currentScript

Lean Rada describes a neat trick that takes advantage of the document.currentScript property. You can use that to drop in a tiny inline <script> element that replaces itself when the page loads: The year is <script> document.currentScript.replaceWith( new…

Preview courtesy of Simon Willison. The full article opens on their site.

More from Simon Willison