Chocolat
Chocolat copied to clipboard
Added support for srcset and sizes attributes
<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.
@nicolas-t
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 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?)
Hi, I can take a look next week
@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 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