[w3c/webcomponents] [templates] Is a global registry of template processors the right idea? (#681)

The alternative, in my view, is requiring imperative code to instantiate templates given processors, as in the API at https://github.com/domenic/template-parts#the-templateinstantiate-method or similar. (Inspired by our previous discussions.)

This would require libraries and frameworks to come up with their own, possibly fragmented syntax for doing declarative templating. But it seems harsh to force another global registry on people given how much complaining we get around the global registry of element names in custom elements. There it was unavoidable, but here it seems pretty avoidable.

Maybe we should have both, i.e. have an underlying imperative API and then if you want to use a global registry that the browser provides, you can? The idea being that more advanced frameworks would then be able to take advantage of the functionality here without necessarily locking themselves into the browser-supplied global registry.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/681

Received on Thursday, 2 November 2017 04:17:22 UTC