V
Size: a a a
d
0
0
0
O
O
d
O
d
0
0
V
var SingletonProcessUtm = (function () {
function Singleton() {
var settings = {
namePrefix : "__lt_",
expiryDays : 30,
};
var utils = {
// example
getPathname: function() {
return location.pathname;
},
};
this.base = {
getWithExpiry: function(url) {
var key = utils.getStorageKey(url);
return key; //example
},
compareUtmSourceFromLocalStorage: function(utmSource) {
var currentCPA = this.getWithExpiry(utils.getPathname());
// this is not defined!!!!!
},
storeParamsInLocalStorage: function() {
if(utils.hasCPA()) {
this.setWithExpiry();
}
this.getWithExpiry(utils.getPathname());
}
};
this.base.storeParamsInLocalStorage();
return {
hasCurrentCPA: base.compareUtmSourceFromLocalStorage,
}
}
var instance;
var _static = {
name: "ProcessingUTM",
getInstance: function() {
if (instance === undefined) {
instance = new Singleton();
}
return instance;
},
};
return _static;
})();
var processUtm = SingletonProcessUtm.getInstance();
V
processUtm.hasCurrentCPA('string')
нет контекста функции Singleton?d
0
V
alert(message?: any): void;
V
0
d