Added "on" method to the pageAsPromise API