Is it possible to break on next event in IE10?

I'm working on a project that I haven't been with since the beginning so I don't know the code base very well yet. There seems to be an event on a textbox that runs on blur but I can't find it in the code at all. I'm hoping that IE has the debugger feature where it can break when a particular type of event has been triggered (in my case, the next blur to happen). Or is there a way to get a list of events on an input control?

Answers


You can pause script execution in Internet Explorer 10's Developer Tools. This will cause the execution to stop immediately just before the next script is ran. You can then step through execution to target the logic you're hunting for.

Alternatively, if you're binding events with jQuery you can tap into $._data and identify all of the bound events for any given element. For instance, suppose we had an input element that was behaving oddly, we could determine all bound events like this:

// We need a reference to the element, not a jQuery collection
var firstname = $("#firstname")[0];

// Next we pass the element as a reference
console.log( $._data( firstname ) );

This returns the full data object for that particular element. On this resulting object will be an events collection showing all events handled, as well as the handlers ran when those events are raised.

Hope this helps.


Need Your Help

Spring Boot and how to configure connection details to MongoDB?

spring mongodb spring-data spring-boot

Being new to Spring Boot I am wondering on how I can configure connection details for MongoDB.

About Marc Gravell's RowWrapperDescriptor for binding System.Data.Rows to PropertyGrid

c# winforms propertygrid datarow

I came across Marc Gravell's elegant and witty solution to the problem posted by Matt ( title "C#/winforms: how to best bind a propertygrid and a System.Data.DataRow" ), and have used same solution...