https://github.com/verlok/lazyload-print-test
A cross-browser test for printing lazily loaded images
https://github.com/verlok/lazyload-print-test
Last synced: 3 months ago
JSON representation
A cross-browser test for printing lazily loaded images
- Host: GitHub
- URL: https://github.com/verlok/lazyload-print-test
- Owner: verlok
- Created: 2018-10-11T20:02:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T20:53:31.000Z (almost 7 years ago)
- Last Synced: 2025-01-24T18:22:52.554Z (9 months ago)
- Language: HTML
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lazyload Print Test
Have you ever been asked to make your lazily loaded images available for the print?
Here's how to do this!This demo implements a custom print button and it uses [vanilla-lazyload](https://github.com/verlok/lazyload), specifically:
- its `loadAll()` method to load all images in the page before printing
- its `callback_finished` option to pass in a callback which is called when all images finished loadingSo when you push the print button it starts loading all images and waits until all images have been loaded to open the print dialog.
If all images were already loaded before and you pus the print button, it just open the print dialog.