revert for-of loops, that they work well with Windows Phone 10



3 years ago
2 years ago


(Reporter: andre.fiedler, Unassigned)





3 years ago
refering to /l20n.js-3.3.3/dist/compat/web/l20n.js

This translated line will not iterate on Windows Phone 10 devices (running inside "WebView"):

> for (var _iterator3 = metas, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {

This is why it fails:

> var metas = head.querySelectorAll('meta[name="availableLanguages"],' + 'meta[name="defaultLanguage"],' + 'meta[name="appVersion"]');
> console.log(metas);
> // {"0":{},"1":{}}
> console.log(Array.isArray(metas));
> // false

This works so far:

> for (var i = 0; i < metas.length; i++) {
>   console.log(metas[i].getAttribute('name'));
> }
> // defaultLanguage
> // availableLanguages

So the solution by now seems to require a re-write to "classic" for loops.

Comment 1

3 years ago
The "translated" code line above comes from this file line #16:
Is Windows Phone 10 on IE11 or Edge?

Comment 3

3 years ago
Let me explain a bit first ... ;)

Our firm currently is developing using the .NET framework version 4.5. That's because Windows Phone 10 is not yet released and 95% of our users is running Windows Phone 8.1. WP10 will be released in December (I think) for a limited batch of devices first. Let's see how fast it will catch up next year.
So by now we are stuck using the XAML "WebView" that comes with .NET 4.5 ... even if our app is running on Windows Phone 10 ... and that one states it is "IE Mobile 11" (what ever that means).
I think many other firms supporting WP will be also still using .NET 4.5. It takes some more time before we drop WP8.1 support (sadly). We dropped WP7 support just some months ago.

Is there any page that I can run in my Windows Phone "WebView" test app, that shows ES6 API support?

Just found this page, that does not mention IE Mobile 11:

Comment 4

3 years ago
Btw., the real Browser in WP10 states it is "Edge 12" (don't know if it has all the Edge 12 features - could not imagine it ;) ).
But the "WebView" depends on the .NET framework version the app was written in.

Comment 5

2 years ago
We documented the browser compat story for our current code version on I hope that works for you, not sure.
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.