Avoid illegal invocation of native method.
This commit is contained in:
@@ -1699,6 +1699,8 @@ OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
|
|||||||
|
|
||||||
OpenLayers.Util.requestAnimationFrame = (function() {
|
OpenLayers.Util.requestAnimationFrame = (function() {
|
||||||
return window.requestAnimationFrame ||
|
return window.requestAnimationFrame ||
|
||||||
|
OpenLayers.Util.requestAnimationFrame = (function(window) {
|
||||||
|
var request = window.requestAnimationFrame ||
|
||||||
window.webkitRequestAnimationFrame ||
|
window.webkitRequestAnimationFrame ||
|
||||||
window.mozRequestAnimationFrame ||
|
window.mozRequestAnimationFrame ||
|
||||||
window.oRequestAnimationFrame ||
|
window.oRequestAnimationFrame ||
|
||||||
@@ -1706,7 +1708,11 @@ OpenLayers.Util.requestAnimationFrame = (function() {
|
|||||||
function(callback, element) {
|
function(callback, element) {
|
||||||
window.setTimeout(callback, 16);
|
window.setTimeout(callback, 16);
|
||||||
};
|
};
|
||||||
})();
|
// bind to window to avoid illegal invocation of native function
|
||||||
|
return function(callback, element) {
|
||||||
|
request.apply(window, [callback, element]);
|
||||||
|
};
|
||||||
|
})(window);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user