我如何使用mutationobserver而不是突变事件? [英] How do I use mutationobserver instead of mutation events?
问题描述
我正在尝试用D3.js创建我的第一个流程图。我从一个工作示例开始,该示例包含来自在线发布的代码的工具提示,。
I am trying to create my first streamgraph with D3.js. I am starting with a working example which incorporates a tooltip from code posted on-line, http://bl.ocks.org/WillTurman/4631136:
When I copy the index.html
and data.csv
files to my PC (Windows 7), I am able to see the streamgraph in a browser (Firefox). However, I get a JS warning, "Use of Mutation Events is deprecated. Use MutationObserver instead."
What lines of code correspond to the Mutation Event? And how should I edit them to use a MutationObserver instead?
I am new to D3 and javascript. Although I found some discussion of mutation events and MutationObservers on-line, I didn't see any examples that were basic enough for me to understand and apply to my situation. I would appreciate any tips.
This is something that will need to be changed in the D3 source. As a user (and certainly as a beginner), you don't need to worry about this -- the warning is only relevant to the developers. Feel free to open an issue about this.
这篇关于我如何使用mutationobserver而不是突变事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!