-
Notifications
You must be signed in to change notification settings - Fork 59
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
Remove webcomponent polyfill from tests and only run custom element tests on browsers with native support #258
Conversation
…be opted in on render
…ests on browsers with native support
Hey @Robert-Frampton, we still have several browsers failing here... maybe a side effect of the PR? This is the current support table for Custom Elements basic support:
Are you mentioning it because you think we shouldn't push this in? |
Yes I'm aware of the failing tests, and yes I mentioned it because I'm really unsure if this feature is worth pursuing. IMHO these are our options.
@jbalsas what do you think? |
Hey @Robert-Frampton, I have the feeling it is more useful that we might think... for instance, we have some users with a more restricted browser matrix (see Screens, or hybrid mobile) where just having this with Chrome Support would be the selling point to use metal.js as a base framework... If |
…lement tests on browsers with native support" This reverts commit 7539de4.
1250d9f
to
e4ca863
Compare
e4ca863
to
6bda0e0
Compare
6bda0e0
to
28b04ce
Compare
From #230
Hi everyone,
This pull request aims to bring Custom element support for Metal components.
A new "package" named metal-custom-element has been introduced for this feature.
The code has been tested on Chrome (58.0.3029.81), Firefox (53.0), but also IE11 (11.0.0) and Microsoft Edge (14.14393.0) with ievms and the karam-ievms-launcher.
Here are a few notes that I wanted to share:
Two new babel "plugins" have been introduced in order to "transpile" correctly
https://github.com/github/babel-plugin-transform-custom-element-classes
https://www.npmjs.com/package/babel-plugin-transform-es2015-classes
The webcomponentjs polyfills are being used for browsers that don't natively support the different Web component APIs, and you'll notice that this dependency is being directly downloaded from the GitHub repository. The latest version is not published on npm and we're not using bower. An issue has been opened to get more information on when this package will be available through npm.
At the moment, nothing has been done concerning the Custom element adoptedCallback method, mostly for simplicity and also because this callback is not supported by the polyfill (see: https://github.com/webcomponents/custom-elements#known-bugs-and-limitations)
Concerning the tests:
The polyfills used, are (or must be) doing something to HTMLElement (or Node) because they cause a test that was working to break
This is the specific test, and here are some of the error messages in different browsers
Firefox: Firefox 53.0.0 (Mac OS X 10.12.0) dom manipulation should append node list to parent element FAILED
Argument 1 of Node.appendChild does not implement interface Node.
Edge: Edge 14.14393.0 (Windows 10 0.0.0) dom manipulation should append node list to parent element FAILED
Error: No such interface supported
IE11: IE 11.0.0 (Windows 7 0.0.0) dom manipulation should append node list to parent element FAILED
HierarchyRequestError
Concerning IE10:
I have not been able to run the tests in IE10 despite multiple attempts. The "browserified" bundle loaded by Karma, launches an error in IE10, concerning Object.setPrototypeOf.
The polyfill used do no support IE10 either.
I am trying to find a way to "skip" the tests, as well as not loading the bundled polyfills for IE10 and lower, but have not yet found a way. - Any help is welcome
As usual your ideas and feedback concerning improvements are welcome.
Thanks!