lolinder 7 days ago

I'd be surprised if it uses moveBefore for something that seems to have put so much thought into being portable. moveBefore doesn't even have an entry in MDN yet, the only references I can find to it suggest it's still only available behind a flag in Chrome canary.

  • samhh 7 days ago

    It could support it as a progressive enhancement.

    • lolinder 7 days ago

      I personally wouldn't even bother with that yet.

      Once it's available in even one browser not behind a flag, sure, but while it's still entirely undocumented and only available to people who both use Chrome Canary and know to go turn on a specific flag?

mathuo 7 days ago

There are multiple ways in which you can specify how the panel renders.

https://dockview.dev/docs/core/panels/rendering

Options exist for multiple cases:

1. Where you never want the elements DOM position to move (`always` rendering mode) and the HTMLElement is simply hidden (display: none) when not visible. 2. Where you only want the DOM element to exist when the panel is visible (`onlyWhenVisible` mode)

In the case of React the React Tree is always maintained in either mode.