-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
compile to custom element #811
Conversation
I think this is in a reasonably good place — I wouldn't call it production ready, but I think the best thing to do is to merge it in and start playing with it to see where the bugs are.
Feedback on the API etc welcome. |
wow this is cool! If it's any help, I've been working on custom element best practices docs and did a talk on them at Polymer Summit. All of this material is geared toward vanilla custom elements to (hopefully) make it easier to build abstractions on top of them. Happy to try to answer any questions that come up as you're working through this :) |
thanks @robdodson! will read this document carefully later — from skimming, it looks like there are some things we can enforce at compile time, some things we can warn on (e.g. |
Ref #797. Let's see how this goes...
class
that extendsHTMLElement
customElement.define(tag, name)
<slot>
elements<style>
elements, with untransformed CSS. (This part might get... interesting. Not 100% sure how shadow DOM scoping rules work)new
, both in user code and with nested componentssetAttribute
Currently, the API I'm building around is this:
Might make sense to also have something like this:
Here's where I've got to so far: