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

XML: Refactor of feature detecting logic, resolves #1435 #1440

Merged
merged 1 commit into from
Dec 2, 2013

Conversation

ezequiel
Copy link
Contributor

This fixes #1435.

Because of better feature detection, IE 9, 10, and 11 now use DOMParser whenever possible, rather than relying on ActiveXObject first.


Before, Y.XML.parse relied on the browser throwing a ReferenceError when ActiveXObject did not exist. If, and only if that error was thrown, it would then fall back to DOMParser.

IE 11 has now set ActiveXObject to undefined. So,

// normally throws a `ReferenceError` if the variable doesn't exist, but *doesn't* in IE 11.
ActiveXObject; // undefined;

typeof ActiveXObject; // undefined

"ActiveXObject" in window; // true

@ezequiel
Copy link
Contributor Author

They both do exactly the same thing. As Y.Lang.isNull did not provide any benefits, I removed all traces of it.

@ezequiel ezequiel merged commit 680a9e8 into yui:dev-master Dec 2, 2013
@ezequiel ezequiel deleted the xml-fix branch January 8, 2014 23:39
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