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

Removing IE9 and IE10 support #368

Merged
merged 7 commits into from
Apr 11, 2018
Merged

Conversation

diegonvs
Copy link
Contributor

No description provided.

@diegonvs diegonvs changed the title Removing IE9 and IE10 support from saucelabs WIP: Removing IE9 and IE10 support Mar 26, 2018
@jbalsas
Copy link
Contributor

jbalsas commented Mar 26, 2018

Great, @diegonvs!

We also need to go through code removals like https://github.com/metal/metal.js/blob/master/packages/metal-dom/src/domNamed.js#L413-L453

If it is supported in IE11 and the rest of our support matrix, then we can get rid of some of those fallbacks (in case there are more)

@diegonvs diegonvs force-pushed the remove-ie9-10-support branch 2 times, most recently from cf0ab19 to bf397ee Compare March 27, 2018 14:21
* @return {boolean}
*/
export function contains(element1, element2) {
if (isDocument(element1)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @diegonvs, this is actually a breaking change we shouldn't do. It offers a different API (not that it is super helpful...).

Just remove the if clause and keep only the return element1.contains(element2) code.

We could also deprecate it as well, so we get rid of it in a next major release, adding the message:

@deprecated Use element1.contains(element2) directly instead of this method

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @jbalsas, It would be valid to start issuing warn messages talking about deprecated. When the developer is using this feature. I think will be much more aware when you see this on the console when are developing your applications.

Something like proposed in #364.

@@ -854,7 +839,7 @@ function toggleClassesWithoutNative_(element, classes) {
*/
function triggerElementListeners_(element, event, defaultFns) {
const lastContainer = event[LAST_CONTAINER];
if (!isDef(lastContainer) || !contains(lastContainer, element)) {
if (!isDef(lastContainer) || !lastContainer.contains(element)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be fine, as I said above, just keep the method and deprecate it, and remove all of our existing usages like this 👍

@@ -56,22 +55,6 @@ class features {
}
return `${type}end`;
}

/**
* Some browsers (like IE9) change the order of element attributes, when html
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment says IE9, but we should check in the real browsers to see which ones actually do this.

@diegonvs diegonvs force-pushed the remove-ie9-10-support branch from bf397ee to 2ce01ff Compare March 27, 2018 20:14
@diegonvs diegonvs force-pushed the remove-ie9-10-support branch 2 times, most recently from fa6bfd0 to 6970b85 Compare March 28, 2018 16:25
@diegonvs diegonvs force-pushed the remove-ie9-10-support branch from 6970b85 to 5b729e7 Compare March 28, 2018 16:25
@diegonvs diegonvs changed the title WIP: Removing IE9 and IE10 support Removing IE9 and IE10 support Mar 28, 2018
@@ -209,15 +209,11 @@ export function buildFragment(htmlString) {
* Checks if the first element contains the second one.
* @param {!Element} element1
* @param {!Element} element2
* @deprecated Use element1.contains(element2) directly instead of this method
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this on top of the other @param lines? 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! :)

@jbalsas
Copy link
Contributor

jbalsas commented Apr 9, 2018

Hey @diegonvs, I just added a small comment and also, I think we should keep the nextTick polyfill as it is, just because it's not our code. Could you undo that?

Would this be all of the polyfills/special code for IE9-IE10 we can get rid of?

@diegonvs diegonvs force-pushed the remove-ie9-10-support branch from 3ebad15 to e10fe28 Compare April 9, 2018 19:29
@diegonvs
Copy link
Contributor Author

diegonvs commented Apr 9, 2018

Hey @jbalsas, i've undo deletion of polyfills for async right now.

These changes I made were the only ones I thought we could remove without compromising support for IE11, probably with the withdrawal of IE11 support in the future we will make big changes and remove many polyfills.

@diegonvs
Copy link
Contributor Author

diegonvs commented Apr 9, 2018

@jbalsas, I can add in each JSDOC an annotation that represents that this function is being used as polyfill for IE11, what do you think?

@jbalsas jbalsas changed the base branch from master to develop April 11, 2018 07:32
@jbalsas jbalsas merged commit 42c98c1 into metal:develop Apr 11, 2018
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.

3 participants