Provide a way for zonejs to not patch MutationObserver
See original GitHub issue🐞 bug report
Affected Package
The issue is caused by package @angular/zone.js
Description
Our application runs Angular and Salesforce’s Lightning Web Components in the same document. A component in their library depends on the MutationObserver
to be the native implementation. Zone.js patches the MutationObserver unless we set flag, __Zone_disable_EventTarget = true
. However we do not wish to set that flag.
Only work around that we found is to re-assign the Native Code implementation for MutationObserver found by window[Zone.__symbol__("MutationObserver")]
before we load the component.
Wish for guidance or a solution to set zone.js to not patch the MutationObserver.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (6 by maintainers)
Top Results From Across the Web
angular/angular - Gitter
i have a form created via formBuilder. I now want to do form.controls['name'].value = 'something', but this does not set the value of...
Read more >Angular2 Directive: How to detect DOM changes
Angular does not provide something built-in for that purpose. You can use MutationObserver to detect DOM changes. @Directive({ selector: '[my-skrollr]', .
Read more >MutationObserver.disconnect() - Web APIs - MDN Web Docs
The MutationObserver method disconnect() tells the observer to stop watching for mutations.
Read more >zone.d.ts - UNPKG
Provide a way to attach data to zones * 4. Provide a context specific last frame error handling * 5. (Intercept blocking methods)...
Read more >Listening to DOM Changes Using MutationObserver in Angular
In this article, we're going to learn how to build an Angular Directive that listens to DOM changes using MutationObserver Web API.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mjyocca , there is a PR for this purpose https://github.com/angular/angular/pull/31657, since it is a breaking change, I will work on it for the next major version, your current walk around (re-assign the native MutationObserver is totally fine).
@splincode , could you give me a reproduce repo?
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.