mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Provide the source window as part of postMessage events.
This commit is contained in:
parent
212ae3b94a
commit
45619db0ba
12 changed files with 128 additions and 26 deletions
|
@ -203,11 +203,12 @@ impl DissimilarOriginWindow {
|
|||
None => return warn!("postMessage called with no incumbent global"),
|
||||
Some(incumbent) => incumbent,
|
||||
};
|
||||
let msg = ScriptMsg::PostMessage(
|
||||
self.window_proxy.browsing_context_id(),
|
||||
origin,
|
||||
data.move_to_arraybuffer(),
|
||||
);
|
||||
let msg = ScriptMsg::PostMessage {
|
||||
target: self.window_proxy.browsing_context_id(),
|
||||
source: incumbent.pipeline_id(),
|
||||
target_origin: origin,
|
||||
data: data.move_to_arraybuffer(),
|
||||
};
|
||||
let _ = incumbent.script_to_constellation_chan().send(msg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue