Closed Bug 1107662 Opened 9 years ago Closed 6 years ago

Make Polymer work with custom elements & shadow DOM

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: annevk, Unassigned)

References

Details

Gabor will provide the details for what needs figuring out.
I think the best would be to reach out for Polymer developers and work out some way to use native web components support for everything else except imports. Then we should see if it works or if not what feature is it relying on that differs from our version. I've been trying to make polymer to work with our web components, and I had some timing errors, but maybe it was something related to our imports implementation... The goal would be to not break polymer based web-content when web components in ff goes live, and for that this bug could serve as a meta-bug.
Depends on: 1109007
> I think the best would be to reach out for Polymer developers and work out some way to use native web components support for everything else except imports. 

Can you clarify on this point a little bit? I'm not really familiar with what Polymer is doing (apart from at a very high level) and how that relates to our imports implementation?
(In reply to Mike Taylor [:miketaylr] from comment #2)
> > I think the best would be to reach out for Polymer developers and work out some way to use native web components support for everything else except imports. 
> 
> Can you clarify on this point a little bit? I'm not really familiar with
> what Polymer is doing (apart from at a very high level) and how that relates
> to our imports implementation?

Polymer is doing a polyfill for web-components. So it enables custom elements, imports and shadow dom for browsers that does not support these new features natively (among other things that is not that interesting for us right now). Our current plan is to ship native support for shadow dom and custom elements but not imports (they are preffed out right now by default). Problem is that Polymer currently expect a browser to either support all of these or none of them. I think Yehuda has already asked them and this seem like something they can fix (Yehuda, did they also tell you that they're working on this?).

One more problem is that currently we have no way to enable web components without imports (they are behind the same pref flag, I will fix this soon, and will report back to this bug once I'm done with it)
and our imports implementation is missing a few things and we don't want to ship it, so we don't want to get in our way in this project...

And after we have all this sorted out the real task is to figure out how well does Polymer work together with our implementation of custom elements / shadow dom. Problem can be that Polymer is
based on the Google Chrome implementation of these specs, which might differ from the specs, and
ofc we can also have bugs on our side... I think the best would be to work on this together with someone from Polymer (Yehuda, do you know if they are willing to work with us together on this?)
as I would suspect that it's their goal too, to support Firefox.

I think a good start once we got the mentioned blockers out of our way is to check out their repos as described here: https://github.com/Polymer/docs/blob/master/resources/tooling-strategy.md run the tests, and after that run some examples too. Most of those tests are already working, but the final goal is to see polymer based sites working properly.
Flags: needinfo?(gkrizsanits) → needinfo?(wycats)
Got it, thanks Gabor.
I am sure that Polymer folks will be happy to help.
More than happy to help. There were some timing issues with having native Custom Elements and polyfilled HTML Imports at some point, which caused us to force polyfill Custom Elements rather than take a really deep dive at the issues.
Since Mozilla seems ready to start testing with native Custom Elements, we will start working on those issues.

This Github issue can be used for tracking: https://github.com/webcomponents/webcomponentsjs/issues/289
See Also: → 1243175
This is no longer relevant.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(wycats)
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.