mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
implement window.open, create auxiliary browsing context
This commit is contained in:
parent
3e96a322ae
commit
f408b798c4
93 changed files with 476 additions and 324 deletions
|
@ -721,6 +721,18 @@ impl ScriptThread {
|
|||
}))
|
||||
}
|
||||
|
||||
pub fn find_window_proxy_by_name(name: &DOMString) -> Option<DomRoot<WindowProxy>> {
|
||||
SCRIPT_THREAD_ROOT.with(|root| root.get().and_then(|script_thread| {
|
||||
let script_thread = unsafe { &*script_thread };
|
||||
for (_, proxy) in script_thread.window_proxies.borrow().iter() {
|
||||
if proxy.get_name() == *name {
|
||||
return Some(DomRoot::from_ref(&**proxy))
|
||||
}
|
||||
}
|
||||
None
|
||||
}))
|
||||
}
|
||||
|
||||
pub fn worklet_thread_pool() -> Rc<WorkletThreadPool> {
|
||||
SCRIPT_THREAD_ROOT.with(|root| {
|
||||
let script_thread = unsafe { &*root.get().unwrap() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue