Chocolat icon indicating copy to clipboard operation
Chocolat copied to clipboard

Added support for srcset and sizes attributes

Open dscafati opened this issue 8 years ago • 6 comments

<a data-srcset="..." data-sizes="..." href="...">

Also I'm having problems running the tests, chocolat.api().getElem('img').get(0) returns the image but chocolat.api().getElem('img').get(0).currentSrc returns undefined.

dscafati avatar Nov 03 '16 21:11 dscafati

@nicolas-t

dscafati avatar Jan 22 '18 01:01 dscafati

Thank you,

Is the bug chocolat.api().getElem('img').get(0).currentSrc returns undefined fixed ?

I mean it seemed more like a browser issue, is it working now ?

nicolas-t avatar Jan 22 '18 08:01 nicolas-t

@nicolas-t This would be an awesome enhancement in 2020 ;) Is there something that I can do to help on this PR? (Unsure what's left to do – testing the test?)

t-book avatar Jan 02 '20 18:01 t-book

Hi, I can take a look next week

dscafati avatar Jan 02 '20 18:01 dscafati

@dscafati & @t-book Thank you for your enthousiasm.

If you want to work on this feature I highly recommend you do it on the rollup branch which is the branch of the next version (v1, actually in beta) : https://github.com/nicolas-t/Chocolat/pull/96

Documentation is here : https://chocolat.gitbook.io/chocolat/

I'd gladly help you if you have any question.

nicolas-t avatar Jan 05 '20 17:01 nicolas-t

@nicolas-t I rebased this branch on top of the current master. I'm sending a second PR to the rollup branch, but maybe this one can be merged too. I see this is from 2016 and I haven't reviewed it since them. What I remember is that I wasn't able to test srcset attributes on selenium since it was headless and so didn't load any alternative image

dscafati avatar Jan 18 '20 19:01 dscafati