loading-attribute-eagle-polyfill

0.0.2 • Public • Published

🇺🇸 🦅 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>
  <!Here'aexamplURthaartificialldelaythsrsyocasethprouEagl->
  <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

Weekly Downloads

4

Version

0.0.2

License

MIT

Unpacked Size

26.9 kB

Total Files

4

Last publish

Collaborators

  • jayphelps