mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Add fetch_async to PendingAsyncLoad, DocumentLoader and Document
This commit is contained in:
parent
2bb95989c5
commit
d4816762fa
3 changed files with 32 additions and 3 deletions
|
@ -520,6 +520,13 @@ impl PendingAsyncLoad {
|
|||
let consumer = LoadConsumer::Listener(listener);
|
||||
self.core_resource_thread.send(CoreResourceMsg::Load(load_data, consumer, None)).unwrap();
|
||||
}
|
||||
|
||||
/// Initiate the fetch associated with this pending load.
|
||||
pub fn fetch_async(mut self, request: RequestInit, fetch_target: IpcSender<FetchResponseMsg>) {
|
||||
self.guard.neuter();
|
||||
|
||||
self.core_resource_thread.send(CoreResourceMsg::Fetch(request, fetch_target)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
/// Message sent in response to `Load`. Contains metadata, and a port
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue