Implements sandbox.which()