MCPcopy
hub / github.com/jgraph/drawio-desktop / validateSender

Function validateSender

src/main/electron.js:361–367  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

359
360// Only allow request from the app code itself
361function validateSender (frame)
362{
363 // senderFrame may be null if the frame has navigated or been destroyed
364 // before the IPC handler runs (documented behaviour on IpcMainEvent).
365 if (frame == null) return false;
366 return frame.url.replace(/\/.\:\//, str => str.toUpperCase()).startsWith(codeUrl);
367}
368
369function isWithinDisplayBounds(pos)
370{

Callers 11

createWindowFunction · 0.85
electron.jsFile · 0.85
processOneFileFunction · 0.85
loadFinishedFunction · 0.85
toggleSpellCheckFunction · 0.85
toggleStoreBkpFunction · 0.85
toggleGoogleFontsFunction · 0.85
toggleFullscreenFunction · 0.85
checkForUpdatesFnFunction · 0.85
exportDiagramFunction · 0.85
renderingFinishHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected