Is Chrome console debugging disabled?

With the update of Chrome to version 2.3, I had the following problem. When ik is debugging something like

console.log($('canvas')) 

Usually I got the code in the console (in this case html) that I could hover over, so the object was selected in HTML. Now I got this:

 [<canvas>, <canvas>, <canvas>, prevObject: jQuery.fn.jQuery.init[1], context: #document, selector: "canvas"] 

Is there a parameter in which it can be changed back, so I get normal html with hover on the HTML page?

+4
source share
1 answer

JQuery is an extension of Array , or, in JavaScript, the prototype of jQuery is Array. Therefore, when you $('canvas') ' ing, a collection of document elements is required. The solution is to debug the elements yourself using the following code:

 console.debug($('canvas')[0]); // or other index if there is more than one elements is collected 
+1
source

Source: https://habr.com/ru/post/1444662/


All Articles