Closed (fixed)
Project:
Flag
Version:
8.x-4.x-dev
Component:
Flag core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2018 at 17:10 UTC
Updated:
16 Mar 2018 at 04:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
martin107 commentedJust making notes to gauge the urgency of fixing this
https://www.w3counter.com/globalstats.php
Suggests IE11 has 3.16% global usage.
In my experience w3counter has a bias, other global stats produce different results, but all within a margin
suggesting IE11 is on its way out.
Drupal8 at time of writing supports IE11!
https://www.drupal.org/docs/8/system-requirements/browser-requirements
Comment #3
martin107 commentedComment #4
martin107 commentedAs reported by Matroskeen, here
https://www.drupal.org/project/flag/issues/2764709#comment-12502502
Syntax error is in this line:
attach: context => {
and in this construction: =>
Please see https://stackoverflow.com/a/24900924/6314031.
Comment #5
martin107 commentedlooking at the error message in #4 and in core for the standard way to "attach" in es6 code... I see I was doing it wrong...
./core/modules/editor/js/editor.es6.js
I note that flag-admin.js follows the old way of doing it ... but uses strict mode.
I am not a IE11 user so I hope this fixes the problem?
Comment #6
matroskeenNow IE expects ":" in this line:
attach(context) {Could we use default
Drupal.behaviorsdefinition there? https://www.drupal.org/docs/8/api/javascript-api/javascript-api-overviewAlso, seems that we have to have a fallback for IE11 if we would like to use ECMAScript2016 specific code. It's a little sad, but we have to support this browser until the official "end of life".
Comment #7
martin107 commentedtranspiling is supposed to remove all these incompatibilities. --- presets can describe which browsers we target.
... here is a code snippet.
BUT in this module the js is only a small part of the project... so overall I think we gain most advantage by keeping in lock step with D8 core.... in that vein we inherit all the inconsistencies of the larger project. I will look at this further tonight.
Comment #8
martin107 commentedThere are several takes on the fix for this... all roads lead back to "I was an idiot"
Doh -- Drupal8 core does have build targets... it builds for "ie >= 9"
Doh -- The fix - We should be in lock step with core.
Doh -- now we implement "transform-es2015-arrow-functions"
So the fix: put package.json in lock step with core and retranspile.
[Me: hang head in shame and eats donuts ]
Comment #9
socketwench commentedYeah, I still can't compile this. At this point I'm going to assume it's me because even after an hour of research, I *still* can't figure out how to set this up or what steps to do.
Comment #10
matroskeenLooks like the original issue is fixed with the last patch.
But I have another one when clicking on "Flag" ajax-link. Please see attached screenshot. The message is "Object doesn't support property or method 'values'". (Can be reproduced in IE11 only)
Probably, this issue is not related to flag module as I couldn't find any mentions of "values" in the js code.
I'm going to dive into this issue but maybe someone could help!
Comment #11
martin107 commentedRegarding #9
While I have never met socketwench, I have seen the way she forms arguments in the issue queue, and have seen her contribution to the module.... in short that is a major failure on my part. I am spinning off an issue "write a welcoming developer guide for coders with far less experience"
It may also be my fault in another way ... so I am going to iron out a quirk which potentially stops others from building the javascript. Following on my "we should keep in lock step with core" track ... I note that core does not commit package-lock.json... it will be automatically populated as part of the "install the programs for transpiling" of any good guide.
@Matroskeen .. I will have a look at #10 tonight.
Comment #12
matroskeen@martin107,
Never mind, I had this one #2948623: Object.values() function is not supported on older browsers.
I think we can mark this issue as fixed.
Comment #13
martin107 commentedI have just reread #11 I meant only to imply that socketwench has loads of experience and I want to provide a on ramp for all developers ... that did not jump of the page due to my clumsy word salad... sorry
Comment #14
socketwench commentedNo worries. ^_^
I think I figured it out:
The problem seems to be that there was a lot of garbage from me flailing about. There were three separate permission issues and a symlink I had forgotten about. Once I took a look at it tonight it started to click.
Comment #16
socketwench commentedThanks everyone!