Name: async-dom
Owner: PolymerLabs
Description: Async DOM APIs
Created: 2016-03-11 22:12:55.0
Updated: 2018-01-19 17:07:42.0
Pushed: 2016-03-11 22:14:09.0
Homepage: null
Size: 2
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
APIs for reading and writing DOM asynchronously.
async-dom solve two related problems:
Returns a Promise that resolves during the next DOM read phase.
In strict mode, layout flushing API calls to the element are allowed in tasks, but mutations are disallowed.
Returns a Promise that resolves during the next DOM write phase.
In strict mode, layout flushing API calls to the element are disallowed in tasks, but mutations are allowed.
Defers resolution of any subsequently requested DOM promises until after argument has completed.
Because containers by default depend on the layout of their descendants, waitFor() bubbles up the tree, blocking subsequent DOM promises for all ancestor elements as well, but not for descendent or sibling elements.
Bubbling of waitFor() stops if an element is strictly contained (not implemented): https://drafts.csswg.org/css-containment/
Enables and disables strict mode, which prohibits some API calls outside of tasks.