Skip to content
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

🐛 [RUMF-469] fix angular compatibility #376

Merged
merged 3 commits into from
Apr 24, 2020

Conversation

BenoitZugmeyer
Copy link
Member

Angular uses Zone.js to provide a context persisting accross async tasks. Zone.js replaces the global MutationObserver constructor with a patched version to support the context propagation. There is an ongoing issue[1, 2] with this setup when using a MutationObserver within a Angular component: on some occasions, the callback is being called in an infinite loop, causing the page to freeze (even if the callback is completely empty).

To work around this issue, we are using the Zone __symbol__ API to get the original, unpatched MutationObserver constructor.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner April 24, 2020 09:23
@codecov-io
Copy link

Codecov Report

Merging #376 into master will decrease coverage by 0.16%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
- Coverage   86.94%   86.78%   -0.17%     
==========================================
  Files          30       30              
  Lines        1693     1702       +9     
  Branches      343      345       +2     
==========================================
+ Hits         1472     1477       +5     
- Misses        221      225       +4     
Impacted Files Coverage Δ
packages/rum/src/domMutationCollection.ts 89.47% <80.00%> (-10.53%) ⬇️
packages/rum/src/rum.ts 85.10% <0.00%> (-2.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2075aa...989e0fa. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants