We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5150f5a commit e8dbf13Copy full SHA for e8dbf13
opal/browser/dom/event/message.rb
@@ -39,10 +39,10 @@ def self.construct(name, desc)
39
40
def data
41
%x{
42
- if (#@native.data instanceof ArrayBuffer) {
+ if (window.ArrayBuffer && #@native.data instanceof ArrayBuffer) {
43
return #{Buffer.new(`#@native.data`)};
44
}
45
- else if (#@native.data instanceof Blob) {
+ else if (window.Blob && #@native.data instanceof Blob) {
46
return #{Blob.new(`#@native.data`)};
47
48
else {
@@ -57,7 +57,7 @@ def source
57
58
var source = #@native.source;
59
60
- if (source instanceof window.Window) {
+ if (window.Window && source instanceof window.Window) {
61
return #{Window.new(`source`)};
62
63
0 commit comments