Permalink
Browse files

extending the sandbox scope to include clearTimeout, clearInterval an…

…d JSON (bugfix for search). padding Y.config into the loader initialization routine to preserve the filter and other properties.
  • Loading branch information...
1 parent a611183 commit 5553a9b68152e35a01a952c2b8d61dac15f05e9f @caridy caridy committed Oct 31, 2012
Showing with 6 additions and 3 deletions.
  1. +2 −2 lib/app/addons/rs/yui.js
  2. +1 −1 lib/app/middleware/mojito-combo-handler.js
  3. +3 −0 lib/yui-sandbox.js
View
@@ -513,9 +513,9 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
// using the loader at the server side to compute the loader metadata
// to avoid loading the whole thing on demand.
- loader = new Ysandbox.Loader({
+ loader = new Ysandbox.Loader(Ysandbox.merge(Ysandbox.config, {
require: Ysandbox.Object.keys(modules_config)
- });
+ }));
resolved = loader.resolve(true);
this._processMeta(resolved.jsMods, modules, expanded_modules, conditions);
@@ -140,7 +140,7 @@ function staticProvider(store, globalLogger) {
// used to find the the modules in YUI itself
Y.use('loader');
- loader = new Y.Loader();
+ loader = new Y.Loader(Y.config);
if (cache && !maxAge) {
maxAge = cache;
View
@@ -38,6 +38,9 @@ exports.getYUI = function (filter) {
module: module,
setTimeout: setTimeout,
setInterval: setInterval,
+ clearTimeout: clearTimeout,
+ clearInterval: clearInterval,
+ JSON: JSON,
__filename: __filename,
__dirname: path.join(__dirname, '..', 'node_modules', 'yui', 'yui-nodejs'),
exports: {}

0 comments on commit 5553a9b

Please sign in to comment.