---
format: "aidr-story-markdown/v1"
id: "cc225fa176e6c3eac28c867630cfab17ecd112c0c6bb9300334c1ce711f7f94a"
canonical_url: "https://aidr.today/cc225fa1?lang=en"
title: "Inline rendering with document​.currentScript"
lang: "en"
requested_lang: "en"
available_langs: ["en","vi"]
translation_fallback: null
fallback_fields: []
published_at: "2026-10-17T21:11:12.000Z"
category: "Releases"
topics: ["coding"]
source_urls: ["https://simonwillison.net/2026/Oct/17/document-currentscript/"]
summary: "Lean Rada demonstrated a technique using the document.currentScript property to enable inline rendering in JavaScript, allowing a small inline script element to replace itself on page load with dynamic content such as the current year. A shortcut function can be defined to create a minimal template language for inserting values directly within HTML."
---

# Inline rendering with document​\.currentScript

> [Open the canonical story](<https://aidr.today/cc225fa1?lang=en>)

**Published:** 2026-10-17T21:11:12.000Z
**Category:** Releases
**Topics:** coding

## Summary

Lean Rada demonstrated a technique using the document\.currentScript property to enable inline rendering in JavaScript, allowing a small inline script element to replace itself on page load with dynamic content such as the current year\. A shortcut function can be defined to create a minimal template language for inserting values directly within HTML\.

## Sources

- [Story source](<https://simonwillison.net/2026/Oct/17/document-currentscript/>)

