Move the EventBus, and related functionality, into its own file

The size of the `web/ui_utils.js` file has increased over time, as more code has been added to (or moved into) that file. To reduce its size slightly, this patch moves the event-related functionality into a separate file.
This commit is contained in:
Jonas Jenwald 2021-12-15 17:09:16 +01:00
parent a425c9cfa5
commit 0a19ef6864
10 changed files with 489 additions and 456 deletions

View file

@ -17,8 +17,8 @@ import {
isValidRotation,
parseQueryString,
PresentationModeState,
waitOnEventOrTimeout,
} from "./ui_utils.js";
import { waitOnEventOrTimeout } from "./event_utils.js";
// Heuristic value used when force-resetting `this._blockHashChange`.
const HASH_CHANGE_TIMEOUT = 1000; // milliseconds