Pourquoi ca descend pas ?

This commit is contained in:
piair 2023-09-27 19:38:21 +02:00
parent 72504e5cab
commit 98bb9ad6d0
2 changed files with 5 additions and 2 deletions

View File

@ -15,11 +15,14 @@
return new Promise(resolve => setTimeout(resolve, ms)); return new Promise(resolve => setTimeout(resolve, ms));
} }
var myIframe = document.getElementById('iframe'); var myIframe = document.getElementById('iframe');
myIframe.addEventListener("load", async () => { myIframe.addEventListener("load", async () => {
let doc = myIframe.contentDocument; let doc = myIframe.contentDocument;
console.log(1);
doc.body.innerHTML = doc.body.innerHTML + '<style>html{color:white;}</style>'; doc.body.innerHTML = doc.body.innerHTML + '<style>html{color:white;}</style>';
myIframe.contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight); myIframe.contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight);
await delay(1000); console.log(2);
await delay(2000);
document.getElementById('iframe').contentWindow.location.reload(); document.getElementById('iframe').contentWindow.location.reload();
}); });
</script> </script>

View File

@ -1 +1 @@
v6.6.14 v6.6.15