From cf3b0f3b707e580094aac839c51b0fcdf728ea47 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Fri, 27 Sep 2019 17:06:14 -0400 Subject: [PATCH] Attach the raw handle data attribute --- src/platform_impl/web/event_loop/window_target.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform_impl/web/event_loop/window_target.rs b/src/platform_impl/web/event_loop/window_target.rs index e7bab388..60c917d8 100644 --- a/src/platform_impl/web/event_loop/window_target.rs +++ b/src/platform_impl/web/event_loop/window_target.rs @@ -38,6 +38,8 @@ impl WindowTarget { pub fn register(&self, canvas: &mut backend::Canvas, id: window::Id) { let runner = self.runner.clone(); + canvas.set_attribute("data-raw-handle", &id.0.to_string()); + canvas.on_blur(move || { runner.send_event(Event::WindowEvent { window_id: WindowId(id),