Skip to content

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

@jinxiu3939

Description

@jinxiu3939

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions