Skip to content

Conversation

jpradelle
Copy link

Analysis of Polymer custom components doesn't report Polymer events of properties with notify: true attribute.

This pull request adds it according to documentation: https://polymer-library.polymer-project.org/3.0/docs/devguide/data-system#change-events

Example of analyzed source
import {PolymerElement, html} from '@polymer/polymer/polymer-element';

/**
 * @polymer
 *
 * @fires test-event {CustomEvent<{foo: string}>} - Demo test event
 */
export class PolymerTest extends PolymerElement {
  static get properties() {
    return {
      fooBar: {
        type: String,
        notify: true
      },

      testType: {
        type: String
      }
    };
  }

  static get template() {
    return html`
      <p>Hello</p>
    `;
  }
}

customElements.define('polymer-test', PolymerTest);
Markdown result with pull request code

polymer-test

Events

Event Type Description
foo-bar-changed CustomEvent<{value: *, path: ?string}> Fired when the fooBar property changes
test-event CustomEvent<{foo: string}> Demo test event
Markdown result without pull request code

Events

Event Type Description
test-event CustomEvent<{foo: string}> Demo test event

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

Successfully merging this pull request may close these issues.

1 participant