// In older versions of Firefox, only console.log is defined.
var console = window.console;
var log = function(console, method, msg) {
- if (method) {
+ if (method && typeof(method) == 'function') {
method.call(console, msg);
} else {
console.log(msg);
};
/**
- * 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.
* @return {boolean} Whether containee is inside (or equal to) container.
* @private
*/
-Dygraph.isElementContainedBy = function(containee, container) {
+Dygraph.isNodeContainedBy = function(containee, container) {
if (container === null || containee === null) {
return false;
}