initialize: function (previous, baton) { window.XMLHttpRequest = require('ripple/xhr/base'); if (helpers.proxyEnabled()) { var isFileScheme = utils.location().protocol.match(/^file:/); window.XMLHttpRequest = require(isFileScheme ? 'ripple/xhr/jsonp' : 'ripple/xhr/cors'); } }
widgetInfo.features = widgetFeatures.reduce(function (features, validationResult) { if (validationResult.valid) { var feature = toFeature(validationResult); feature.URIs.push({ value: utils.location().href, subdomains: true }); features = features || {}; features[feature.id] = feature; } return features; }, {});
hasPermission: function (desiredModule) { var info = app.getInfo(), feature = info.features ? info.features[desiredModule] : null; return feature === null || _is(feature).allowedFor(utils.location().href) ? _self.ALLOW : _self.DENY; }
hasPermission: function (args) { var info = app.getInfo(), feature = info.features ? info.features[args.desiredModule] : null; return {code: 1, data: feature === null || _is(feature).allowedFor(utils.location().href) ? client.ALLOW : client.DENY}; },