Skip to content
Browse files

Update behaviors order. Fixes #2144.

  • Loading branch information...
1 parent cb32751 commit 2a516619675b775f205da60c50f5b29e5bf95c1e @kevinpschaaf kevinpschaaf committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 PRIMER.md
View
2 PRIMER.md
@@ -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`

0 comments on commit 2a51661

Please sign in to comment.
Something went wrong with that request. Please try again.