Nachtwächter: Bilder vorladen – wird nicht in der Netzwerkanalyse angezeigt

Beitrag lesen

route.count(),

route.length natürlich.

Flache Version für node:

var route = [{
        greeterImages: [
                'temp-bilder/ddorf.jpg'
        ]
},{
        greeterImages: [
                'temp-bilder/capetown.jpg'
        ]
},{
        greeterImages: [
                'temp-bilder/stellenbosch.jpg'
        ]
}];

function Image() {
        src='';
}

function foo() {
    for(i=0; i < route.length; i++) {
        var src = route[i].greeterImages[0];
        console.log(typeof(route[i].greeterImages[0]));
        route[i].greeterImages[0] = new Image();
        console.log(typeof(route[i].greeterImages[0]));
        route[i].greeterImages[0].src = src;
        console.log(route[i].greeterImages[0].src);
     }
};

foo();