I'm currently investigating the functionality of the search feature on the React Documentation page: https://reactjs.org/ .
It's known that they utilize DocSearch, but I'm interested in understanding the inner workings.
At the moment, I'm exploring what occurs when I input text into the search bar. Here's what I discovered using the Chrome dev tools:
Flame graph: https://i.sstatic.net/DXg4o.png
Source window (to view the Call Stack) https://i.sstatic.net/KiLQs.png
By analyzing the Flame Graph and the Call Stack, I can identify which functions are invoked during the event, along with the events being triggered (for example, Event:keypress
-> Event:textinput
-> Event:input
-> function call
)
The challenge lies in determining which DOM element triggered the event using devtools. Although I noticed that #algolia-doc-search
initiated the input
event by examining the source code, I am seeking a more convenient method to track DOM events.
Thank you!
Just to note, Firefox Dev Edition doesn't provide much assistance either. https://i.sstatic.net/OLyCk.png