Open marcoscaceres opened 5 years ago
even more modern
Or actually less modern, because I think we don't need hyperhtml's (or anything else's) dynamic template feature. ReSpec documents in runtime are not mutating their contents in any frequent way.
True that.
So, we're looking for a "template string to dom node" template engine, right?
yep
Note that now that we do have authorization from the W3C to start shipping JS code int specs, we can actually start considering making better use of things like hyperHTML to drive the display of things. For instance, the dfn
pop-box we've talked about stealing from the HTML spec would be one such candidate.
For template string to DOM Node, can't we just use document.createFragment
or createElement("template")
?
We have to support interpolating DOM elements, which is more complicated than just passing string. (text text ${anchorElement} text text
)
Yeah, and there are a bunch of security assurances we get from HyperHTML with attributes and general insertions.
I think we can implement our own assurances with ease, though.
Agree, it won’t be hard. The thing to put in perspective is where this sits in relation to the project priorities. Imho, the main thing for us to focus on this year is migrating folks to using xref, and getting specs into Shepherd. In parallel, we need to finish the migration to webpack or similar, as right now debugging remains challenging.
Some previous opinions from me: https://github.com/w3c/respec/pull/2340#issuecomment-490346182 https://github.com/w3c/respec/pull/2342#issuecomment-490440217
They were about _hyper
comments and lack of DocumentFragment
(hyperhtml uses it's own structure).
We've been using HyperHTML for a while, and it's served us well. As HyperHTML pioneered this space, a few new alternatives have come along. It might be worth while investigating what else is out there and if ReSpec would benefit from using an even more modern templating engine.