Comment by garbagepatch
Comment by garbagepatch 7 days ago
Does this use the new moveBefore API to move DOM elements while preserving their state? Or is it going to recreate the elements eitherway due to React/Vue?
Comment by garbagepatch 7 days ago
Does this use the new moveBefore API to move DOM elements while preserving their state? Or is it going to recreate the elements eitherway due to React/Vue?
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.
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.