mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Rename ScriptContext to ClassicContext
This commit is contained in:
parent
47d8c572ce
commit
608c44f103
1 changed files with 5 additions and 5 deletions
|
@ -158,7 +158,7 @@ impl ClassicScript {
|
||||||
pub type ScriptResult = Result<ClassicScript, NetworkError>;
|
pub type ScriptResult = Result<ClassicScript, NetworkError>;
|
||||||
|
|
||||||
/// The context required for asynchronously loading an external script source.
|
/// The context required for asynchronously loading an external script source.
|
||||||
struct ScriptContext {
|
struct ClassicContext {
|
||||||
/// The element that initiated the request.
|
/// The element that initiated the request.
|
||||||
elem: Trusted<HTMLScriptElement>,
|
elem: Trusted<HTMLScriptElement>,
|
||||||
/// The kind of external script.
|
/// The kind of external script.
|
||||||
|
@ -178,7 +178,7 @@ struct ScriptContext {
|
||||||
resource_timing: ResourceFetchTiming,
|
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_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?
|
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) {
|
fn resource_timing_information(&self) -> (InitiatorType, ServoUrl) {
|
||||||
let initiator_type = InitiatorType::LocalName(
|
let initiator_type = InitiatorType::LocalName(
|
||||||
self.elem
|
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>
|
/// <https://html.spec.whatwg.org/multipage/#fetch-a-classic-script>
|
||||||
fn 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
|
// 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),
|
elem: Trusted::new(script),
|
||||||
kind: kind,
|
kind: kind,
|
||||||
character_encoding: character_encoding,
|
character_encoding: character_encoding,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue