Created
September 30, 2010 00:55
-
-
Save nowelium/603837 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var __webkitPointEmulator__ = function (){ | |
window.WebKitPoint = function(x, y){ | |
this.x = x; | |
this.y = y; | |
}; | |
} | |
var __webkitConvertPointFromNodeToPageEmulator__ = function (){ | |
window.webkitConvertPointFromNodeToPage = function(element, pos){ | |
var pos = Element.cumulativeOffset(element); | |
return { | |
x: pos[0], | |
y: pos[1] | |
}; | |
}; | |
}; | |
if(!('WebKitPoint' in window)){ | |
__webkitPointEmulator__(); | |
} | |
if(typeof window.WebKitPoint == 'undefined'){ | |
__webkitPointEmulator__(); | |
} | |
if(!('webkitConvertPointFromNodeToPage' in window)){ | |
__webkitConvertPointFromNodeToPageEmulator__(); | |
} | |
if(typeof window.webkitConvertPointFromNodeToPage == 'undefined'){ | |
__webkitConvertPointFromNodeToPageEmulator__(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment