Results 1 to 2 of 2

Thread: Ext.clone not working properly in chrome

  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    1

    Default Ext.clone not working properly in chrome

    I am using ExtJs 4.13 and facing a strange behavior of Ext.clone() function in google chrome.

    The problem is that I am trying to create clones of the responseXML object that I receive in Ext.Ajax.Request success function and it always returns null in chrome where as it works perfectly in mozilla firefox.

    To elaborate in detail, following is what I try to do

    Ext.Ajax.request({
    url: ...,
    method: ..,
    async: false,
    params: {
    ....
    },
    success: function(response)
    {
    a={};
    b={}
    a=Ext.clone(response.resposeXML);
    b=Ext.clone(response.resposeXML);
    console.log(a); //shows the correct response object in mozilla but null in chrome
    console.log(b); //shows the correct response object in mozilla but null in chrome
    }
    });

    Kindly suggest me why it creates a perfect object copy in case of mozilla and not in chrome.
    My overall requirement is to make multiple copies of response.resposeXML so as to avoid redundant ajax calls.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    This looks to be an issue in Chrome. It does a cloneNode method call on XML document that is what returns null. The cloneNode method is a native method that we have no control over so looks like a bug in Chrome.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •