 = new Promise((resolve, reject) => {
            receiveMessage = (event) => {
                if (event.data !== expectedFetchResult) {
                    reject("Received unexpected message " + event.data);
                    return;
                }
                resolve();
            }
            window.addEventListener("message", receiveMessage, false);
        });
        frame.contentWindow.postMessage(fetchURL, "*");
        return promise.finally(() => {
            frame.remove();
        