Got just about every keyword in there... For any given Polymer operation, what's the soonest that all the effects of that operation are guaranteed to resolve and can be verified? I've seen cases where the element's properties aren't immediately available after being appended to the DOM, but have trouble replicating this in a minimal environment.
There are a bunch of concepts I'd like to clarify regarding which properties get set when, when the DOM gets updated, etc. What I believe so far: - The browser's event loop processes one task (macrotask) each iteration. After the task, all queued microtasks will be processed until the queue is exhausted, including microtasks queued by prior microtasks. - setTimeout schedules a macrotask <https://html.spec.whatwg.org/multipage/webappapis.html#timers>, so any microtasks will run before its callback. - Promise timing is platform-dependent. In Polymer 1.0, what happens synchronously, what queues microtasks, and what queues regular tasks? Some specific questions: When creating a Polymer element with document.createElement and appending it to the DOM, will ready() and attached() be called before function execution continues? Most Polymer property observers get triggered synchronously, which seems like a change from 0.5. Is there any way to force-set multiple properties before any observers get called? After changing a property, is a setTimeout necessary and sufficient to propagate the change to bound properties? After updating the DOM via the vanilla DOM API or Polymer.dom, is a setTimeout necessary and sufficient for DOM queries to reflect the new state (e.g. when does layout occur)? For all of the above: does the answer change between shady and shadow DOM? Thanks and sorry for the wall of questions. Michael Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CACi5S_26SBKExa8uF%3D9y-dQxB_3rhG3kCOjEZ70bZTmY6OfUZw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
