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

Recommend the zone add option that disabled patch the readonly properties #54

Open
jinxiu3939 opened this issue Sep 7, 2021 · 0 comments

Comments

@jinxiu3939
Copy link

I use the third-part js framework in angular, it is babylon, When I use it`s function to import the xml file through the XMLHttpRequest, I can not do anything callback with the response, because the zone patch the DONE attribute of the XMLHttpRequest that became a function.

In the babylon.js,there is a condition, if the condition is true, it should callback the response, howeaver, it is false.

The condition is below:

if (request.readyState === (XMLHttpRequest.DONE || 4)) { // do success callback }

I try to use '__Zone_ignore_on_properties' and '__Zone_disable_XHR' to config the zone donot patch the XMLHttpRequest module, howeaver it is not work in angular.

I think the problem is the DONE attribute patch of zone in XMLHttpRequest is conflict with other framework. Other attributes is also, for example, LOADING, OPENED.

Because these attribute are readonly, I can not reset the value.

So I recommend the zone should disable patch for readonly properties in the next version.

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

No branches or pull requests

1 participant