Showing 2 of 2 total issues
Function handleItem
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleItem(item, options) {
options = options || {};
var pathAttr = options.pathAttribute || 'data-path';
var hostAttr = options.hostAttribute || 'data-host';
var host = item.getAttribute(hostAttr) || options.host;
Function init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function init(host, options) {
options = options || {};
var className = options.className || '.lazy-image';
var onlyInViewPort = !!options.onlyInViewPort;
var items = [].slice.call(document.querySelectorAll(className));