MCPcopy
hub / github.com/aFarkas/lazysizes / run

Function run

tests/functional-tests-plugins.js:64–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 ['\ndata:,img2-100 100w, \ndata:,img2-500000 500000w, \ndata:,img2-50 50w', reinitTest]
63 ];
64 var run = function(){
65 if(test.length){
66 placeholderSrc = test.shift();
67 $image
68 .attr('data-srcset', placeholderSrc[0])
69 .attr('data-optimumx', '0.6')
70 ;
71
72
73 if(addClass){
74 $image.addClass('lazyload');
75 }
76 } else {
77 setTimeout(function(){
78 assert.ok(unveiled == 2);
79 done();
80 }, 130);
81 }
82 };
83
84
85 $image = $('<img data-sizes="auto" style="width: 90%;" data-optimumx="0.6" class="lazyload" />')

Callers 2

_optimumxReinitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected