diff --git a/PRIMER.md b/PRIMER.md
index 875276b4..409ef894 100644
--- a/PRIMER.md
+++ b/PRIMER.md
@@ -457,13 +457,13 @@ Example:
```html
I am x-foo!
-
-
+
+
```
We say that an element definition has an imperative and declarative portion. The imperative
@@ -503,15 +503,15 @@ Polymer uses "[Shadow DOM styling rules](http://www.html5rocks.com/en/tutorials/
+
+
-
-
```
Loading external stylesheets (as opposed to defining them inline in HTML) for styling local DOM is currently supported via a special [``](#external-stylesheets) import tag (as opposed to a ``).
@@ -544,9 +544,21 @@ The following methods are provided:
* `Polymer.dom(parent).appendChild(node)`
* `Polymer.dom(parent).insertBefore(node, beforeNode)`
* `Polymer.dom(parent).removeChild(node)`
+ * `Polymer.dom(parent).replaceChild(oldNode, newNode)`
* `Polymer.dom(parent).querySelector(selector)`
* `Polymer.dom(parent).querySelectorAll(selector)`
* `Polymer.dom(parent).childNodes`
+ * `Polymer.dom(parent).firstChild`
+ * `Polymer.dom(parent).lastChild`
+ * `Polymer.dom(node).previousSibling`
+ * `Polymer.dom(node).nextSibling`
+ * `Polymer.dom(parent).children`
+ * `Polymer.dom(parent).firstElementChild`
+ * `Polymer.dom(parent).lastElementChild`
+ * `Polymer.dom(node).previousElementSibling`
+ * `Polymer.dom(node).nextElementSibling`
+ * `Polymer.dom(node).textContent`
+ * `Polymer.dom(node).innerHTML`
* `Polymer.dom(node).parentNode`
* `Polymer.dom(contentElement).getDistributedNodes()`
* `Polymer.dom(node).getDestinationInsertionPoints()`
@@ -670,21 +682,21 @@ Example:
Hello World from !
+
+
-
-
```
@@ -701,25 +713,25 @@ Example:
-
-
+
+
```
Example with `listeners`:
```html
-
-
-
-
+ Polymer({
+
+ is: 'drag-me',
+
+ listeners: {
+ track: 'handleTrack'
+ },
+
+ handleTrack: function(e) {
+ switch(e.detail.state) {
+ case 'start':
+ this.message = 'Tracking started!';
+ break;
+ case 'track':
+ this.message = 'Tracking in progress... ' +
+ e.detail.x + ', ' + e.detail.y;
+ break;
+ case 'end':
+ this.message = 'Tracking ended!';
+ break;
+ }
+ }
+
+ });
+
+
+
```
@@ -1075,34 +1087,35 @@ To bind to textContent, the binding annotation must currently span the entire co
```html
-
+
-
- First: {{first}}
- Last: {{last}}
+
+ First: {{first}}
+ Last: {{last}}
-
-
First: {{first}}
-
Last: {{last}}
+
+
First: {{first}}
+
Last: {{last}}
+
+
+
+
-
-
-
```
@@ -1114,21 +1127,21 @@ To bind to properties, the binding annotation should be provided as the value to
+
+
-
-
```
As in the example above, paths to object sub-properties may also be specified in templates. See [Binding to structured data](#path-binding) for details.
@@ -1337,21 +1350,21 @@ Example:
{{user.manager.name}}
+
+
-
-
```
Since in the majority of cases, `notifyPath` will be called directly after an assignment, a convenience function `set` is provided that performs both the assignment and notify actions:
@@ -1389,24 +1402,24 @@ Example:
{{users}}
+
+
-
-
```
### Expressions in binding annotations
@@ -1531,36 +1544,36 @@ Polymer supports virtual properties whose values are calculated from other prope
My name is {{fullName}}
-
-
+ });
+
+
```
Note that arguments to computing functions may be simple properties on the element, as well as all of the arguments types supported by `observers`, including [paths](#path-observation), [paths with wildcards](#deep-observation), and [paths to array splices](#array-observation). The arguments received in the comuting function will match those described in the sections referenced above.
@@ -1581,29 +1594,64 @@ Example:
My name is {{computeFullName(first, last)}}
+
+
+
+```
-
+ });
+
+
```
@@ -1635,7 +1683,7 @@ When a property only "produces" data and never consumes data, this can be made e
Generally, read-only properties should also be set to `notify: true` such that their changes are observable from above.
-
+
## Cross-scope styling
### Background
@@ -1797,6 +1845,39 @@ Example usage of `my-toolbar`.
```
+### Custom Property API for Polymer Elements
+
+Polymer's custom property shim evaluates and applies custom property values once at element creation time. In order to have an element (and its subtree) re-evaluate custom property values due to dynamic changes such as application of CSS classes, etc., the user should call `this.updateStyles()` on the element. To update all elements on the page, you can also call `Polymer.updateStyles()`.
+
+The user can also directly modify a Polymer element's custom property by setting key-value pairs in `customStyle` on the element (analogous to setting `style`) and then calling `updateStyles()`.
+
+Example:
+
+```html
+
+
+
+
+ My awesome app
+
+
+
+
+
+```
+
### Custom Properties Shim - Limitations and API details