There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.
Close

Processing...
This may take a few seconds.

cancel-timer-all

Syntax

cancel-timer-all: true [every (time)] [after (time)];

This action cancels all outstanding timed actions on the page. In other words, this will cancel every incomplete action eg. things like "after 10s" or "every 2s". They will not complete.

See the cancel-timer command for more information on cancelling actions.

This could be used when changing pages in a single-page website and you want to cancel all timed actions from the last page that you don't want to happen on the new page. Or it could be used for the general stopping of currently timed actions.

Using this within a target selector will not only cancel all timed actions within the target selector, but will cancel all the timed actions on all the other target selectors on the page. Ie. it doesn't matter where it is used. It can be called within a target selector or the event selector itself, and the effect of removing absolutely every timed action on the page will occur.

This example would cancel all timed actions when moving around the browser history on a single-page website, so that each page would start afresh:

window:popstate {
    cancel-timer-all: true;
}