Skip to content

Commit

Permalink
[Bug #8064] JSON3 implementation wrapped by a closure. Also shadowed …
Browse files Browse the repository at this point in the history
…possibly existing global exports object and define function.
  • Loading branch information
msak committed Jan 30, 2014
1 parent 1010406 commit 318b137
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions framework/source/class/qx/lang/Json.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ qx.Bootstrap.define("qx.lang.Json",
}
});

(function () {
// define JSON3 object
var JSON3;

// prevent using CommonJS exports object,
// by shadowing global exports object
var exports;

// prevent using AMD compatible loader,
// by shadowing global define function
var define;


/*! JSON v3.2.5 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */
/**
* @ignore(define.*, exports)
Expand Down Expand Up @@ -1065,6 +1078,7 @@ qx.Bootstrap.define("qx.lang.Json",
}
}(this));
// End of original code.
}());

// Finally expose (polyfilled) window.JSON as qx.lang.Json.JSON
qx.lang.Json.stringify = window.JSON.stringify;
Expand Down

0 comments on commit 318b137

Please sign in to comment.