3 ms·
Yup, had to solve a lot of issues around corner cases like these. So Hibiki HTML is built on top of React, so react / virtual DOM handles all of the DOM repain
by sawka 5y ago
Yup, had to solve a lot of issues around corner cases like these. So Hibiki HTML is built on top of React, so react / virtual DOM handles all of the DOM repaints and synthetic events, etc.
For tables and weird HTML syntax, there are two built in escape hatches. You can write any HTML element using the "html" prefix, so a table can look like <html-table><html-tr><html-td>...</html-td></html-tr></html-table>. You can then nest non-table tags inside of there without breaking the natural DOM parsing. You can also reference a component using the "component" attrribute. So <tr component="local-foo"> will render the "foo" component in place of the <tr> tag.
There was also a lot of dog-fooding for how to wrap <input> controls and how to make useful <table> abstractions. So there is functionality around merging attributes to children and injecting values into children (Hibiki's answer to "higher order components"). I was really focused on how to make a powerful enough component system to make using the components in HTML feel really natural.