create init_config method for Runner

This commit is contained in:
Akulij 2025-05-20 00:39:39 +05:00
parent 135139514b
commit 534a0e6090

View File

@ -104,6 +104,15 @@ impl Runner {
Ok(val)
}
pub fn init_config(&self, content: &str) -> ScriptResult<RunnerConfig> {
let val = self.run_script(content)?;
// let rc: RunnerConfig = from_js(unsafe { self.context.context_raw() }, &val)?;
let rc: RunnerConfig = val.js_into()?;
Ok(rc)
}
}
#[cfg(test)]