Skip to content

Commit

Permalink
restore message listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders-ms committed Sep 9, 2024
1 parent 00d9a98 commit 7cef8f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pxtsim/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
namespace pxsim {
const MIN_MESSAGE_WAIT_MS = 200;
let tracePauseMs = 0;

enum MessageListenerFlags {
MESSAGE_BUS_LISTENER_REENTRANT = 8,
MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY = 16,
MESSAGE_BUS_LISTENER_DROP_IF_BUSY = 32,
MESSAGE_BUS_LISTENER_IMMEDIATE = 192
}

export namespace timers {
function globalSpace(): any {
try { return global; } catch { }
Expand Down Expand Up @@ -30,6 +38,7 @@ namespace pxsim {
clearIntervalFn(id);
}
}

export namespace U {
// Keep these helpers unified with pxtlib/browserutils.ts
export function containsClass(el: SVGElement | HTMLElement, classes: string) {
Expand Down

0 comments on commit 7cef8f2

Please sign in to comment.