Skip to content

Commit

Permalink
Update behaviors order. Fixes #2144.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 24, 2015
1 parent cb32751 commit 2a51661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PRIMER.md
Expand Up @@ -386,7 +386,7 @@ Polymer supports extending custom element prototypes with shared code modules ca

A behavior is simply an object that looks very similar to a typical Polymer prototype. It may define lifecycle callbacks, `properties`, `hostAttributes`, or other features described later in this document like `observers` and `listeners`. To add a behavior to a Polymer element definition, include it in a `behaviors` array on the prototype.

Lifecycle callbacks will be called on the base prototype first, then for each behavior in the order given in the `behaviors` array. Additionally, any non-lifecycle functions on the behavior object are mixed into the base prototype (and will overwrite the function on the prototype, if they exist); these may be useful for adding API or implementing observer or event listener callbacks defined by the behavior, for example.
Lifecycle callbacks will be called for each behavior in the order given in the `behaviors` array first, followed by the callback on the base prototype. Additionally, any non-lifecycle functions on the behavior object are mixed into the base prototype unless a function of the same name already exists; these may be useful for adding API or default observer or event listener callbacks defined by the behavior, for example, while allowing the base prototype to provide a more specific implementation of the behavior API when necessary.

Example: `highlight-behavior.html`

Expand Down

0 comments on commit 2a51661

Please sign in to comment.