loading-attribute-eagle-polyfill 0.0.2 • Public • Published 4 years ago 🇺🇸 🦅 loading-attribute-eagle-polyfill
A polyfill for <img loading="eagle"] />
. Displays an America Eagle as the placeholder of the image while the your real images are still loading.
Usage
< script src = " https://unpkg.com/loading-attribute-eagle-polyfill/loading-attribute-eagle-polyfill.js " > < / script >
Include the polyfill in your <head>
, then you can add the loading="eagle"
attribute to any of your images.
< head >
< script src = " https://unpkg.com/loading-attribute-eagle-polyfill/loading-attribute-eagle-polyfill.js " > </ script >
</ head >
< body >
<! - H e r e ' s a n e x a m p l e U R L t h a t a r t i f i c i a l l y d e l a y s t h e s r c s o y o u c a n s e e t h e p r o u d E a g l e - >
< img
loading = " eagle "
src = " https://deelay.me/2000/https://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/article_thumbnails/other/cat_relaxing_on_patio_other/1800x1200_cat_relaxing_on_patio_other.jpg "
width = " 300 "
height = " 200 "
/>
</ body >
Browser Support
Yes.
Known Issues
While you don't have to be American to use this polyfill, it currently only supports one eagle: the Great American Bald Eagle. It's not yet clear if/how developers will be able to choose different eagles, or personalize it based on locales.
Readme Keywords none
Package Sidebar Install npm i loading-attribute-eagle-polyfill
Downloads Weekly Downloads