nextMessage() {
            return new Promise(resolve => {
                let fn = ({data}) => {
                    this.removeEventListener("message", fn);
                    resolve(data);
                };
                this.addEventListener("message", fn);
            });
        }
Wait for the next message and return it (after passing it to
existing handlers)

@returns {Promise} - Promise that resolves to the message data.