Search code examples
javascriptjquerydebuggingconsoleinitialization

What the instance init in Google Chrome console mean and how I can access it?


What the instance init in browser console mean ?

If anyone has any idea on how to deal with this problem, I would really appreciate it.

Here is an attachment of the code that I have while I was doing a console.log

init [input#TreatmentDefault, context: document, selector: "#TreatmentDefault"]

I am trying to access the first iteration [0] of an object which saves some data but I am not able to do so. You can see on the screen capture which I created that there is an init instance at the beginning and then you have the first iteration starting at [0]. I want to be able to take that part and print it so I can be able to access the rest of the data separately.

Thanks


Solution

  • Most likely the page you're applying the $() function to includes jQuery, so you're actually calling the jQuery's function, not the Chrome's built-in one.

    See this answer in a relevant thread:

    However, these values are only the default values in the console. If the page overwrites the variable by including something like jQuery, the console will use the value from the page itself, and something like $('p') will return a jQuery object rather than just the first p element.