diff --git a/src/General/lib/connection.class b/src/General/lib/connection.class index ee23674ec..fc2c001be 100644 --- a/src/General/lib/connection.class +++ b/src/General/lib/connection.class @@ -3,7 +3,10 @@ class Connection $.on window, 'message', @onMessage targetWindow: -> - @target.contentWindow or @target + if @target instanceof window.HTMLIFrameElement + @target.contentWindow + else + @target send: (data) => @targetWindow().postMessage "#{g.NAMESPACE}#{JSON.stringify data}", @origin