2 Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
8 YUI.add('rls', function(Y) {
11 * Implentation for building the remote loader service url.
13 * @param {Array} what the requested modules.
15 * @return {string} the url for the remote loader service call.
17 Y._rls = function(what) {
19 var config = Y.config,
23 m: 1, // required in the template
26 env: 1, // required in the template
28 '2in3v': config['2in3'],
31 filts: config.filters,
32 tests: 1 // required in the template
36 rls_base = config.rls_base || 'load?',
39 rls_tmpl = config.rls_tmpl || function() {
42 if (param in rls && rls[param]) {
43 s += param + '={' + param + '}&';
46 // console.log('rls_tmpl: ' + s);
54 rls.env = Y.Object.keys(YUI.Env.mods);
55 rls.tests = Y.Features.all('load', [Y]);
57 url = Y.Lang.sub(rls_base + rls_tmpl, rls);
60 config.rls_tmpl = rls_tmpl;
68 }, '3.3.0' ,{requires:['get','features']});