robbestad / react-iframe

Simple solution for using iframes in React
ISC License
434 stars 79 forks source link

Support the lazy-loading `loading` attribute #50

Closed polarathene closed 5 years ago

polarathene commented 5 years ago

https://addyosmani.com/blog/lazy-loading/

The loading attribute can take the values auto,eager,lazy, browsers that support the attribute may implicitly default to auto to determine if they should use eager or lazy based on distance from viewport. The attribute communicates to the browser how important the image/iframe resource is to prioritize loading, potentially delaying it while it's not within a viewing distance from the current viewport.

robbestad commented 5 years ago

Ok, added! :)