Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function doRoute(request) {
var self = this;
var subView = self.getSubView();
var navigationView = self.get('navigationView');
var activeView = navigationView.get('activeView');
if (!subView) {
subView = new (self.get('SubView'))();
navigationView.addChild(subView);
subView.get('el').css('transform', 'translateX(-9999px) translateZ(0)');
}
subView.controller = self;
this.defer = new Promise.Defer();
this.promise = this.defer.promise;
if (!request.replace ||
// first screen replace
!activeView) {
if (activeView) {
activeView.controller.leave();
}
if (navigationView.waitingView) {
navigationView.waitingView.controller.leave();
}
}
self.enter();
var route = request.route;
if (duration) {
config.duration = duration;
}
if (easing) {
config.easing = easing;
}
}
config.node = node;
config.to = to;
}
config = util.merge(defaultConfig, config);
// Promise.call(self);
AnimBase.superclass.constructor.call(self);
Promise.Defer(self);
/**
* config object of current anim instance
* @type {Object}
*/
self.config = config;
node = config.node;
if (!util.isPlainObject(node)) {
node = Dom.get(config.node);
}
self.node = self.el = node;
self._backupProps = {};
self._propsData = {};
function IO(c) {
var self = this;
if (!(self instanceof IO)) {
return new IO(c);
}
// Promise.call(self);
IO.superclass.constructor.call(self);
Promise.Defer(self);
self.userConfig = c;
c = setUpConfig(c);
util.mix(self, {
// 结构化数据,如 json
responseData: null,
/**
* config of current IO instance.
* @member KISSY.IO
* @property config
* @type Object
*/
config: c || {},
timeoutTimer: null,
function IO(c) {
var self = this;
if (!(self instanceof IO)) {
return new IO(c);
}
// Promise.call(self);
IO.superclass.constructor.call(self);
Promise.Defer(self);
self.userConfig = c;
c = setUpConfig(c);
util.mix(self, {
// 结构化数据,如 json
responseData: null,
/**
* config of current IO instance.
* @member KISSY.IO
* @property config
* @type Object
*/
config: c || {},
timeoutTimer: null,
function IO(c) {
var self = this;
if(!(self instanceof IO)) {
return new IO(c)
}
IO.superclass.constructor.call(self);
Promise.Defer(self);
self.userConfig = c;
c = setUpConfig(c);
S.mix(self, {responseData:null, config:c || {}, timeoutTimer:null, responseText:null, responseXML:null, responseHeadersString:"", responseHeaders:null, requestHeaders:{}, readyState:0, state:0, statusText:null, status:0, transport:null});
var TransportConstructor, transport;
IO.fire("start", {ajaxConfig:c, io:self});
TransportConstructor = transports[c.dataType[0]] || transports["*"];
transport = new TransportConstructor(self);
self.transport = transport;
if(c.contentType) {
self.setRequestHeader("Content-Type", c.contentType)
}
var dataType = c.dataType[0], i, timeout = c.timeout, context = c.context, headers = c.headers, accepts = c.accepts;
self.setRequestHeader("Accept", dataType && accepts[dataType] ? accepts[dataType] + (dataType === "*" ? "" : ", */*; q=0.01") : accepts["*"]);
for(i in headers) {
self.setRequestHeader(i, headers[i])
}
if (visit42_93_1(easing)) {
_$jscoverage['/base.js'].lineData[94]++;
config.easing = easing;
}
}
_$jscoverage['/base.js'].lineData[97]++;
config.node = node;
_$jscoverage['/base.js'].lineData[98]++;
config.to = to;
}
_$jscoverage['/base.js'].lineData[101]++;
config = util.merge(defaultConfig, config);
_$jscoverage['/base.js'].lineData[104]++;
AnimBase.superclass.constructor.call(self);
_$jscoverage['/base.js'].lineData[105]++;
Promise.Defer(self);
_$jscoverage['/base.js'].lineData[111]++;
self.config = config;
_$jscoverage['/base.js'].lineData[113]++;
node = config.node;
_$jscoverage['/base.js'].lineData[115]++;
if (visit43_115_1(!util.isPlainObject(node))) {
_$jscoverage['/base.js'].lineData[116]++;
node = Dom.get(config.node);
}
_$jscoverage['/base.js'].lineData[118]++;
self.node = self.el = node;
_$jscoverage['/base.js'].lineData[119]++;
self._backupProps = {};
_$jscoverage['/base.js'].lineData[120]++;
self._propsData = {};
_$jscoverage['/base.js'].lineData[123]++;
function IO(c) {
_$jscoverage['/io/base.js'].functionData[3]++;
_$jscoverage['/io/base.js'].lineData[279]++;
var self = this;
_$jscoverage['/io/base.js'].lineData[281]++;
if (visit13_281_1(!(self instanceof IO))) {
_$jscoverage['/io/base.js'].lineData[282]++;
return new IO(c);
}
_$jscoverage['/io/base.js'].lineData[286]++;
IO.superclass.constructor.call(self);
_$jscoverage['/io/base.js'].lineData[287]++;
Promise.Defer(self);
_$jscoverage['/io/base.js'].lineData[289]++;
self.userConfig = c;
_$jscoverage['/io/base.js'].lineData[291]++;
c = setUpConfig(c);
_$jscoverage['/io/base.js'].lineData[293]++;
util.mix(self, {
responseData: null,
config: visit14_302_1(c || {}),
timeoutTimer: null,
responseText: null,
responseXML: null,
responseHeadersString: '',
responseHeaders: null,
requestHeaders: {},
readyState: 0,
state: 0,
var navigationView = self.get('navigationView');
_$jscoverage['/navigation-view/controller.js'].lineData[14]++;
var activeView = navigationView.get('activeView');
_$jscoverage['/navigation-view/controller.js'].lineData[15]++;
if (visit25_15_1(!subView)) {
_$jscoverage['/navigation-view/controller.js'].lineData[16]++;
subView = new (self.get('SubView'))();
_$jscoverage['/navigation-view/controller.js'].lineData[17]++;
navigationView.addChild(subView);
_$jscoverage['/navigation-view/controller.js'].lineData[18]++;
subView.get('el').css('transform', 'translateX(-9999px) translateZ(0)');
}
_$jscoverage['/navigation-view/controller.js'].lineData[20]++;
subView.controller = self;
_$jscoverage['/navigation-view/controller.js'].lineData[22]++;
this.defer = new Promise.Defer();
_$jscoverage['/navigation-view/controller.js'].lineData[23]++;
this.promise = this.defer.promise;
_$jscoverage['/navigation-view/controller.js'].lineData[25]++;
if (visit26_25_1(!request.replace || !activeView)) {
_$jscoverage['/navigation-view/controller.js'].lineData[28]++;
if (visit27_28_1(activeView)) {
_$jscoverage['/navigation-view/controller.js'].lineData[29]++;
activeView.controller.leave();
}
_$jscoverage['/navigation-view/controller.js'].lineData[31]++;
if (visit28_31_1(navigationView.waitingView)) {
_$jscoverage['/navigation-view/controller.js'].lineData[32]++;
navigationView.waitingView.controller.leave();
}
}
_$jscoverage['/navigation-view/controller.js'].lineData[36]++;