Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Update browser compat docs. #2583

Merged
merged 3 commits into from
May 9, 2018
Merged

Update browser compat docs. #2583

merged 3 commits into from
May 9, 2018

Conversation

arthurevans
Copy link

@arthurevans arthurevans commented May 7, 2018

Take 1, updating all this stuff.

Staged here: https://3-0-polyfills-dot-polymer-project.appspot.com/3.0/docs/browsers

Most of the volume here is in my stab at adding info on modules.

Already really good stuff in Dan's README for the polyfills, unsure of whether to pull some of that in here, or to just point to it.

Also, it's still really hard to tell what browser needs what.
I wonder if it'd be better to just have a table like:

Browser & version range | ES6/ES5 | ES Modules/AMD | Polyfills Req'd | Module name transform

Where we'd have multiple lines for a browser if the values were different.

(And yes, all browsers (currently) require the name=>path transform, but at least it makes it clear that some transform is always required.)

LMK what you think.

@arthurevans arthurevans requested review from dfreedm, kevinpschaaf and a user May 7, 2018 02:02

### Module specifiers

The browser only accepts on kind of module specifier in an `import` statement: a URL, which must
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on -> one


### Dynamic imports

Dynamic imports is a language feature that enables lazy-loading of resources, replacing the functionality
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Dynamic imports is a language feature"

is -> are? & if so, enables -> enable.

If not, maybe "Dynamic import() is a ..."

The latest versions of Chrome and Safari support dynamic imports. For other browsers, the Polymer build tools can transform
dynamic imports into AMD modules. The Polymer development server can do this transformation on the fly.

More on dyanmic import, see:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More -> For more

"dyanmic" -> "dynamic"

"import" -> "imports" or "import()"

compiled and uncompiled code in its cache, resulting in errors. To avoid this problem, run
`polymer serve` with the `--compile never` option when testing with device emulation.
{.alert .alert info}
While the Polymer library doesn't depend on any features from newer JavaScript standards,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence sounds weird :)

@@ -32,7 +28,7 @@ There are a couple of other related polyfill files that you may need:
on browsers that support native custom elements. This is useful in static serving environments
where you need to serve a single app version to all browsers. The adapter is discussed in more
detail in [ES6](es6) and in [Build for production](/{{{polymer_version_dir}}}/toolbox/build-for-production).
* `apply-shim.html`. A polyfill for CSS mixins. Unlike the other polyfills, it should be included
* `apply-shim.j`. A polyfill for CSS mixins. Unlike the other polyfills, it should be imported
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.j -> .js

for custom elements and shadow DOM. You can test Polymer 2.x by using the latest 1.0 version of
`webcomponentsjs`, which is included as a bower dependency to Polymer 2.x. (`webcomponentsjs`
Polymer 3.x has been developed alongside and tested with a new suite of v1-spec compatible polyfills
for custom elements and shadow DOM. You can test Polymer 3.x using the latest 2.0 version of
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we mention explicitly that the HTML Imports polyfill has been removed from v2.0 & there is no webcomponents-lite.js?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sounds good.

@ghost
Copy link

ghost commented May 7, 2018

i like the idea of a table showing exactly what polyfills & build transforms each browser requires, provided it wouldn't require too much maintenance for it to stay accurate.

@ghost ghost mentioned this pull request May 7, 2018
7 tasks
@ghost ghost added the 3.0 update label May 8, 2018
@abdonrd
Copy link
Contributor

abdonrd commented May 8, 2018

@katejeffreys if it works for you, I was thinking of doing something like that:

screen shot 2018-05-08 at 11 23 11

Right now it's not very nice haha

BTW, tomorrow Mozilla release Firefox 60 with ES Modules, so... One more green box! :)

@web-padawan
Copy link
Contributor

web-padawan commented May 8, 2018

BTW the relevant quote from Polymer/tools#191

Modules support now requires dynamic import and import.meta.
Specifically, this means:
Safari modules support is now from 11.1 instead of 10.1/10.3
Chrome modules support is now from 64 instead of 61.
Vivaldi supports modules (tested).

@arthurevans arthurevans merged commit b934155 into master May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants