sciter-sdk / rust-sciter

Rust bindings for Sciter

Home Page:https://sciter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a better way?

Zettexe opened this issue · comments

Right now I am using this code to get to the function last child. Is there a better way to access it?

let root = Element::from(Element::from_window(player_wnd.get_hwnd()).unwrap().as_ptr());
let body = root.last_child();

Why do you use Element::from if you already have Element::from_window?

Strangely when I tried it before I got an error using only Element::from_window but I tried it again now and it works fine... No idea what the difference was but its working now.