From 718dc126db76b3444c3f322a357866366ea81d0a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 18 Jun 2014 03:37:11 -0700 Subject: [PATCH] structured-clone detail of event --- src/General/lib/$.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index c5fd5d8bf..11a6c6d57 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -177,6 +177,10 @@ $.off = (el, events, handler) -> return $.event = (event, detail, root=d) -> + <% if (type === 'userscript') { %> + if typeof cloneInto is 'function' + detail = cloneInto detail, document.defaultView + <% } %> root.dispatchEvent new CustomEvent event, {bubbles: true, detail} $.open =