From bf3018e7ed570b48d812fbd6b530123d4d65eacd Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 22 Nov 2013 03:21:27 -0500
Subject: [PATCH] Trigger event when opening new windows with a reference to the window object (#1489413)

---
 program/js/app.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 636db82..e6c580d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1728,6 +1728,9 @@
       extwin.document.write('<html><body>' + this.get_label('loading') + '</body></html>');
     }
 
+    // allow plugins to grab the window reference (#1489413)
+    this.triggerEvent('openwindow', { url:url, handle:extwin });
+
     // focus window, delayed to bring to front
     window.setTimeout(function() { extwin && extwin.focus(); }, 10);
 

--
Gitblit v1.9.1