// In older versions of Firefox, only console.log is defined.
var console = window.console;
var log = function(console, method, msg) {
// In older versions of Firefox, only console.log is defined.
var console = window.console;
var log = function(console, method, msg) {
- var borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0";
+ // NOTE: the if statement here is for IE8.
+ var borderLeft = "0";
+ if (window.getComputedStyle) {
+ borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0";
+ }
curleft += parseInt(borderLeft, 10) ;
curleft += copyObj.offsetLeft;
if(!copyObj.offsetParent) {
curleft += parseInt(borderLeft, 10) ;
curleft += copyObj.offsetLeft;
if(!copyObj.offsetParent) {
- var borderTop = window.getComputedStyle(copyObj, null).borderTop || "0";
+ // NOTE: the if statement here is for IE8.
+ var borderTop = "0";
+ if (window.getComputedStyle) {
+ borderTop = window.getComputedStyle(copyObj, null).borderTop || "0";
+ }
curtop += parseInt(borderTop, 10) ;
curtop += copyObj.offsetTop;
if(!copyObj.offsetParent) {
curtop += parseInt(borderTop, 10) ;
curtop += copyObj.offsetTop;
if(!copyObj.offsetParent) {
- * Is one element contained by another?
- * @param {Element} containee The contained element.
- * @param {Element} container The container element.
+ * Is one node contained by another?
+ * @param {Node} containee The contained node.
+ * @param {Node} container The container node.