mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWeb: Fix always hanging Navigable::reload()
See spec issue https://github.com/whatwg/html/issues/9869 Previous attempt on fixing reload had to be reverted because it broke Soundcloud and GitHub, but this change does not seem to introduce new crashes.
This commit is contained in:
parent
f7e57881ad
commit
91377f3ab9
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 91377f3ab9
Pull-request: https://github.com/SerenityOS/serenity/pull/23940
10 changed files with 162 additions and 11 deletions
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
let reloaded = false;
|
||||
window.addEventListener('message', event => {
|
||||
switch (event.data.action) {
|
||||
case "loaded":
|
||||
println("iframe is loaded");
|
||||
if (!reloaded) {
|
||||
event.source.postMessage({ action: 'reload' });
|
||||
reloaded = true;
|
||||
} else {
|
||||
internals.signalTextTestIsDone();
|
||||
}
|
||||
break;
|
||||
case "acknowledge-asked-to-reload":
|
||||
println("iframe is going to reload");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.src = "../../data/iframe-reload.html"
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue