Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 4b7999c

Browse files
committed
Only add setDragImage if the browser supports it
Fixes #464
1 parent b2c730a commit 4b7999c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/wrappers/DataTransfer.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
var OriginalDataTransferSetDragImage =
1818
OriginalDataTransfer.prototype.setDragImage;
1919

20-
OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {
21-
OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);
22-
};
20+
if (OriginalDataTransferSetDragImage) {
21+
OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {
22+
OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);
23+
};
24+
}
2325

2426
})(window.ShadowDOMPolyfill);

0 commit comments

Comments
 (0)