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

Polymer Element public API shouldn't be in custom elements extending Polymer.Element #1566

Closed
manolo opened this issue Aug 28, 2017 · 4 comments

Comments

@manolo
Copy link

manolo commented Aug 28, 2017

When you have an custom element extending Polymer.Element, all public API of polymer is shown.

class KkElement extends Polymer.Element {
...

Otherwise, if your custom element extends a mixin, Polymer API is not listed.

  /**
   * @polymerMixin
   */
  Foo = superClass => class FooMixin extends superClass {
  };

  class KkElement extends Foo(Polymer.Element) {
  ...

Related with PolymerElements/iron-component-page#147

@limonte
Copy link

limonte commented Nov 1, 2017

a41

@yuriy-fix
Copy link

It is possible to use a workaround until proper solution will be implemented.
Workaround: class SomeElement extends (class extends Polymer.Element {})

@mgibas
Copy link

mgibas commented Nov 15, 2017

I dont see this behavior after removing @extends Polymer.Element from jsdoc... not sure its a valid thing to do though

@rictic
Copy link
Contributor

rictic commented Nov 19, 2017

This should be solved in iron-component-page, perhaps by hiding inherited properties by default, or otherwise downplaying them.

From a static analysis perspective, if Foo extends Bar, then Foo also inherits Bar's public API. The reason adding a mixin removes those entries from your iron-component-page results is that mixins currently defeat polymer-analyzer's analysis, but that shouldn't be relied upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants