3 ms·
Despite the claim of supporting "WebComponents" I can't see any evidence in the source that it actually does. There are no calls to document.registerElement()
by spankalee 12y ago
Despite the claim of supporting "WebComponents" I can't see any evidence in the source that it actually does.
There are no calls to document.registerElement() in the framework or templating repositories, and it looks like any element registration is happening against a proprietary registry, so that Aurelia components won't be available in standard web pages outside of the Aurelia framework, which would be the exact same situation we already have with Ember, Angular, React, etc.
Can someone from the Aurelia team clarify this?
- Offler 12y agoAnd Polymer.
- spankalee 12y agoUnlike the frameworks I listed, Polymer creates true W3C custom elements, which are instantiated by the browser, not the framework. Polymer custom elements are interoperable with raw html, Mozilla X-tags, IBM Delite, Bosonic, etc.
- EisenbergEffect 12y agoYes. We support web components. That doesn't mean we are built with Web Components at the core. The WC specs have a number of design flaws, in my opinion, and they don't work as efficiently as possible with databinding solutions, etc. I can expound more on this in a blog post. But our binding system works fine with Web Components. So, you can import a Web Component and use it inside a view with databinding and even attach additional behaviors to it without any problems. Web Components are not yet a standard. They are primarily being pushed by Google without taking much feedback from other vendors. I spent almost a year working with building frameworks around them...and decided there was no real advantage to using document.registerElement for an Application Framework. Again, if you want to build Web Components or use Polymer...that is fine. You can use that with Aurelia. But Aurelia's custom elements aren't built that way. As a side note, Aurelia will be able to "export" its custom elements to Web Components. So, before we hit v1 you will be able to do that and then take an Aurelia Web Component into a non-Aurelia app and use it, the same way you would use a Polymer element. We haven't done that yet because we are focused on the application experience first and foremost.
- EisenbergEffect 12y agoI should also state that we do use HTML Imports, for view loading, which is part of Web Components and we also use HTML Template Element, which is part of Web Components...and you can optionally use Shadow DOM...which is part of Web Components. What we don't do is use document.registerElement as part of our own custom element implementation because we would give up too much control over critical aspects of binding and resource loading. So, we use 3/4 of the spec. One of the APIs we don't use...but we will allow you to export your Aurelia elements to a document.register form for v1.