Compare commits
4 Commits
master
...
roblox-emu
Author | SHA1 | Date | |
---|---|---|---|
baea9e297c | |||
aa361bce77 | |||
555b9773e6 | |||
bdda966497 |
14
src/lib.rs
14
src/lib.rs
@ -17,6 +17,20 @@ pub mod data{
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct Dom(rbx_dom_weak::WeakDom);
|
pub struct Dom(rbx_dom_weak::WeakDom);
|
||||||
|
impl Dom{
|
||||||
|
pub fn run_scripts(self)->Self{
|
||||||
|
let runner=roblox_emulator::runner::Runner::new().unwrap();
|
||||||
|
let mut context=roblox_emulator::context::Context::new(self.0);
|
||||||
|
for script in context.scripts(){
|
||||||
|
let (modified_context,script_error)=runner.run_script(script,context);
|
||||||
|
context=modified_context;
|
||||||
|
if let Err(e)=script_error{
|
||||||
|
e.print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Self(context.into_inner())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum ReadError{
|
pub enum ReadError{
|
||||||
|
Loading…
Reference in New Issue
Block a user