preact-render-to-string icon indicating copy to clipboard operation
preact-render-to-string copied to clipboard

srcSet not converted to srcset

Open SimenB opened this issue 8 years ago • 3 comments

This works correctly in preact proper

SimenB avatar Dec 08 '16 15:12 SimenB

Good catch! Open to a PR, or I can do it whenever I get a chance. I'd like to add an ATTR_MAP mapping like:

const ATTR_MAP = {
  'srcSet': 'srcset'
};

Perhaps the keys on the left could be lowercase and we'd compare the lowercase'd JSX attribute names.

developit avatar Dec 09 '16 01:12 developit

Can't we do toLowerCase on everything that's passed onto DOM nodes?

SimenB avatar Dec 09 '16 07:12 SimenB

nah, SVG attributes are case-sensitive (viewBox). Though maybe it's easier to special-case that instead.

developit avatar Dec 09 '16 18:12 developit