Skip to content
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

Declarative event discovery on custom elements #336

Closed
bergie opened this issue Nov 2, 2013 · 2 comments
Closed

Declarative event discovery on custom elements #336

bergie opened this issue Nov 2, 2013 · 2 comments

Comments

@bergie
Copy link

bergie commented Nov 2, 2013

For libraries and UIs wrapping Polymer, it would be extremely handly for custom elements to be able to provide a listing of their events and attributes in a declarative fashion.

Something like:

<polymer-element name="foo" attributes="bar baz" events="moved">
...
</polymer-element>

The events and attributes lists could be available either through window.CustomElements or some Polymer API.

@bergie
Copy link
Author

bergie commented Nov 5, 2013

Here is the use case I have for this, currently using a separate element for providing the introspection capability:

https://github.com/noflo/noflo-polymer#noflo-polymer-

@sjmiles
Copy link
Contributor

sjmiles commented Mar 24, 2014

Our policy so far has been to be hardcore about not including information in the main declarations that is not strictly necessary at run-time.

When we need additional information, we use metadata constructs just like you did.

Example:
https://github.com/PolymerLabs/polymer-ui-tabs/blob/master/metadata.html

@sorvell sorvell closed this as completed Aug 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants