RESOLVED WONTFIX 199708
history.back/forward does not trigger the popstate event synchronously
https://bugs.webkit.org/show_bug.cgi?id=199708
Summary history.back/forward does not trigger the popstate event synchronously
709922234
Reported 2019-07-11 06:15:14 PDT
Steps to reproduce the problem: 1. open https://www.google.com 2. open webconsole 3. input ``` history.pushState("/", {}, ""); let flag = false; window.addEventListener("popstate", () => { console.log({ flag }); }); flag = true; history.back(); queueMicrotask(() => (flag = false)); ``` What is the expected behavior? output `{ flag: true }` What went wrong? output `{ flag: false }`
Attachments
709922234
Comment 1 2019-11-22 19:13:46 PST
Note You need to log in before you can comment on or make changes to this bug.