ToggleTaskTracker.h 656 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Optional.h>
  8. #include <AK/String.h>
  9. #include <LibWeb/HTML/EventLoop/Task.h>
  10. namespace Web::HTML {
  11. // https://html.spec.whatwg.org/multipage/interaction.html#toggle-task-tracker
  12. struct ToggleTaskTracker {
  13. // https://html.spec.whatwg.org/multipage/interaction.html#toggle-task-task
  14. // NOTE: We store the task's ID rather than the task itself to avoid ownership issues.
  15. Optional<int> task_id;
  16. // https://html.spec.whatwg.org/multipage/interaction.html#toggle-task-old-state
  17. String old_state;
  18. };
  19. }