sanity-io / block-content-to-html

Deprecated in favor of @portabletext/to-html
MIT License
20 stars 2 forks source link

Unable to add srcset attribute to <source> tags when invoking hyperscript #10

Open myisaak opened 2 years ago

myisaak commented 2 years ago

There is a bug when one tries the following code:

h('source', { media: "(max-width:375px)", srcset: "https://host/image.webp" });

The result lacks the srcset property. See below:

<source media="(max-width:375px)"></source>

Normally one expects all properties to show, as described below:

<source media="(max-width:375px)" srcset="https://host/image.webp"></source>