mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Migrate EventTarget
event firing functions to use Atom
s.
This allows us to utilize more `atom` macros.
This commit is contained in:
parent
80575c3d2e
commit
f447040ea9
16 changed files with 42 additions and 33 deletions
|
@ -28,6 +28,7 @@ use net_traits::request::{CredentialsMode, Destination, RequestInit, Type as Req
|
|||
use rand::random;
|
||||
use script_runtime::{CommonScriptMsg, StackRootTLS, get_reports, new_rt_and_cx, ScriptChan};
|
||||
use script_traits::{TimerEvent, WorkerGlobalScopeInit, ScopeThings, ServiceWorkerMsg, WorkerScriptLoadOrigin};
|
||||
use servo_atoms::Atom;
|
||||
use std::sync::mpsc::{Receiver, RecvError, Select, Sender, channel};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
@ -268,7 +269,7 @@ impl ServiceWorkerGlobalScope {
|
|||
// TODO XXXcreativcoder This will eventually use a FetchEvent interface to fire event
|
||||
// when we have the Request and Response dom api's implemented
|
||||
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker_1/index.html#fetch-event-section
|
||||
self.upcast::<EventTarget>().fire_event("fetch");
|
||||
self.upcast::<EventTarget>().fire_event(Atom::from("fetch"));
|
||||
let _ = mediator.response_chan.send(None);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue