Web Inspector: Ability to break on any line that will/did trigger a focus or caret change: focus(), blur(), etc.
This would be enabling the DOMDebugger to break on events. Should be a dup of something.
<rdar://problem/15958228>
I don't think so. Calling focus() and blur() does not trigger an event, specifically to avoid loops.
Ahh, okay. That sounds reasonable.
The key feature here is tracking the cause of a blur, focus, or caret change. The cause of the change and its location are not able to be determined at the time of an event (relatedTarget may give hints but not an actual location). For example, when you call element.focus() it queues a focus but the event that event lifecycle has no way to get back to the line that originally started the lifecycle. Even more useful than the actual location is the ability to add a breakpoint to debug around lines that are queueing changes in focus and/or caret. This becomes increasingly useful for tracking focus changes across multiple ticks that are the result of one another.