| Summary: | [IE] SCRIPT1028 error in IE9 | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Anton Kosyakov <anton> |
| Component: | Editor | Assignee: | Carolyn MacLeod <Carolyn_MacLeod> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Carolyn_MacLeod, libingw, Silenio_Quarti |
| Version: | 10.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: |
https://git.eclipse.org/r/59684 https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0f275e31561bb2fb5af373d04f62850220731e81 |
||
| Whiteboard: | |||
The spec says "An object is rendered as an opening left brace followed by zero or more properties, separated with commas, closed with a right brace.". I guess IE9 interpreted it literally, and was less forgiving. (In reply to Carolyn MacLeod from comment #1) > The spec says "An object is rendered as an opening left brace followed by > zero or more properties, separated with commas, closed with a right brace.". > I guess IE9 interpreted it literally, and was less forgiving. So removing a trailing comma will allow to use Orion with IE9, is not it? Could you do it? New Gerrit change created: https://git.eclipse.org/r/59684 Yep - done. Just needs a committer to review. (In reply to Carolyn MacLeod from comment #4) > Yep - done. Just needs a committer to review. Are you sure that you don't have other such places in the code? It was just an example. I looked for other similar cases (looked at the 32 other files that return module exports objects), and did not find any. If you trip over another case (because IE9 gives you another script error), please open a new bug. Thanks! Correction - I did a regular expression search (,\s}) and found one more place that had a trailing comma in an object. I added a fix for that. Hope I did the "ammend previous commit" correctly... (In reply to Carolyn MacLeod from comment #6) > I looked for other similar cases (looked at the 32 other files that return > module exports objects), and did not find any. > > If you trip over another case (because IE9 gives you another script error), > please open a new bug. Thanks! Which versions of IE Orion support reliably? Against which versions did you really test it? We need to use Orion in a customer project with IE9 - 11. (In reply to Carolyn MacLeod from comment #7) > Correction - I did a regular expression search (,\s}) and found one more > place that had a trailing comma in an object. I added a fix for that. Hope I > did the "ammend previous commit" correctly... There are a lot of other places with trailing commas in addition to fixed in the change. I played with different compatibility modes for IE9 and found out that in IE9-Standard mode trailing commas are allowed. To switch on this mode one should add <!DOCTYPE html> at the beginning of a document or <meta http-equiv="X-UA-Compatible" content="IE=edge">. Gerrit change https://git.eclipse.org/r/59684 was merged to [master]. Commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0f275e31561bb2fb5af373d04f62850220731e81 (In reply to Anton Kosyakov from comment #8) > Which versions of IE Orion support reliably? Against which versions did you > really test it? We need to use Orion in a customer project with IE9 - 11. I'm afraid we only support IE11. Just so you know, Microsoft announced end of life on 12 January 2016 for versions of IE prior to IE11. I removed trailing commas from object declarations because it was harmless and simple. I guess you've now found trailing commas in array declarations. I can fix those too, but as for anything else, we are no longer supporting IE9. To find out the browser versions that Orion supports, you can check the browserData minVersion in file org.eclipse.orion.client.ui/web/orion/browserCompatibility.js Anton, in case it's useful, here's a link to the official project plan for Orion 10.0, which lists the supported browsers. https://projects.eclipse.org/projects/ecd.orion/releases/10.0/plan (In reply to Anton Kosyakov from comment #10) > There are a lot of other places with trailing commas in addition to fixed in the change. I regex-searched for ,\s] and it only shows up in a test file. I don't want to change those, because they may be there intentionally for testing, and they are not affecting the product. So I was wrong - there really aren't any trailing commas in arrays. What are the "other places" that you mention? (In reply to Anton Kosyakov from comment #10) > I played with different compatibility modes for IE9 and found out that in > IE9-Standard mode trailing commas are allowed. To switch on this mode one > should add <!DOCTYPE html> at the beginning of a document or > <meta http-equiv="X-UA-Compatible" content="IE=edge">. Orion distributes a JS library for `built-codeEdit` but not an HTML page. So we have nowhere to put the meta tag even if we wanted to. The code that is embedding the component would have to do this. I am going to mark this bug as "fixed" because the original problem in comment 0 has been fixed (plus one more place in comment 7). If you have another specific place that causes an error, please open a new bug. (In reply to Carolyn MacLeod from comment #15) > (In reply to Anton Kosyakov from comment #10) > > I played with different compatibility modes for IE9 and found out that in > > IE9-Standard mode trailing commas are allowed. To switch on this mode one > > should add <!DOCTYPE html> at the beginning of a document or > > <meta http-equiv="X-UA-Compatible" content="IE=edge">. > > Orion distributes a JS library for `built-codeEdit` but not an HTML page. > So we have nowhere to put the meta tag even if we wanted to. > The code that is embedding the component would have to do this. > Sure the tag should be added to client html code. > I am going to mark this bug as "fixed" because the original problem in > comment 0 has been fixed (plus one more place in comment 7). If you have > another specific place that causes an error, please open a new bug. It is fine with me, with general lack of support for IE9 this bug does not make much sense. |
I am getting SCRIPT1028 error in IE9 in built-codeEdit-amd.js at 5560:2. It seems to happen because of unnecessary commas, e.g: return { handleKeyEvent: handleKeyEvent, CommandsProxy: CommandsProxy, // comma in this line };