zombie
zombie copied to clipboard
Event target dataset is undefined in Zombie
I've been testing a button click and the button had some data- attributes. In the JS code I was using
event.target.dataset
to obtain these but running this code in Zombie the dataset was undefined. I had to use the getAttribute function instead.
Zombie provides whatever features are available in JSDOM, so you'll want to get this added here: https://github.com/tmpvar/jsdom
Thank you for the reply, should I add it there or you'll take care?
It's your issue.
jsdom 11.2.0 came out and they now support this, but a lot of their API has changed. I've started a branch to integrate it into zombie, if anyone wants to help me out.
https://github.com/StefanoDeVuono/zombie/tree/801-event-target-dataset
I've updated mocha (which fails the "go forwards" test in history.js
--it has both await and done--mocha no longer likes this).
jsdom has changed substantially so I'm going through to integrate it into zombie.js using the tests as guidelines.
Any help would be appreciated!
Got it!
https://github.com/StefanoDeVuono/zombie/tree/801-event-target-dataset
edit: well, sort of. sorting out travisci errors for now.