- // TODO(konigsberg): Add cleanup to remove callbacks.
- Dygraph.addEvent(document, "mousewheel", function() { lastClickedGraph = null; });
- Dygraph.addEvent(document, "click", function() { lastClickedGraph = null; });
+ document.addEventListener("mousewheel", function() { lastClickedGraph = null; });
+ document.addEventListener("click", function() { lastClickedGraph = null; });