You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should be able to detect all changes in DOM with MutationObservers. This should eliminate the need of polling with setTimeout()s for detecting changes after DOMContentReady.
If we can't find MutationObserver support in a browser, we can fallback to polling with setTimeout()s.
It should also be noted that if the poller turns itself off after a few runs like we did in other implementations, we won't be able to detect changes in a single-page application. We could detect hashchange to re-run the poller, but there is no event to listen for history.pushState() or history.replaceState() and wrapping them is dirty.
So, to wrap up:
If there is MutationObserver support, we are fine.
If not, we have to poll every X miliseconds and look for new IFRAMES.
We can provide an option (_mlle.spa = false;?) to limit polling to a few seconds, but polling won't be that resource consuming.
The text was updated successfully, but these errors were encountered:
We should be able to detect all changes in DOM with MutationObservers. This should eliminate the need of polling with
setTimeout()
s for detecting changes afterDOMContentReady
.If we can't find
MutationObserver
support in a browser, we can fallback to polling withsetTimeout()
s.It should also be noted that if the poller turns itself off after a few runs like we did in other implementations, we won't be able to detect changes in a single-page application. We could detect
hashchange
to re-run the poller, but there is no event to listen forhistory.pushState()
orhistory.replaceState()
and wrapping them is dirty.So, to wrap up:
MutationObserver
support, we are fine._mlle.spa = false;
?) to limit polling to a few seconds, but polling won't be that resource consuming.The text was updated successfully, but these errors were encountered: