-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move mutation processing into it's own class #223
Conversation
44d8d91
to
ee5038a
Compare
Not currently working; output is producing this:
instead of
|
Ok, working now with the 05334ef commit. |
Have solved the bind problem by making all methods use the Arrow function expressions. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://stackoverflow.com/questions/43724426/this-is-undefined-inside-the-foreach-loop |
This should stand on it's own as a refactor, but is intended as a basis for exposing the new MutationBuffer object to further outside control e.g. to 'mute' or batch up mutation emission when the page becomes inactive from a https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API point of view
…ffer` object, as otherwise `this` referred to the `MutationObserver` object itself
50190a7
to
fc5e355
Compare
@eoghanmurray The changes look good to me. If I'm right, this patch is a 1-1 rewrite of the mutation processing code without any new logic and would be the base of the following changes. Please let me know if I'm wrong. For example, if there are any logical changes to the processing flow and I would like to review that part again. (I've already go through the patch, but Github's split view was not quite useful for comparing new files and deleted files) |
Yes, this |
@eoghanmurray Thanks for the feedback, I would love to merge this patch and start to review the next one. |
This should stand on it's own as a refactor, but is intended as a basis
for exposing the new MutationBuffer object to further outside control e.g.
to 'mute' or batch up mutation emission when the page becomes inactive
from a https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
point of view