docs: public static Scriptable getTopLevelScope(Scriptable obj)
      {
          for (;;) {
              Scriptable parent = obj.getParentScope();
              if (parent == null) {
                  return obj;
              }
              obj = parent;
          }
      }