Closed Sebiworld closed 7 years ago
Hi @thiamsantos , thanks for your feedback! I don't usually code in standardjs-codingstyle, but I hope the progressively.js-file fulfills this standard now.
Looks good to me! Great work @Sebiworld :tada:
Let's see what @thinker3197 think.
Thanks @thinker3197 !
I agree with you concerning the ambiguous return-value of loadImage
. But that was the first and simplest solution that came to my mind.
Otherwise, I could return an integer-value from some kind of global constants-array, or I could check elem.classList.contains('progressive--loaded-sm')
after loadImage
. What do you think?
Tadaaa! Now I check for presence of progressive--loaded-sm instead of working with boolean as return value. If it was up to me, I would merge it to progressively's master-branch 👍
Merging in master. Again, thanks for the pr @Sebiworld.
Hi thinker3197, I really appreciate your work on progressively. For a new project I developed those improvements to make progressively usable in more scopes of application.
Now you can add a medium-quality image with data-progressively-sm, which will be loaded on smaller screen-widths. If the screensize increases, the full-size will be loaded. Additionaly I've added support for css-background-images.
Look at the README.md for detailed information. I would be glad if you could accept my pull request.