new features about Number.prototype.toLocaleString() for IE11, a lot of related new definitions#67
Conversation
|
when will this be merged? should I wait for cleaning up work finished? |
|
Hi! I'm in the process of preparing version 3. I'd suggest holding off on any code cleanup until that's done. Once the new version is ready, I'll take care of this PR. |
|
how does this PR work with current build? |
|
can we merge this now? |
|
I've merged the parts with |
39a28a2 to
d37266a
Compare
|
seems remarks generation need a fix? |
Yes, I will take a look. |
|
Okay, the remarks should be fixed now. |
|
can this be combined now? |
fasttime
left a comment
There was a problem hiding this comment.
Sorry, this is a big PR and it may take some time for me to review all the changes. I've added some more comments.
|
anything else to do? |
|
seems generation of |
can I fix that? or should I leave it to you? |
fasttime
left a comment
There was a problem hiding this comment.
Thanks! The descriptions in Features.md should be fixed now. I also left some questions on the PR.
| checkLocaleNumeral('cs', NaN, /^.....č/) && | ||
| checkLocaleNumeral('el', Infinity, /^Άπε..ο/) && | ||
| checkLocaleNumeral('el', NaN, /^μη.αριθ.ός/) && | ||
| checkLocaleNumeral('he', NaN, /^ל/) && |
There was a problem hiding this comment.
Is there a reason why only the first letter is used in definitions?
There was a problem hiding this comment.
cuz only definition of the first letter practical in IE11 (there is no ITERATOR_HELPER in IE 11).
There was a problem hiding this comment.
Actually, it's okay to add definitions for feature combinations that aren't available in supported engines. Engines keep adding and removing features all the time, so some of those definitions may actually become useful at some point.
| checkLocaleNumeral('ja', Infinity, /^.∞/) && | ||
| checkLocaleNumeral('ja', NaN, /^.....非数値/) && | ||
| checkLocaleNumeral('lt', Infinity, /^.......ė/) && | ||
| checkLocaleNumeral('pl', Infinity, /^.............ś/) && |
There was a problem hiding this comment.
It seems that ń and ć could be also defined from this string.
There was a problem hiding this comment.
again, impractical in IE11.
| checkLocaleNumeral('zh', Infinity, /^正/) && | ||
| checkLocaleNumeral('zh-cn', NaN, /^..字/); |
There was a problem hiding this comment.
Similarly for 'zh' and zh-cn, maybe more characters could be defined?
There was a problem hiding this comment.
again, only definitions of "正" and "字" are practical. btw, "非" and "数" are overlapped with 'ja' case.
There was a problem hiding this comment.
Oh, true. I hadn't noticed that some characters already have a definition.
|
anyway, how can I test whether a definition work under arbitrary feature set (including ones impossible in major environment?) |
You need to use const JScrewIt = require('jscrewit');
require('./feature-emulation.helpers.js');
const definition = '([].at.constructor + [])[10]';
const features = ['AT', 'IE_SRC'];
const { replacement } = JScrewIt.debug.createEncoder(features).resolve(definition);
const value = emuEval(features, replacement);
console.log(value); // "F"This works also inside browsers if you use |
|
and, how can I filter overperformed definition automatically? can |
|
|
seems |
|
can |
|
I tried to add |
|
can this be merged now? |
Number.prototype.toLocaleString() for IE11 in win7 and 8, a lot of related new definitions (Final PR)Number.prototype.toLocaleString() for IE11, a lot of related new definitions
I've finally made all these local
InfinityandNaNstuff building normally. Is there anything else to do for us?