Skip to content

Instantly share code, notes, and snippets.

@while0pass
Last active December 26, 2015 08:19
Show Gist options
  • Save while0pass/7121603 to your computer and use it in GitHub Desktop.
Save while0pass/7121603 to your computer and use it in GitHub Desktop.

Revisions

  1. while0pass revised this gist Oct 23, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions inConsoleFindCircularRefs.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    ZZZ = document.createElement('script');
    ZZZ.src = '//yandex.st/dojo/1.9.1/dojo/dojo.js';
    document.body.appendChild(ZZZ);
    // In firebug one can use ``include`` command instead:
    // include('//yandex.st/dojo/1.9.1/dojo/dojo.js');

    require(["dojox/json/ref"], function(){
    window.ZZZ = dojox.json.ref.toJson(ko.toJS(objectWithCircularReferences));
  2. while0pass created this gist Oct 23, 2013.
    10 changes: 10 additions & 0 deletions inConsoleFindCircularRefs.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    ZZZ = document.createElement('script');
    ZZZ.src = '//yandex.st/dojo/1.9.1/dojo/dojo.js';
    document.body.appendChild(ZZZ);

    require(["dojox/json/ref"], function(){
    window.ZZZ = dojox.json.ref.toJson(ko.toJS(objectWithCircularReferences));
    });

    // Then one can look for "$ref" substring in global ZZZ variable that would
    // locate circular references.