Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.h

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/ScriptLoader.h
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h
index ec3032bc4ae816e6d5d0cf009e870328dccac554..5f343cbd8c58fe9a3c7e0b2f8fe6dca049e4c817 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -39,6 +39,9 @@ class Script;
class ResourceFetcher;
class ScriptResource;
+class Modulator;
+class ModulePendingScriptTreeClient;
+
class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
public PendingScriptClient {
USING_GARBAGE_COLLECTED_MIXIN(ScriptLoader);
@@ -73,7 +76,7 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
String ScriptContent() const;
// Creates a PendingScript for external script whose fetch is started in
- // FetchClassicScript().
+ // FetchClassicScript()/FetchModuleScriptTree().
PendingScript* CreatePendingScript();
// Returns false if and only if execution was blocked.
@@ -148,6 +151,12 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
CrossOriginAttributeValue,
SecurityOrigin*,
const String& encoding);
+ // https://html.spec.whatwg.org/#fetch-a-module-script-tree
+ void FetchModuleScriptTree(const KURL&,
+ Modulator*,
+ const String& nonce,
+ ParserDisposition,
+ WebURLRequest::FetchCredentialsMode);
bool DoExecuteScript(const Script*);
@@ -182,9 +191,6 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
// https://html.spec.whatwg.org/#concept-script-type
// "It is determined when the script is prepared"
- // TODO(hiroshige): Currently |script_type_| is set but ignored, and
- // thus is handled as if it is a classic script even if type is "module"
- // and module scripts is enabled.
ScriptType script_type_ = ScriptType::kClassic;
// https://html.spec.whatwg.org/#concept-script-external
@@ -217,6 +223,7 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
DocumentWriteIntervention document_write_intervention_;
Member<PendingScript> pending_script_;
+ Member<ModulePendingScriptTreeClient> module_tree_client_;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698