<?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>245415</bug_id>
          
          <creation_ts>2022-09-20 01:03:32 -0700</creation_ts>
          <short_desc>worker and other values are valid keyword for the &apos;as&apos; property in link preload</short_desc>
          <delta_ts>2024-05-23 10:28:02 -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>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=231150</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=274591</see_also>
          <bug_file_loc></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="Karl Dubost">karlcow</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1899745</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-20 01:03:32 -0700</bug_when>
    <thetext>When a document contains:

  &lt;link rel=&quot;preload&quot; href=&quot;main.js&quot; as=&quot;worker&quot; /&gt;

Safari reports:

  &lt;link rel=preload&gt; must have a valid `as` value


Probably a couple of tests are missing from 
https://wpt.fyi/results/html/syntax/speculative-parsing/generated/page-load?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=preload

or https://wpt.fyi/results/fetch/metadata/preload.https.sub.html?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=preload

or in 
https://wpt.fyi/results/preload/reflected-as-value.html?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=preload



The fetch spec definition:
https://fetch.spec.whatwg.org/#concept-request-destination

&gt; A request has an associated destination, which is the empty string, &quot;audio&quot;, &quot;audioworklet&quot;, &quot;document&quot;, &quot;embed&quot;, &quot;font&quot;, &quot;frame&quot;, &quot;iframe&quot;, &quot;image&quot;, &quot;manifest&quot;, &quot;object&quot;, &quot;paintworklet&quot;, &quot;report&quot;, &quot;script&quot;, &quot;serviceworker&quot;, &quot;sharedworker&quot;, &quot;style&quot;, &quot;track&quot;, &quot;video&quot;, &quot;worker&quot;, or &quot;xslt&quot;. Unless stated otherwise it is the empty string.
&gt; 
&gt; A request’s destination is script-like if it is &quot;audioworklet&quot;, &quot;paintworklet&quot;, &quot;script&quot;, &quot;serviceworker&quot;, &quot;sharedworker&quot;, or &quot;worker&quot;.


It seems there are a couple of values which are not defined such as video for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899747</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-20 01:15:51 -0700</bug_when>
    <thetext>It seems to be defined in 
https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLLinkElement.cpp#236-253</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899748</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-20 01:16:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/100161255&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899749</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-20 01:21:02 -0700</bug_when>
    <thetext>Error message is coming from 
https://searchfox.org/wubkat/rev/98b6bc461792c83386d8a7bb26363c41fc42f77e/Source/WebCore/loader/LinkLoader.cpp#235-240</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901994</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-29 02:22:42 -0700</bug_when>
    <thetext>Related https://github.com/whatwg/html/issues/8332</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1905554</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-10-14 00:44:26 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/5367</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906413</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-10-18 01:38:51 -0700</bug_when>
    <thetext>Committed 255669@main (e53707dae94c): &lt;https://commits.webkit.org/255669@main&gt;

Reviewed commits have been landed. Closing PR #5367 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>