This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright 2014 The Polymer Authors. All rights reserved. | ||
* Use of this source code is goverened by a BSD-style | ||
* license that can be found in the LICENSE file. | ||
*/ | ||
|
||
(function(scope) { | ||
'use strict'; | ||
|
||
var unwrap = scope.unwrap; | ||
|
||
// DataTransfer (Clipboard in old Blink/WebKit) has a single method that | ||
// requires wrapping. Since it is only a method we do not need a real wrapper, | ||
// we can just override the method. | ||
|
||
var OriginalDataTransfer = window.DataTransfer || window.Clipboard; | ||
var OriginalDataTransferSetDragImage = | ||
OriginalDataTransfer.prototype.setDragImage; | ||
|
||
OriginalDataTransfer.prototype.setDragImage = function(image, x, y) { | ||
OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
janpaul123
|
||
}; | ||
|
||
})(window.ShadowDOMPolyfill); |
This crashes when OriginalDataTransferSetDragImage does not exist, e.g. IE (http://caniuse.com/dragndrop).