Name Description Size
ImportMap.cpp 26934
ImportMap.h A helper class to report warning to ScriptLoaderInterface. 4015
LoadContextBase.cpp 2084
LoadContextBase.h LoadContextBase LoadContexts augment the loading of a ScriptLoadRequest. This class is used as a base for all LoadContexts, and provides shared functionality. 2091
LoadedScript.cpp 7260
LoadedScript.h 3495
ModuleLoaderBase.cpp Implement the HostResolveImportedModule abstract operation. Resolve a module specifier string and look this up in the module map, returning the result. This is only called for previously loaded modules and always succeeds. @param aReferencingPrivate A JS::Value which is either undefined or contains a LoadedScript private pointer. @param aModuleRequest A module request object. @returns module This is set to the module found. 43459
ModuleLoaderBase.h [DOMDOC] Shared Classic/Module Script Methods The ScriptLoaderInterface defines the shared methods needed by both ScriptLoaders (loading classic scripts) and ModuleLoaders (loading module scripts). These include: * Error Logging * Generating the compile options * Optional: Bytecode Encoding ScriptLoaderInterface does not provide any implementations. It enables the ModuleLoaderBase to reference back to the behavior implemented by a given ScriptLoader. Not all methods will be used by all ModuleLoaders. For example, Bytecode Encoding does not apply to workers, as we only work with source text there. Fully virtual methods are implemented by all. 17099
ModuleLoadRequest.cpp static 6706
ModuleLoadRequest.h 5550
moz.build 759
ResolveResult.h ResolveResult is used to store the result of 'resolving a module specifier', which could be an URI on success or a ResolveError on failure. 1793
ScriptKind.h 515
ScriptLoadRequest.cpp 8506
ScriptLoadRequest.h ScriptFetchOptions loosely corresponds to HTML's "script fetch options", https://html.spec.whatwg.org/multipage/webappapis.html#script-fetch-options with the exception of the following properties: cryptographic nonce The cryptographic nonce metadata used for the initial fetch and for fetching any imported modules. As this is populated by a DOM element, this is implemented via mozilla::dom::Element as the field mElement. The default value is an empty string, and is indicated when this field is a nullptr. Nonce is not represented on the dom side as per bug 1374612. parser metadata The parser metadata used for the initial fetch and for fetching any imported modules. This is populated from a mozilla::dom::Element and is handled by the field mElement. The default value is an empty string, and is indicated when this field is a nullptr. integrity metadata The integrity metadata used for the initial fetch. This is implemented in ScriptLoadRequest, as it changes for every ScriptLoadRequest. In the case of classic scripts without dynamic import, this object is used once. For modules, this object is propogated throughout the module tree. If there is a dynamically imported module in any type of script, the ScriptFetchOptions object will be propogated from its importer. 14485