madmurphy / entities.js

Born Again Netscape's JavaScript Entities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why this?

trusktr opened this issue · comments

For example, there's other ways to create DOM with template-like functionality (f.e. Handlebars, Angular, React, Vue, etc). Why would you like to use this over the others? Is it mostly just because it's easy for small projects / prototyping?

Check out this new proposal I just stumbled on, effectively "template syntax" for <template> elements: https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Template-Instantiation.md

If this feature lands in browsers, it would effectively provide everything entities.js provides, but in a more robust way without relying on strictly on global scope. It would be further possible to implement an entities-like syntax for template elements.

Hi @trusktr ! Thank you for your message.

If I am not wrong the <template> element already landed in Firefox long ago, but I do not see how it might improve my entities.js. Any example?