(message)
| 32 | const APOLLO_MESSAGE_PREFIX = 'ac-devtools:' |
| 33 | |
| 34 | const workerOnMessage = (message) => { |
| 35 | const { data } = message |
| 36 | |
| 37 | if (data && data.message?.startsWith(APOLLO_MESSAGE_PREFIX)) { |
| 38 | data.__FROM_DEBUGGER_WORKER__ = true |
| 39 | postMessage(data, '*') |
| 40 | return false |
| 41 | } |
| 42 | |
| 43 | if (data && (data.__IS_REDUX_NATIVE_MESSAGE__ || data.__REPORT_REACT_DEVTOOLS_PORT__)) { |
| 44 | return true |
| 45 | } |
| 46 | const list = data && data.__AVAILABLE_METHODS_CAN_CALL_BY_RNDEBUGGER__ |
| 47 | if (list) { |
| 48 | setDevMenuMethods(list, worker) |
| 49 | return false |
| 50 | } |
| 51 | socket.send(JSON.stringify(data)) |
| 52 | } |
| 53 | |
| 54 | const onWindowMessage = (e) => { |
| 55 | const { data } = e |
nothing calls this directly
no test coverage detected