简体   繁体   English

如何在Js Chrome开发人员工具中查看对变量的所有引用

[英]How to see all references to variable in Js Chrome Developer Tool

I am debugging CKEditor and the Chrome developer tool doesn't show me which function is updated the value when stepping through....or i don't know how to see all the references pointing to the particular variable. 我正在调试CKEditor ,而Chrome开发人员工具不会向我显示在逐步执行时哪个函数会更新值。...或者我不知道如何查看指向特定变量的所有引用。 How to see all the reference to a particular variable, so I can detect the execution updating value. 如何查看对特定变量的所有引用,以便我可以检测到执行更新值。

For details, the update happens in the following code in the dom/element.js 有关详细信息,更新发生在dom / element.js中的以下代码中

setHtml: ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) ?

                function( html ) {
                    //this function is not called...
                }
            :
                function( html ) {
                 //here someone is updating this.$.innerHTML something other than 'html' value
                    return ( this.$.innerHTML = html );
                },

Particularly, i am interested who is updating "this.$.innerHtML value behind the scenes. Why is the return value in parentheses? 特别是,我对谁在幕后更新“ this。$。innerHtML值”感兴趣。为什么括号中的返回值是?

Thank you for help 谢谢你的帮助

This is plain old JavaScript. 这是普通的旧JavaScript。 There's nothing happening behind the scenes. 幕后什么都没有发生。 This line: 这行:

return ( this.$.innerHTML = html );

does 2 things: 做两件事:

  1. Sets this.$.innerHTML to html . this.$.innerHTML设置为html
  2. Returns value of the expression in parentheses which is basically the value of html . 以括号返回表达式的值,该值基本上是html的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Google Chrome调试工具中查看所有已加载的.js文件 - See all loaded .js files in Google Chrome debugger tool 如何配置chrome developer工具不调试所有扩展脚本 - how to configure chrome developer tool not to debug all extension scripts 如何在Chrome开发者工具中查看页面的所有事件? - How to see ALL events of a page in Chrome Developer Tools? 用于查看对象引用的工具 - Tool to see object references 如何在chrome react开发人员工具中隐藏密码? - How to hide password in chrome react developer tool? 如何在chrome开发者工具中调用匿名函数? - How to call anonymous functions in chrome developer tool? 有什么方法可以停止显示来自chrome开发人员工具的组件变量 - Is there any ways to stop showing component variable from chrome developer tool 使用Chrome开发者工具查找导致js函数调用的原因 - Find What caused a js function call using chrome developer tool 如何使用Google Chrome上的开发者工具查看范围内所有变量的列表以及Javascript中的值? - How do I see the list of all variables in scope along with their values in Javascript using the Developer Tools on Google Chrome? 如何在Chrome中查看JS作用域链的变量对象 - How to see JS scope chain's variable object in chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM