diff options
-rw-r--r-- | components/script/dom/htmlscriptelement.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index c7931bfdecc..d47c3d7503c 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -158,7 +158,7 @@ impl ClassicScript { pub type ScriptResult = Result<ClassicScript, NetworkError>; /// The context required for asynchronously loading an external script source. -struct ScriptContext { +struct ClassicContext { /// The element that initiated the request. elem: Trusted<HTMLScriptElement>, /// The kind of external script. @@ -178,7 +178,7 @@ struct ScriptContext { resource_timing: ResourceFetchTiming, } -impl FetchResponseListener for ScriptContext { +impl FetchResponseListener for ClassicContext { fn process_request_body(&mut self) {} // TODO(KiChjang): Perhaps add custom steps to perform fetch here? fn process_request_eof(&mut self) {} // TODO(KiChjang): Perhaps add custom steps to perform fetch here? @@ -265,7 +265,7 @@ impl FetchResponseListener for ScriptContext { } } -impl ResourceTimingListener for ScriptContext { +impl ResourceTimingListener for ClassicContext { fn resource_timing_information(&self) -> (InitiatorType, ServoUrl) { let initiator_type = InitiatorType::LocalName( self.elem @@ -282,7 +282,7 @@ impl ResourceTimingListener for ScriptContext { } } -impl PreInvoke for ScriptContext {} +impl PreInvoke for ClassicContext {} /// <https://html.spec.whatwg.org/multipage/#fetch-a-classic-script> fn fetch_a_classic_script( @@ -318,7 +318,7 @@ fn fetch_a_classic_script( // TODO: Step 3, Add custom steps to perform fetch - let context = Arc::new(Mutex::new(ScriptContext { + let context = Arc::new(Mutex::new(ClassicContext { elem: Trusted::new(script), kind: kind, character_encoding: character_encoding, |