Like content in the SVG <foreignObject> element:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject
I started something like this, but had to pause it because work. On reconsideration, it isn't worth it.
A general namespace system would be useful, but it depends on the browser having a built-in renderer for that XML namespace. As it stands, only HTML and SVG are generally supported. MATHML support has declined (Chrome dropped it, so only Firefox remains) and there are javascript+CSS solutions for rendering math that are better for the end user, albeit slightly uglier than a native renderer.
About the only use case for a general namespace system is embedding HTML inside SVG - i.e. <foreignobject> like you said. I could imagine a few uses for this (graph labels, video), but probably not enough to justify adding it into hyperapp.
I reserve the right to change my mind if I think of a cleverer way of doing this than I proposed earlier.
Most helpful comment
I started something like this, but had to pause it because work. On reconsideration, it isn't worth it.
A general namespace system would be useful, but it depends on the browser having a built-in renderer for that XML namespace. As it stands, only HTML and SVG are generally supported. MATHML support has declined (Chrome dropped it, so only Firefox remains) and there are javascript+CSS solutions for rendering math that are better for the end user, albeit slightly uglier than a native renderer.
About the only use case for a general namespace system is embedding HTML inside SVG - i.e.
<foreignobject>like you said. I could imagine a few uses for this (graph labels, video), but probably not enough to justify adding it into hyperapp.I reserve the right to change my mind if I think of a cleverer way of doing this than I proposed earlier.