Skip to content

Instantly share code, notes, and snippets.

Avatar
💭

Patrick Bauer rriixx

💭
View GitHub Profile
View lazy-loading-feature.ts
export default class LazyLoadingFeature {
supported = false
detect () {
if (typeof HTMLImageElement === 'undefined') return
this.supported = HTMLImageElement && 'loading' in HTMLImageElement.prototype
}
polyfill () {