To run R:

  1. Let A be the following steps:

    1. Fire an event named "a".

  2. If the condition is true, run A.

  3. Otherwise, queue a microtask, given A.