MCPcopy Index your code
hub / github.com/nodejs/node / createViewSourceNode

Function createViewSourceNode

deps/v8/tools/profview/profview.js:510–522  ·  view source on GitHub ↗
(codeId)

Source from the content-addressed store, hash-verified

508}
509
510function createViewSourceNode(codeId) {
511 let linkElement = document.createElement("span");
512 linkElement.appendChild(document.createTextNode("View source"));
513 linkElement.classList.add("view-source-link");
514 linkElement.onclick = (event) => {
515 main.setCurrentCode(codeId);
516 main.setViewingSource(true);
517 // Prevent the click from bubbling to the row and causing it to
518 // collapse/expand.
519 event.stopPropagation();
520 };
521 return linkElement;
522}
523
524const COLLAPSED_ARROW = "\u25B6";
525const EXPANDED_ARROW = "\u25BC";

Callers 1

expandTreeMethod · 0.85

Calls 3

createElementMethod · 0.80
stopPropagationMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…