(frame)
| 359 | |
| 360 | // Only allow request from the app code itself |
| 361 | function 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 | |
| 369 | function isWithinDisplayBounds(pos) |
| 370 | { |
no outgoing calls
no test coverage detected