-
Notifications
You must be signed in to change notification settings - Fork 352
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
Horizon client runs in Microsoft Internet Explorer(version 10) is failed #566
Comments
what browser version are you using? On Mon, Jun 6, 2016, 07:32 tangshiping notifications@github.com wrote:
|
Ah, sorry I missed the title! Will have to check this out |
I used VHiZR to test in Microsoft Internet Explorer 10. The following functions are passed:
But operations like insert, remove, update are all failed. The error is located in this line:
SCRIPT438: 对象不支持“assign”属性或方法。I googled "Object.assign" and found this method is not supported in MS IE 10. I was wondering if there are other ways to do the same thing? |
Trying this out now... |
There are some discussions on stackoverflow about the Object.assign. They also give the solution to use this method in browsers like MS IE 10: polyfill. I check out the source code of horizon client. And I find this file: index-polyfill.js. It seems that polyfill has been used in the client, but actually it has no effect in IE 10. |
I ran the Horizon client tests with IE 10 and got two different errors: ◾"before each" hook for "sets a token and retrieves it back" ‣
ReferenceError: 'Map' is undefined
at FakeStorage (test.js:47262:6)
at Anonymous function (test.js:47136:8)
at callFn (test.js:4728:6)
at run (test.js:4721:8)
at next (test.js:5063:6)
at Anonymous function (test.js:5085:6)
at timeslice (test.js:12852:6) and
|
I made a mistake that the version of IE is 11, not 10. I tested horizon in a web app written by myself. This time when I retrieve a document, it stopped at this statement:
This statement is defined in this block:
It comes from the horizon client code. This is my code:
|
Any progress on this? I get the same error on IE 11.
Edit: I have found a workaround: Install core-js for a polyfill
In your entry js file on top, add the following line:
But I think we shouldn't need a polyfill to support Internet Explorer 11. We should add the polyfill in the horizon client. |
The client tests are working in Microsoft Edge btw. |
Object.assign is polyfillable. Add it to the consuming project and you should be good to go. |
@duncanfinney How? |
Install const objectAssign = require('object-assign');
Object.assign = objectAssign; in your Of course, better if horizon client lib would use babel's |
Another solution that maybe more elegant is using polyfill.io's browser's include at the top of your main html file..
The advantage is that the above will only Polyfill what's needed (i.e. missing) from the browser the user is running.. so if it has support then no extra code, etc. Just an idea.. got this from @wesbos and his new (quite nice) course on ES6 .. |
Using the F12 developer tool to watch the error logs, I saw some error messages printed in console like "Object.assign can't be supported"
Is there anyone see the same error?
The text was updated successfully, but these errors were encountered: