preact-habitat
preact-habitat copied to clipboard
Ability to replace the container rather than mount inside
Is it possible to replace the container you specify rather than mounting inside? I'm just trying to reduce DOM elements. I understand it may be a limitation of Preact/React - sorry, I'm old skool and still getting up to speed. If so, feel free to close this.
For example:
<div class="some-class">
<script type="text/props">
{
"title": "Widget Title passed as prop",
"theme": "red",
"anotherProp": "Thanks for trying this widget out!"
}
</script>
</div>
... would render ...
<div class="my-widget">
...
</div>
... rather than ...
<div class="some-class">
<div class="my-widget">
...
</div>
</div>
I think this is a legit use case, I will implement that.