Skip to content

Instantly share code, notes, and snippets.

View johnkweber's full-sized avatar

johnkweber johnkweber

View GitHub Profile
@johnkweber
johnkweber / d3.v2.js
Last active August 29, 2015 14:08
Using D3.js to check for errors bubbling to the surface
(function(){if (!Date.now) Date.now = function() {
return +new Date;
};
try {
document.createElement("div").style.setProperty("opacity", 0, "");
} catch (error) {
var d3_style_prototype = CSSStyleDeclaration.prototype,
d3_style_setProperty = d3_style_prototype.setProperty;
d3_style_prototype.setProperty = function(name, value, priority) {
d3_style_setProperty.call(this, name, value + "", priority);