-
Notifications
You must be signed in to change notification settings - Fork 491
V1 custom elements - missing functionality #551
Comments
BTW, dos anyone know why A super button becomes:
instead of:
... a lot of needless bookkeeping for developers. |
@ebidel I was referring to WICG/webcomponents#509 (comment) specifically. I think they're in favour of using your first example, it's just that the consumer of a component shouldn't have to know about |
@treshugart The spec changed a bit since I last worked on the polyfill, so there are definitely new-ish things that are missing, as well as some known stuff from the first sprint. I think this is mostly Regarding upgrades and existing attributes, that should be implemented here: https://github.com/webcomponents/webcomponentsjs/blob/v1/src/CustomElements/v1/CustomElements.js#L240 thought it looks like there isn't test coverage yet, so it's possible it's broken. The comment in the code about Patching all built-in HTMLElement subclasses has nothing to do with Note about specs: the DOM and HTML specs are the canonical specs now, so to make sure we aren't referencing something outdated, let's link to those. |
That line only observes attribute changes. If any attributes exist before that is called, then
👍 |
Ah, gotcha. That should be an easy fix. One big thing that's come up is that it looks we're going to need to support CE polyfill in environments that have native Shadow DOM. I'm planning on another sprint of work to get that, HTML Imports support, and more tests in. To avoid any duplicate work, it's probably best to make issues for each feature and accept it as we work on it. |
Totes. I'll close the PR and this issue, and then separate them. I'm more The v1 tests don't seem to be running right now. Is there a reason for It seems like ES2015 classes were used, but other features weren't. What's In terms of native Shadow DOM, it seemed to work alongside V0 SD just fine, On Wed, 8 Jun 2016, 03:25 Justin Fagnani [email protected] wrote:
|
@treshugart thanks for the Issue/PR split. I've been running the tests via this command:
But I can wire them in so they'll run by default. This was all WIP that I paused when the spec continued to change under me. Glad you're helping out now! |
I took the V1 custom element polyfill and plopped it into SkateJS. The plan here is to exclusively use v1 in Skate (maybe fallback to v0, but that's a big maybe). It's allowed us to remove lots of code, but I ran into a few issues where there was missing functionality.
The purpose of this issue is more to document and reference the PR that I will raise for it.
The functionality we've required that will be in the PR is:
CustomElementRegistry.prototype.get()
CustomElement.prototype.attributeChangedCallback()
for existing attributes in part 8 of the upgrade processThere's a couple other things I found missing while passing over the code. We don't require these right away so I'll leave them out of the PR.
CustomElementRegistry.prototype.whenDefined()
HTMLElement
subclasses. I was going to do this, but ended up not doing it as the way to do this is still contentious in that Apple is pretty hard-fast about not using theis
attribute. Therefore Skate will hold off on doing this as well for its v1.The text was updated successfully, but these errors were encountered: