Due to unfortunate legacy reasons the HTML Standard had to define a rather complicated global setup. There's not just "the current global" (ECMAScript's current realm), but also entry and incumbent.
Which globals entry and incumbent are is not always well-defined:
- "Entry" concept is broken while executing enqueued jobs
- This is also true for Streams: bug 1384006 (No corresponding standard issue yet with clearer description.)
There's also a more general issue with which global to use for objects in IDL and which global to use for report the exception.
Solving these problems requires a bunch of investigative testing, recommendations for changes to browsers (and corresponding bugs being filed), and recommendations for changes to standards (ideally in the form of PRs). Ideally it's solved in such a way that whenever new objects get defined in either ECMAScript or IDL, the question of what global is used for the various operations no longer arises (or arises automatically as a design question due to it no longer being something that can be ignored).