Yoshi Cheng-Hao Huang b62ed704ef Bug 1822699 - Use credentials="same origin" for dynamic import scripts in a classic worker script. r=jonco
HostLoadImportedModule,
https://html.spec.whatwg.org/multipage/webappapis.html#hostloadimportedmodule

<spec>
6. If referrer is a Script Record or a Module Record, then:
   3. Set fetchOptions to the descendant script fetch options for
      referencingScript's fetch options.
</spec>

And the referencingScript can be either:
  - a classic worker script.
  - a module worker script.

For the classic worker script, its fetch options are defined in
'fetch a classic worker script'
https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-script
See the algorithm processResponseConsumeBody

  <spec>
  5. Let script be the result of creating a classic script using
     source text, script settings object, response's URL, and the
     default classic script fetch options.
  </spec>

  Default classic script fetch options
  https://html.spec.whatwg.org/multipage/webappapis.html#default-classic-script-fetch-options

  <spec>
  The default classic script fetch options are a script fetch options
  whose ... credentials mode is "same-origin", ....
  </spec>

For the module worker script, its fetch options are defined in
'fetch a worklet/module worker script graph'

https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-worklet/module-worker-script-graph

<spec>
1. Let options be a script fetch options whose ... credentials mode is
   _credentials mode_ ...
</spec>

where _credentials mode_ is provided when a worklet or a module worker
is created.

Differential Revision: https://phabricator.services.mozilla.com/D180088
2023-06-07 07:54:56 +00:00

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.
Description
Preconfigured browser for YouTube's TV interface
Readme 5.5 GiB
Languages
JavaScript 32.6%
C++ 25.1%
HTML 20.9%
C 10.6%
Python 2.8%
Other 7.6%