MutationObserver
perfomance and Narrowing actually used text nodes
#30
Labels
enhancement
New feature or request
Problem
Mutations
We want to watch for any changes in elements to handle a possibility of elements that they changed their position or bounds.
For this we use
MutationObserver
, which is observing everything starting fromroot
element.If we let to pass any node to the
root
, it may contain unwanted elements, which may be the Editor elements themselves. So we need to check if a mutation doesn't relate to any of unwanted elements, which may be harmful for perfomance since it should be checked on every mutaiton callback.Unrelated elements
Custom
root
element may also contain, elements, which are not localized byi18next
, which may be misleading to highlight them. It's also harmful for perfomance since we need to observe for changes of elements are not actually related to the Editor.Solution
root
elements.root
elements, which will beroot
element.The text was updated successfully, but these errors were encountered: