<?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>246475</bug_id>
          
          <creation_ts>2022-10-13 14:54:43 -0700</creation_ts>
          <short_desc>Add support for module scripts in generated background pages for Web Extensions</short_desc>
          <delta_ts>2023-02-16 11:43:21 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Extensions</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>247325</dup_id>
          
          <bug_file_loc>https://github.com/w3c/webextensions/issues/289</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>karlcow</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1905434</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2022-10-13 14:54:43 -0700</bug_when>
    <thetext>Currently Google Chrome supports &quot;type&quot;: &quot;module&quot; for background serviceWorkers. During our 2022-10-13 meeting, while discussing #282, Safari and Firefox agreed it makes sense to also add support &quot;type&quot;: &quot;module&quot; for limited event pages.

Basically given this syntax in manifest.json:

&quot;background&quot;: {
  &quot;scripts&quot;: [&quot;script1.js&quot;, &quot;script2.js&quot;],
  &quot;type&quot;: &quot;module&quot;
}

The browser would generate a _generated_background_page.html which looks like this:

&lt;head&gt;&lt;/head&gt;&lt;body&gt;
&lt;script type=&quot;module&quot; src=&quot;script1.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;module&quot; src=&quot;script2.js&quot;&gt;&lt;/script&gt;
&lt;/body&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1905435</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-10-13 14:55:10 -0700</bug_when>
    <thetext>&lt;rdar://problem/101144817&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934245</commentid>
    <comment_count>2</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2023-02-16 11:43:21 -0800</bug_when>
    <thetext>This was fixed in bug 247325

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

    </bug>

</bugzilla>