From 934d1acb5f89c1f160287ba3a47e79293d7519ae Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Fri, 24 Feb 2017 19:42:30 -0800 Subject: [PATCH] Fixes #4036 by explaining that users must call `flush` on return value from `Polymer.dom().observerNodes`. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4631e2fb..7cb418ca 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ Polymer 2.0 elements will stamp their templates into shadow roots created using * Selection of distributed content into named slots must use `slot="..."` rather than tag/class/attributes selected by `` * Re-distributing content by placing a `` into an element that itself has named slots requires placing a `name` attribute on the `` to indicate what content _it_ selects from its host children, and placing a `slot` attribute to indicate where its selected content should be slotted into its parent * In the V1 "Shady DOM" shim, initial distribution of children into `` is asynchronous (microtask) to creating the `shadowRoot`, meaning distribution occurs after observers/`ready` (in Polymer 1.0's shim, initial distribution occurred before `ready`). In order to force distribution synchronously, call `ShadyDOM.flush()`. +* Calling `Polymer.dom.flush` no longer results in callbacks registered with `Polymer.dom.observeNodes` being called. Instead, the object returned from `Polymer.dom.observeNodes` now contains a `flush` method which can be used to immediately call the registered callback if any changes are pending. #### Scoped styling