Skip to content

Commit

Permalink
take attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
nichoth committed Jun 13, 2024
1 parent a0e2c1a commit b5651eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export class ImageElement extends HTMLElement {

this.innerHTML = `<img
${this.srcset ? `srcset="${this.srcset}"` : ''}
content-visibility=auto
decoding="async"
content-visibility="${this.getAttribute('content-visibility') || 'auto'}"
decoding="${this.getAttribute('decoding') || 'async'}"
loading="${this.getAttribute('loading') || 'lazy'}"
class="image-element blurry"
style="background-size: cover; background-image: url('${this.placeholder}')"
Expand Down

0 comments on commit b5651eb

Please sign in to comment.