aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index e43ca69a981..31116307b3c 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -201,6 +201,9 @@ pub trait ScriptChan {
fn clone(&self) -> Box<ScriptChan+Send>;
}
+/// An interface for receiving ScriptMsg values in an event loop. Used for synchronous DOM
+/// APIs that need to abstract over multiple kinds of event loops (worker/main thread) with
+/// different Receiver interfaces.
pub trait ScriptPort {
fn recv(&self) -> ScriptMsg;
}