Earlier quoted context omitted.
Seems to be some issues with the interop still, eg: import js >>> "globals" in dir(js) True >>> "console" in dir(js.globals) False >>> js >>> js.globals.console So apparently introspection doesn't quite work with the wrapped js. Also, if you try: "[ i for i in js.globals]" (or equivalently iterate/loop over the globals-object) - the whole repl/tab hangs. Not really an issue for running business logic in the browser,…
The introspection bit is because js.globals is implemented with a fancy __getattr__ but doesn't have a __dir__. In general, dir() is not reliable in the face of custom __getattr__ implementations unless the implementor goes out of the way to make it work.
Welcome to PyPy.js!
>>> import js
>>> "console" in js.globals
True
>>> "console" in dir(js.globals)
False