Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ev.initTouchEvent is undefined #3

Open
givankin opened this issue May 4, 2017 · 2 comments
Open

ev.initTouchEvent is undefined #3

givankin opened this issue May 4, 2017 · 2 comments

Comments

@givankin
Copy link

givankin commented May 4, 2017

Hi, I wonder what version of PhantomJS did you use? When I try to use this in 2.1.1, everything works fine until initTouchEvent. Turns out that event.initTouchEvent is undefined.

@sveisvei
Copy link
Contributor

sveisvei commented May 4, 2017

This was in use prior to phantomjs 2 - I think it needs some modification to work with latest webkit in phantom. PR welcome :)

@givankin
Copy link
Author

givankin commented May 4, 2017

Unfortunately, couldn't find a way to make it work in 2.1.1. Without initTouchEvent it seems impossible to add touches to an event (and property touches is not writeable). What I ended up with is constructing a generic event (document.createEvent('Event')) and manually setting all the properties I expect in the touch event.

So, no PR, sorry, but perhaps this information might help someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants