zaceno / hyperapp-nestable

Embed apps in other apps, as if they were components
MIT License
40 stars 8 forks source link

Avoid wrapper element #5

Closed jimfranke closed 6 years ago

jimfranke commented 6 years ago

Hi @zaceno,, Is it possible to avoid the wrapping element in which the nested app is rendered (default x-), and for example render to a DocumentFragment? Regards, Jim

zaceno commented 6 years ago

@jimfranke

I don’t think so, sorry. I’ve experimented with replacing the wrapping element in its parent with the root element of the nestable view. So that in effect the wrapping element is only a temporary placeholder. But I couldn’t get it to work dependably.

christiankaindl commented 6 years ago

@jimfranke Depending on what browsers you need to support, you could use the CSS feature display: contents

Article https://bitsofco.de/how-display-contents-works/

Browser compatibility: https://developer.mozilla.org/en-US/docs/Web/CSS/display#Browser_compatibility

zaceno commented 6 years ago

@christiankaindl Thanks for the tip about display: contents - very useful css rule!

@jimfranke Thanks for raising the question, but I'm going to close for now. I don't expect to work on this in the future. Sorry!