<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>243488</bug_id>
          
          <creation_ts>2022-08-03 01:41:50 -0700</creation_ts>
          <short_desc>Why I create an iframe, but it affected promise microtasks in webkit</short_desc>
          <delta_ts>2022-08-05 17:40:22 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Safari 13</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>235322</dup_id>
          
          <bug_file_loc>https://codesandbox.io/s/compassionate-volhard-86pz0b?file=/index.html;https://86pz0b.csb.app/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>993634344</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1888592</commentid>
    <comment_count>0</comment_count>
    <who name="">993634344</who>
    <bug_when>2022-08-03 01:41:50 -0700</bug_when>
    <thetext>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 =&gt; {
  console.log(&apos;&gt;&gt;&gt;data&apos;)
})

var node = document.createElement(&apos;iframe&apos;)
node.style.display = &apos;none&apos;

node.src = &apos;www.baidu.com&apos;;
(document.body || document.documentElement).appendChild(node)
console.log(&apos;&gt;&gt;&gt;end&apos;)


It‘s normal output is：
&gt;&gt;&gt;end
&gt;&gt;&gt;data

But it‘s output in webkit is：
&gt;&gt;&gt;data
&gt;&gt;&gt;end</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889295</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-08-05 17:40:22 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 235322 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>