Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
README: update lifecycle callback names
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Sep 12, 2013
1 parent f6982a5 commit 8b2bd94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ Example:
The Custom Elements specification is still under discussion. The polyfill implements certain features in advance of the specification. In particular, the lifecycle callback methods that get called if implemented on the element prototype:

* `createdCallback()` is called when a custom element is created.
* `enteredDocumentCallback()` is called when a custom element is inserted into a DOM subtree.
* `leftDocumentCallback()` is called when a custom element is removed from a DOM subtree.
* `enteredViewCallback()` is called when a custom element is inserted into a DOM subtree.
* `leftViewCallback()` is called when a custom element is removed from a DOM subtree.
* `attributeChangedCallback(attributeName)` is called when a custom element's attribute value has changed

`createdCallback` is invoked _synchronously_ with element instantiation, the other callbacks are called _asyncronously_. The asynchronous callbacks generally use the MutationObserver timing model, which means they are called before layouts, paints, or other triggered events, so the developer need not worry about flashing content or other bad things happening before the callback has a chance to react to changes.
Expand Down

0 comments on commit 8b2bd94

Please sign in to comment.