| Summary: | Why I create an iframe, but it affected promise microtasks in webkit | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | 993634344 |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Blocker | CC: | cdumez, rniwa |
| Priority: | P1 | ||
| Version: | Safari 13 | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | https://codesandbox.io/s/compassionate-volhard-86pz0b?file=/index.html;https://86pz0b.csb.app/ | ||
*** This bug has been marked as a duplicate of bug 235322 *** |
I find an unexpected result when I created an iframe in my code, but it affected promise microtasks in webkit.eg: safari,iosApp webview. code: Promise.resolve(1).then(data => { console.log('>>>data') }) var node = document.createElement('iframe') node.style.display = 'none' node.src = 'www.baidu.com'; (document.body || document.documentElement).appendChild(node) console.log('>>>end') It‘s normal output is: >>>end >>>data But it‘s output in webkit is: >>>data >>>end