Capture JavaScript promise value for ad-hoc use