MCPcopy
hub / github.com/webpack/webpack / onmessage

Method onmessage

test/helpers/createFakeWorker.js:151–161  ·  view source on GitHub ↗
(/** @type {(event: { data: unknown }) => void} */ value)

Source from the content-addressed store, hash-verified

149
150 // eslint-disable-next-line accessor-pairs
151 set onmessage(/** @type {(event: { data: unknown }) => void} */ value) {
152 if (this._onmessage) this.worker.off("message", this._onmessage);
153 this.worker.on(
154 "message",
155 (this._onmessage = (data) => {
156 value({
157 data
158 });
159 })
160 );
161 }
162
163 postMessage(/** @type {unknown} */ data) {
164 this.worker.postMessage(data);

Callers

nothing calls this directly

Calls 1

valueFunction · 0.85

Tested by

no test coverage detected