Mercurial > browser-couch
changeset 27:95a1e6ad3f57
Added calls to ModuleLoader.require() where JSON is needed.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Mon, 13 Apr 2009 15:34:00 -0700 |
parents | fd8f4c369dc4 |
children | 6b79ea22097e |
files | big.js tests.js |
diffstat | 2 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/big.js Mon Apr 13 15:29:56 2009 -0700 +++ b/big.js Mon Apr 13 15:34:00 2009 -0700 @@ -99,7 +99,12 @@ }, finished: function(aResult) { status.textContent = "Done."; - result.textContent = JSON.stringify(aResult); + + ModuleLoader.require( + "JSON", + function() { + result.textContent = JSON.stringify(aResult); + }); }} ); }
--- a/tests.js Mon Apr 13 15:29:56 2009 -0700 +++ b/tests.js Mon Apr 13 15:34:00 2009 -0700 @@ -97,9 +97,13 @@ {key: "hello", value: 2}, {key: "there", value: 2}]}; - self.assertEqual(JSON.stringify(expected), - JSON.stringify(result)); - self.done(); + ModuleLoader.require( + "JSON", + function() { + self.assertEqual(JSON.stringify(expected), + JSON.stringify(result)); + self.done(); + }); }}); }); });