Skip to content

Don't choke if accessing evt props trigger exceptions ... #857

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

Merged
merged 2 commits into from
Feb 17, 2017

Conversation

benvinegar
Copy link
Contributor

@benvinegar benvinegar changed the title Don't choke if accessing evt properties throw exceptions ... Don't choke if accessing evt props trigger exceptions ... Feb 15, 2017
);

function kaboom() { throw new Error('lol'); };
Object.defineProperty(evt, 'type', { get: kaboom });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately in Phantom (and Phantom 2) just calling Object.defineProperty on this MouseEvent instance triggers an error. I've tried __defineGetter__ as well – no luck.

Copy link
Contributor

@LewisJEllis LewisJEllis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants