| Summary: | Safari cannot load a website | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Safwen <safwen.baroudi> | ||||
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Blocker | CC: | ap, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 16 | ||||||
| Hardware: | Mac (Apple Silicon) | ||||||
| OS: | macOS 13 | ||||||
| URL: | https://disneycruise.disney.go.com | ||||||
| Attachments: |
|
||||||
|
Description
Safwen
2022-12-14 11:50:44 PST
I suspect that this is caused by zonejs, Promise is overridden by zonejs and the following code fixes the issue:
var iframe = document.createElement('iframe');
document.body.prepend(iframe);
window.addEventListener('pagehide', async () => {
const purePromise = iframe.contentWindow!.Promise;
const overriddenPromise = window.Promise;
window.Promise = purePromise; // this makes the promise returned by fetch pure in the sense it is not touched by zonejs
const r = await fetch(location.href);
console.log(r);
window.Promise = overriddenPromise;
});
Thank you for the report! Could you please elaborate on what the user impact is, and why yo believe this to be a WebKit bug? |