<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: idktoast</title>
    <description>The latest articles on DEV Community by idktoast (@idktoast).</description>
    <link>https://dev.to/idktoast</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4244734%2F56683e84-0dfa-4d18-a64a-4e9e73fb2771.jpg</url>
      <title>DEV Community: idktoast</title>
      <link>https://dev.to/idktoast</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/idktoast"/>
    <language>en</language>
    <item>
      <title>I built a small programming language that runs inside HTML (no eval)</title>
      <dc:creator>idktoast</dc:creator>
      <pubDate>Sat, 14 Nov 2026 15:56:43 +0000</pubDate>
      <link>https://dev.to/idktoast/i-built-a-small-programming-language-that-runs-inside-html-no-eval-57dk</link>
      <guid>https://dev.to/idktoast/i-built-a-small-programming-language-that-runs-inside-html-no-eval-57dk</guid>
      <description>&lt;p&gt;Most page interactions are simple: open a menu, switch a tab, check a form.&lt;br&gt;
In JavaScript that still means selecting elements, adding listeners, and&lt;br&gt;
remembering the DOM API. I wanted to see how short it could be.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Nobelium&lt;/strong&gt;, a tiny language you write directly in your HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Menu&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"menu"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"display:none"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;li&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;nobelium&amp;gt;&lt;/span&gt;
  when click "#b" {
    toggle "#menu"
  }
&lt;span class="nt"&gt;&amp;lt;/nobelium&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;It isn't a JavaScript framework. It has its own lexer, parser and a&lt;br&gt;
tree-walking interpreter, all written in vanilla JavaScript. It never calls&lt;br&gt;
&lt;code&gt;eval()&lt;/code&gt; or &lt;code&gt;Function()&lt;/code&gt;, so it works under a strict Content Security Policy.&lt;br&gt;
One script tag, no build step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it can do
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let n = saved("visits") or 0
save n + 1 as "visits"
set text "#v" to "you've been here {n + 1} times"

post "/api/items" with { name: "pen" } into item
every 1s { log "tick" }
animate "#box" to { left: 200 } over 600ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Events, lists and objects, text interpolation, http requests and streaming,&lt;br&gt;
localStorage, timers, animation, tabs and accordions, importing between&lt;br&gt;
files, and a built-in test runner.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Playground (runs the real interpreter): &lt;a href="https://nobelium.mcbcode.com/playground" rel="noopener noreferrer"&gt;https://nobelium.mcbcode.com/playground&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source and docs: &lt;a href="https://github.com/xyztoast/nobelium" rel="noopener noreferrer"&gt;https://github.com/xyztoast/nobelium&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;p&gt;It's a young project. No lambdas yet, imports need a web server, and it's not&lt;br&gt;
meant to replace JavaScript for real apps. I'd love feedback on the syntax,&lt;br&gt;
especially anything that feels confusing.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
