From 8ebf35ed5fbac17fc98ca9594d1e536c6dbf6419 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Wed, 30 Oct 2024 10:08:53 +0100 Subject: [PATCH] Use actions queue when dispatching undo actions from "Release Actions" --- index.html | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index 95526de6..f9411b9c 100644 --- a/index.html +++ b/index.html @@ -9120,18 +9120,16 @@

Dispatching actions

grouped by tick, and then causes each action to be run at the appropriate point in the sequence. -

To dispatch actions given input -state, actions by tick, browsing -context, and actions options: +

To wait for an action queue token given input state:

  1. Let token be a new unique identifier. -

  2. Enqueue token in input state's actions - queue. +

  3. Enqueue token in input state's + actions queue.

  4. Wait for token to be the first item - in input state's actions queue. + in input state's actions queue.

    -
  5. Let actions result be the result of dispatch - actions inner with input state, actions by - tick, browsing context, and actions options. +

    To dispatch actions given input +state, actions by tick, browsing +context, and actions options: + +

      +
    1. Call wait for an action queue token with input state. + +

    2. Let actions result be the result of + dispatch actions inner with input state, actions by + tick, browsing context, and actions options.

    3. Dequeue input state's actions queue. -

      Assert: this returns token +

      Assert: this returns token

    4. Return actions result.

    @@ -10325,26 +10330,29 @@

    Release Actions

    is no longer open, return error with error code no such window. -
  6. Let input state be the result of get the - input state with session and current - top-level browsing context. +

  7. Let input state be the result of get the input state + with session and current top-level browsing context.

  8. Let actions options be a new actions options with the is element origin steps set to represents a web element, and the get element origin steps set to get a WebElement origin. +

  9. Call wait for an action queue token with input state. +

  10. Let undo actions be input - state's input cancel list in reverse order. + state's input cancel list in reverse order. -

  11. Try to dispatch tick actions with arguments - undo - actions, 0,session's current - browsing context, and actions options. +

  12. Dispatch actions with input state, + undo actions, current browsing context, + and actions options. If this results in an error + return that error. + +

  13. Dequeue input state's actions queue. +

    Assert: this returns token

  14. Reset the input state with session - and session's current top-level browsing - context. + and session's current top-level browsing context.

  15. Return success with data null.