Search code examples
polymerpolymer-2.xpolymer-elements

PolymerElements API reference?


Where can I find a full API reference for PolymerElements?

For example, the description for PaperDialogBehavior says

Use the dialog-dismiss and dialog-confirm attributes on interactive controls to close the dialog. If the user dismisses the dialog with dialog-confirm, the closingReason will update to include confirmed: true.

But I can't find any further information anywhere about what closingReason actually is (a property? a parameter passed to some callback?) and how it "includes" confirmed: true.

Instead of wasting time on guessing how to do every single little thing when using Polymer, it would be nice to have an actual API reference. Is there one?


Solution

  • There isn't any further information. Documentation isn't well written and you have to find many things on your own. Just remember that everything in Polymer is about properties. So closingReson is property that you can access on paper-dialog (or any other elements using paperDialogBehavior).

    This property contains object {confirmed: true|false}

    Truly said, behaviors has extremely badly written documentations. It is very confusing. For example:

    modal: boolean = false If modal is true, this implies no-cancel-on-outside-click, no-cancel-on-esc-key and with-backdrop.

    but none of those properties are specified in paperDialogBehavior, because it is inherited from iron-overlay-behavior. And these inheritences are not documented (mostly).