Skip to content

Conversation

@sophiebits
Copy link
Collaborator

Fixes #5153.

This seems to work in all browsers I tested, including old Android and all IE > 8 which didn't work before.

Fixes facebook#5153.

This seems to work in all browsers I tested, including old Android and all IE > 8 which didn't work before.
@sophiebits
Copy link
Collaborator Author

@sebmarkbage

@jimfb
Copy link
Contributor

jimfb commented Oct 13, 2015

Looks reasonable to me.

sophiebits added a commit that referenced this pull request Oct 13, 2015
Use 'document.createEvent' not 'new Event'
@sophiebits sophiebits merged commit 194ab16 into facebook:master Oct 13, 2015
@sebmarkbage
Copy link
Contributor

The only reason I didn't use this to begin with is because of the scary deprecation notice on MDN.

Can you confirm you're not getting a deprecation warning?

Also add a feature test for createEvent just in case.

@sophiebits
Copy link
Collaborator Author

No deprecation warning in Firefox or Chrome.

createEvent is supported in everything since IE9 as far as I can tell. It was introduced in the same spec as dispatchEvent was. I can add a feature test if you really want one though?

@sebmarkbage
Copy link
Contributor

Yea. I'm concerned that they would want to deprecate initEvent but not Event and dispatchEvent since that's what the documentation says. Not that I think browsers would but at least if we're careful they can't blame us for it.

On Oct 13, 2015, at 12:01 PM, Ben Alpert [email protected] wrote:

No deprecation warning in Firefox or Chrome.

createEvent is supported in everything since IE9 as far as I can tell. It was introduced in the same spec as dispatchEvent was. I can add a feature test if you really want one though?


Reply to this email directly or view it on GitHub.

sophiebits added a commit to sophiebits/react that referenced this pull request Oct 13, 2015
@sophiebits
Copy link
Collaborator Author

#5166

sebmarkbage added a commit that referenced this pull request Oct 14, 2015
Add feature test for document.createEvent
This was referenced Oct 22, 2015
zpao pushed a commit to zpao/react that referenced this pull request Oct 28, 2015
Use 'document.createEvent' not 'new Event'
(cherry picked from commit 194ab16)
zpao pushed a commit to zpao/react that referenced this pull request Oct 28, 2015
Add feature test for document.createEvent
(cherry picked from commit da11356)
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.

4 participants