Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($parse): fix parse errors on older Android WebViews which choke with reserved keywords #11455

Conversation

gabrielmaldi
Copy link
Contributor

Older Android WebViews (2.3) can't handle calling methods named after reserved keywords such as .if(), .return(), .default(), .catch(), .finally().

@lgalfaso
Copy link
Contributor

Hi, are you talking about WebView 2.3 (this would be a version I am not aware of), or Android 2.3?

@gabrielmaldi
Copy link
Contributor Author

Hi, are you talking about WebView 2.3 (this would be a version I am not aware of), or Android 2.3?

I mean the WebView on Android 2.3, which is the same as the Android Stock Browser.

This is quite common behavior on legacy Android and very similar issues have already been fixed, e.g. #11051

@lgalfaso
Copy link
Contributor

@petebacondarwin do we officially support Android 2.3?

Note: This does not mean that this will/will not be merged, and it is just to know what the expectations will be

@petebacondarwin
Copy link
Contributor

@lgalfaso at the moment we do not automatically test Angular 1 on any mobile devices. The most recent release of Android 2.3 was in 2011. I am not sure what our support is on this. Let's discuss it at the next team meeting. It would be helpful if anyone could point us in the direction of some usage statistics for Android versions...

@gabrielmaldi
Copy link
Contributor Author

According to official Google Play data Android 2.3 still holds ~7%. And by my own experience, that number dramatically increases in emerging markets (I have apps published with over 20% installs on 2.3 devices).

Believe me, I'd love to drop support for Android 2.3 in all my apps, it's a huge pain because it's really crappy and forces you to write workarounds for almost everything (e.g. doesn't support overflow: scroll;!). But I don't see myself being able to do this anytime soon because of market share.

My two cents: supporting surely means a lot more for the Angular team than just "having Angular be parsed correctly" 😆 so perhaps you come to the conclusion to not officially support it like with IE8, but some small changes like the one on this PR can go a long way and not be a hassle to maintain.

Thanks guys!

@lgalfaso lgalfaso closed this in 10ae33b Apr 1, 2015
@lgalfaso
Copy link
Contributor

lgalfaso commented Apr 1, 2015

Given that all of these are private methods, I just renamed them to return_ and if_, and landed this as c55a494

@gabrielmaldi
Copy link
Contributor Author

Great, thanks!

For posterity, I think you copied the wrong SHA: 10ae33b

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

Successfully merging this pull request may close these issues.

5 participants