News for hackers. Stuff that matters.
Re:TinyJS – Shorten JavaScript QuerySelect with $ and $$ by open-paren on Wednesday October 02, 2024 @05:40PM (#41725223)
Element IDs are automatically attached to the window object

  <script>
  document.addEventListener('DOMContentLoaded', () => {
    window.thing.innerHTML = 'Hello, World!';
  });
  </script>
  <div id="thing"></div>
Re:TinyJS – Shorten JavaScript QuerySelect with $ and $$ by esprehn on Wednesday October 02, 2024 @06:04PM (#41725381)
That's (much) slower and has surprising edge cases: https://news.ycombinator.com/item?id=32997636
Re:TinyJS – Shorten JavaScript QuerySelect with $ and $$ by akira2501 on Wednesday October 02, 2024 @05:47PM (#41725266)

    <div id="parent"></div>
Whoops.