#TIL that there soon might be a way to declaratively make custom HTML elements w...

@aartaka@merveilles.town

#TIL that there soon might be a way to declaratively make custom HTML elements without #JavaScript... kinda.

github.com/WICG/declarative-pa

This proposal specifies a way to use XML processing instructions and <template for="name"> syntax to build declarative reusable elements. This is heavily under-specified, but seems to be the only / best way to handle custom elements without ever touching JavaScript.

Examples from #HTML spec <html.spec.whatwg.org/multipage> already work in Chromium but not in Firefox. Examples from the proposal don’t work anywhere yet. But I really want them to work and I think I’m just doing something wrong with XML processing instructions <developer.mozilla.org/en-US/do>. I want to make it work, so I’ll play some more!

MDN is suspiciously terse on that part of the spec. I might as well extend it if it works!

#webdev #programming