« first day (1989 days earlier)      last day (2128 days later) » 

 
4 hours later…
04:23
test = {
store: {
actions:{},
getters: {},
state: {}
},
init: function(){
console.log(this);
},
registerGetter:function(name, object){
this.store.getters[name] = object;
},
registerAction: function(name, object){
this.store.actions[name] = object;
}
}
test.registerGetter('test', function(){
console.log(this)
});
test.init();

why does the test function passed in via registerGetter reference the window object and not the test object
1 message moved from JavaScript
test = {
store: {
actions:{},
getters: {},
state: {}
},
init: function(){
console.log(this);
},
registerGetter:function(name, object){
this.store.getters[name] = object;
},
registerAction: function(name, object){
this.store.actions[name] = object;
}
}
test.registerGetter('test', function(){
console.log(this)
});
test.init();

My question is, why is the test function via registerGetter referencing the window object and not the internal object
1 message moved from JavaScript
 
3 hours later…
 
2 hours later…
09:04
posted on June 05, 2018

posted on June 12, 2018

posted on June 19, 2018

posted on June 19, 2018

posted on July 03, 2018

5 messages moved from Java
 
1 hour later…
10:14
@PremalKhetani aaje kai brand pidhi ?
mane lage 6 muga ne kevu padse, chelo darudiyo thai gayo 6 @PremalKhetani :D
eyyy hamna reva de j ho bhai potli vechva vada pakdai che
latha kand :D
IOS
IOS
brand nahi @ChiragHirpara potli k
 
2 hours later…
12:30
5 messages moved from Navu Professional Gujarati
 
2 hours later…
14:20
```
mounted() {
axios
.get(
"https://domain.com/query/getAllTopic" +
"?limit=20"
)
.then( (response) => {
this.info = response.data;
})
.catch( () => {
this.errored = true;
//console.log(error);
})
.finally( () => {
this.loading = false;
});
}
1 message moved from JavaScript
 
2 hours later…
16:26
Anyone know what i did wrong on this ?

$(document).ready(function PF(PCounter) {
if (PCounter === undefined) {
PCounter = 1;
};
$('#CN' + PCounter).show();
$('#EN' + PCounter).addClass("original");
});

It works when I write $('#CN' + PCounter).show(); in OnClick function in html, but when I use it like this it wont work.
1 message moved from JavaScript
Anyone know what i did wrong on this ?

    $(document).ready(function PF(PCounter) {
    if (PCounter === undefined) {
    PCounter = 1;
    };
    $('#CN' + PCounter).show();
    $('#EN' + PCounter).addClass("original");
    });

It works when I write $('#CN' + PCounter).show(); in OnClick function in html, but when I use it like this it wont work.
1 message moved from JavaScript
 
2 hours later…
 
1 hour later…
 
2 hours later…

« first day (1989 days earlier)      last day (2128 days later) »