-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
string.format() doesn't work under IE 11 #148
Comments
Note to self: see core-js implementation https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/string-repeat.js#L12 |
Filed alexei/sprintf.js#182 |
But why? |
I've worked in environments before where the rule is never modify the global JS environment. I want fengari to be allowed in such environments. Every modification you make is potentially conflicting with some other piece of JS running on a site. The easiest solution is to just opt out. |
Probably, this issue should be migrated from fengari to fengari-web, because it affects only fengari running inside browser. |
The bug hasn't been solved in three months. |
I've been hoping that alexei/sprintf.js#183 will get merged. |
I haven't had the time to implement out own |
Would it be fine just to fork + vendor sprintf.js with your fix? |
I guess. But there is plenty of code in there we don't use. And the verification code in lstrlib.js sort of duplicates some of the work anyway. |
You pollute users namespace. It's considered a bad practice. It's much easier to point users that it's not working on this and that browser and offer a link to a polyfill - if user wants then can include polyfil from separate repo - but then it's extra request or extra job to bake it into users code. There is a way to create a copy of |
Fengari is said to be "Verified to work in Microsoft IE 11".
But unfortunately an error is raised under IE 11:
It seems that the
sprintf.js
which implementsstring.format
is not IE11-compatible.The problem is in the single line of code:
Unfortunately,
repeat
is not implemented on all IE, including IE11BTW
.repeat
occurs also inlstrlib.js
.Support of IE11 actually means support of Windows 7 users.
There are a lot of them nowadays.
All what is needed for happiness is to implement
String.prototype.repeat
manually in Fengari.The text was updated successfully, but these errors were encountered: