Fix errors/warnings in tests/*.html
[dygraphs.git] / tests / interaction.html
index a9b99c1..8b64843 100644 (file)
     </table>
         
     <script type="text/javascript">
-      Dygraph.addEvent(document, "mousewheel", function() { lastClickedGraph = null; });
-      Dygraph.addEvent(document, "click", function() { lastClickedGraph = null; });
+      document.addEventListener("mousewheel", function() {
+        lastClickedGraph = null;
+      }, false);
+      document.addEventListener("click", function() { lastClickedGraph = null; }, false);
       var g = new Dygraph(document.getElementById("div_g"),
            NoisyData, { errorBars : true });
       var s = document.getElementById("g2_console");