These functions transition an element from one CSS class to another, but could lead to forced layout if not scheduled using waitForMutateTime. If a delay is supplied, then the transition is "scheduled" and if the opposite transition is executed before the scheduled one, the original one is cancelled. See transitionElement for an example.
These functions transition an element from one CSS class to another in an optimized way using waitForMutateTime and so are asynchronous. If a delay is supplied, then the transition is "scheduled" and if the opposite transition is executed before the scheduled one, the original one is cancelled. See transitionElement for an example.
These functions alter the DOM tree, but could lead to forced layout if not scheduled using waitForMutateTime.
These functions alter the DOM tree in an optimized way using waitForMutateTime and so are asynchronous.
waitForMeasureTime allows you to schedule tasks that read or
"measure", the DOM, for example getting computed styles, taking the
offsetWidth
or the scrollTop
of an element, etc... anything that would
force a layout if it runs after the layout has been invalidated by a
"mutation".
See https://gist.github.com/paulirish/5d52fb081b3570c81e3 for a list of operations that should be run on a valid layout to avoid forced layouts.
waitForMutateTime allows you to schedule tasks that invalidate the DOM layout by making changes to the style, inserting or removing elements, etc.
These ensure that:
The functions allow you to find elements that match a given string specification.