use script_traits::StructuredSerializedData;
use servo_url::ImmutableOrigin;
use crate::dom::bindings::refcounted::Trusted;
use crate::dom::bindings::reflector::DomObject;
use crate::script_runtime::CommonScriptMsg;
pub enum WorkerScriptMsg {
Common(CommonScriptMsg),
DOMMessage {
origin: ImmutableOrigin,
data: StructuredSerializedData,
},
}
pub struct SimpleWorkerErrorHandler<T: DomObject> {
pub addr: Trusted<T>,
}
impl<T: DomObject> SimpleWorkerErrorHandler<T> {
pub fn new(addr: Trusted<T>) -> SimpleWorkerErrorHandler<T> {
SimpleWorkerErrorHandler { addr }
}
}