MCPcopy Create free account
hub / github.com/google/pprof / handleSearchKey

Function handleSearchKey

internal/driver/html/stacks.js:154–164  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

152
153 // Capture Enter key in the search box to make it pivot instead of focus.
154 function handleSearchKey(e) {
155 if (e.key != 'Enter') return;
156 e.stopImmediatePropagation(); // Disable normal enter key handling
157 const val = search.value;
158 try {
159 new RegExp(search.value);
160 } catch (error) {
161 return; // TODO: Display error state in search box
162 }
163 switchPivots(val);
164 }
165
166 function switchPivots(regexp) {
167 // Switch URL without hitting the server.

Callers

nothing calls this directly

Calls 1

switchPivotsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…