2019-12-20 00:07:57 +01:00
|
|
|
async function main() {
|
2020-04-21 01:52:26 +02:00
|
|
|
window.ws = new WebSocket('ws://localhost:' + window.location.port + '/ws');
|
|
|
|
|
window.ws.addEventListener('message', message => {});
|
|
|
|
|
|
2020-11-04 16:35:19 +01:00
|
|
|
fetch('fetch-request-a.js');
|
|
|
|
|
window.top.fetchSecond = () => {
|
|
|
|
|
// Do not return the promise here.
|
|
|
|
|
fetch('fetch-request-b.js');
|
|
|
|
|
};
|
2019-12-20 00:07:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main();
|