# Inline rendering with document​.currentScript

- Source: Simon Willison (LLMs)
- Published: 2026-10-17T21:11:12+00:00
- Category: Tech
- Original: https://simonwillison.net/2026/Oct/17/document-currentscript/
- Canonical: https://groundlevelnews.com/story/inline-rendering-with-document-currentscript-69ead9/

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 element that replaces itself when the page loads: The year is document.currentScript.replaceWith( new Date().getFullYear()) If you define a shortcut function like this: $=(...n)=>document.cur

_Ground Level News shows a short summary only; the full article and all rights belong to Simon Willison (LLMs)._
