structured-clone detail of event

This commit is contained in:
ccd0 2014-06-18 03:37:11 -07:00
parent f17dfcc180
commit 718dc126db

View File

@ -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 =