Add support for returning array-like types from the Execute(Async)Script wd command

This commit is contained in:
George Roman 2019-07-03 22:53:40 +03:00
parent b3c0ed295f
commit 58f80f4ff3
22 changed files with 88 additions and 187 deletions

View file

@ -964,7 +964,7 @@ impl WindowMethods for Window {
#[allow(unsafe_code)]
fn WebdriverCallback(&self, cx: JSContext, val: HandleValue) {
let rv = unsafe { jsval_to_webdriver(*cx, val) };
let rv = unsafe { jsval_to_webdriver(*cx, &self.globalscope, val) };
let opt_chan = self.webdriver_script_chan.borrow_mut().take();
if let Some(chan) = opt_chan {
chan.send(rv).unwrap();