Skip to content

Can support for the "data-src" attribute be added? #65

@jaywhj

Description

@jaywhj

Hi, I'm running into a problem where my html structure has data-src (no src), which results in the href tag <a href=""> not having a value and the image not loading when clicked, like this:

<img class="avatar" data-src="https://jaywhj.netlify.app/assets/avatar.png">

I set the src value of this img via JS.

data-src is a custom attribute that complies with the HTML5 specification for data sources.

My questions:

  1. Can image src set dynamically via JS be parsed and loaded? For example, instead of setting the src attribute value directly in html, it is set via JS
  2. If dynamic assignment by JS is not recognized, can support for "data-src" attribute be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions