Select Page

What does Polymer.flush() do?

According to the documentation located here, it says that Polymer.flush() forces several classes of asynchronously queued tasks to flush.

So, when you do dynamic changes that affects ShadyDOM distribution or perform some async operations (like insert, append, remove) or there is dynamic DOM changes (like upgrading elements and calling attached/detached) , Polymer queues them and processes those changes.

Calling Polymer.dom.flush() ensures that these tasks complete synchronously.


Submit a Comment

Your email address will not be published. Required fields are marked *