adding people from es-discuss@mozilla.org into the loop, to give us insight on the state of es6-module adoption.
kai zhu kaizhu...@gmail.com > On 26 May 2018, at 3:52 AM, Jimmy Hastings <jhasti...@chromium.org> wrote: > > (Changing subject per dpapad's suggestion) > > Does anyone have an iOS device they can test on? This seems like a knowable > problem, even though none of the compatibility tables I found list Chrome on > iOS. > > Should it be found not to work, any objection to saying it's allowed in > desktop-only code? > > On Fri, May 25, 2018 at 9:49 AM PhistucK <phist...@gmail.com > <mailto:phist...@gmail.com>> wrote: > Unfortunately, even WKWebKit does not fully support everything that Safari > supports (well, this is plaguing Android Web View as well), so always make > sure it works in WKWebKit, even if it works in Safari. > > ☆PhistucK > > > On Fri, May 25, 2018 at 7:44 PM Sylvain Defresne <sdefre...@chromium.org > <mailto:sdefre...@chromium.org>> wrote: > Chrome on iOS uses WKWebView to render html/javascript, not v8. So basically > if uses what Safari does support on iOS, not what v8 supports. > -- Sylvain > > On Fri, May 25, 2018 at 6:36 PM <jhasti...@chromium.org > <mailto:jhasti...@chromium.org>> wrote: > Style guide deviation: It seems like an acceptable deviation because we don't > have to deal with cross-browser compatibility, so only we only need to worry > about Chrome's semantics, which have been implemented for 7 versions now. > Furthermore, Closure library is basically a built-in with normal google code, > so there's no reason for it there. > Related toolchain: I'm not super familiar with all the tools, so I don't know > if it breaks any related toolchains. I know that It compiles and runs fine > in the way I did it, and it works with es style presubmits with the .eslintrc. > Platforms: It's a feature of the browser and v8, not the OS? I'm not sure > why it wouldn't be supported on iOS. I might be missing something. > > On Friday, May 25, 2018 at 1:35:19 AM UTC-7, Mike Frysinger wrote: > https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md#JavaScript > > <https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md#JavaScript> > > Style > > See the Google JavaScript Style Guide. > > a proposal to deviate from the agreed upon style guide should clearly explain > why the deviation is acceptable. > -mike > > On Fri, May 25, 2018 at 4:29 PM Michael Giuffrida <michae...@chromium.org > <mailto:michae...@chromium.org>> wrote: > I'm not too concerned with the Google style guide's take on ES6 modules > because Google practically treats the Closure library like a built-in, so > they don't need modules due to universal goog.module and goog.require > statements. > > On Fri, May 25, 2018 at 1:21 AM Mike Frysinger <vap...@chromium.org > <mailto:vap...@chromium.org>> wrote: > https://google.github.io/styleguide/jsguide.html#file-es6-modules > <https://google.github.io/styleguide/jsguide.html#file-es6-modules> > -mike > > On Fri, May 25, 2018 at 8:57 AM dpapad <dpa...@chromium.org > <mailto:dpa...@chromium.org>> wrote: > The title of this thread is probably a bit too generic. See previous ES6 > styleguide proposal threads as examples for template literals > <https://groups.google.com/a/chromium.org/d/msg/chromium-dev/6YWOu7XmLec/XNpU3f0PBwAJ>, > arrow functions > <https://groups.google.com/a/chromium.org/d/msg/chromium-dev/iJrC4PVSfoU/nAhsH8mGDAAJ>, > new static methods > <https://groups.google.com/a/chromium.org/d/msg/chromium-dev/d_2zUYQZJTg/-_PSji_OAQAJ>, > default parameters > <https://groups.google.com/a/chromium.org/d/msg/chromium-dev/pVHN8r-Z9cU/KyXn6SjiBgAJ>. > The main issues to figure out when proposing a new ES6 feature are > Does any part of our related toolchain > <https://cs.chromium.org/chromium/src/third_party/node/package.json> breaks > as a result of it (for example closure compiler, uglify, crisper, > polymer-bundler, eslint, clang-format, PRESUBMIT checks > <https://cs.chromium.org/chromium/src/tools/web_dev_style/?q=web_dev_style+-file:third_party+-file:infra+-file:out/Debug&ct=rc&cd=1&dr>)? > Which platforms that Chromium runs support that feature (does iOS for example > support it)? If not there needs to be a note in the styleguide (sometimes > even a PRESUBMIT check), to prevent such usage. > Overall, I think using ES6 modules is positive, so personally I support it, > but we need to figure out whether anything breaks by doing so. > > Hope this helps, > Thank you, > Demetrios > > On Thursday, May 24, 2018 at 5:22:49 PM UTC-7, Jimmy Hastings wrote: > https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/es6_chromium.md#modules > > <https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/es6_chromium.md#modules> > > They've been supported in Chrome since M61. Seems like an elegant way to > organize code if you're in an environment where you can make it work (Not > having non-module code that needs to depend on you). I made it work for a > self-contained component extension. A module author would need to add > "parserOptions": { > "sourceType": "module", > }, > to an .eslintrc to make the presubmits happy. js2g tests can be shoehorned > to work with it by having it import an html file that contains something like > <script type="module"> > import * as devtools from './devtools.js'; > window.devtools = devtools; > </script> > That seems like the least work infrastructure-wise, but if desired it could > be made more elegant. > > Discuss! > > -Jimmy > > -- > -- > Chromium Developers mailing list: chromium-...@chromium.org > <mailto:chromium-...@chromium.org> > View archives, change email options, or unsubscribe: > http://groups.google.com/a/chromium.org/group/chromium-dev > <http://groups.google.com/a/chromium.org/group/chromium-dev> > --- > You received this message because you are subscribed to the Google Groups > "Chromium-dev" group. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/d30ac84f-62e9-4450-810b-aed64516609d%40chromium.org > > <https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/d30ac84f-62e9-4450-810b-aed64516609d%40chromium.org?utm_medium=email&utm_source=footer>. > > -- > -- > Chromium Developers mailing list: chromium-...@chromium.org > <mailto:chromium-...@chromium.org> > View archives, change email options, or unsubscribe: > http://groups.google.com/a/chromium.org/group/chromium-dev > <http://groups.google.com/a/chromium.org/group/chromium-dev> > --- > You received this message because you are subscribed to the Google Groups > "Chromium-dev" group. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/faf84f7b-ba11-4959-aebe-7b2d3c4ca668%40chromium.org > > <https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/faf84f7b-ba11-4959-aebe-7b2d3c4ca668%40chromium.org?utm_medium=email&utm_source=footer>. > > -- > -- > Chromium Developers mailing list: chromium-...@chromium.org > <mailto:chromium-...@chromium.org> > View archives, change email options, or unsubscribe: > http://groups.google.com/a/chromium.org/group/chromium-dev > <http://groups.google.com/a/chromium.org/group/chromium-dev> > --- > You received this message because you are subscribed to the Google Groups > "Chromium-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to chromium-dev+unsubscr...@chromium.org > <mailto:chromium-dev+unsubscr...@chromium.org>. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEhBV%3Duhyz%3DmZ1-QOzFRn6AVZCDgK2zSwvUUT-qCW-5-XQ9xiA%40mail.gmail.com > > <https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEhBV%3Duhyz%3DmZ1-QOzFRn6AVZCDgK2zSwvUUT-qCW-5-XQ9xiA%40mail.gmail.com?utm_medium=email&utm_source=footer>. > > -- > -- > Chromium Developers mailing list: chromium-...@chromium.org > View archives, change email options, or unsubscribe: > http://groups.google.com/a/chromium.org/group/chromium-dev > <http://groups.google.com/a/chromium.org/group/chromium-dev> > --- > You received this message because you are subscribed to the Google Groups > "Chromium-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to chromium-dev+unsubscr...@chromium.org > <mailto:chromium-dev+unsubscr...@chromium.org>. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALzLt2WBzQumd%2Bpy51Bx%3DUiALE%2B3_Z_GBejLVJg_t4TA%2BTqu2g%40mail.gmail.com > > <https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALzLt2WBzQumd%2Bpy51Bx%3DUiALE%2B3_Z_GBejLVJg_t4TA%2BTqu2g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss