document.currentScript
AssessTechniques
A browser DOM property that returns the script element currently being executed.
Why it's here
Placed in Assess: 1 article(s) of evidence from 1 source(s), led by open-source activity, with 1 in the last 30 days. Confidence 24%. Low accumulated evidence, so it defaults conservatively pending more signal.
Evidence (1)
- 2Simon Willison·10/17/2026open_sourceInline rendering with document.currentScript
Simon Willison highlights a small JavaScript trick that uses document.currentScript to replace an inline script element with rendered content at page load. The pattern can be wrapped in a shortcut function to create a tiny template-like syntax for inline HTML generation.