Lines Matching defs:message
14 port2.on('message', common.mustCall((received) => {
20 // Test emitting non-message events on a port
34 port1.onmessage = common.mustCall((message) => {
35 assert.strictEqual(message.data, 4);
36 assert.strictEqual(message.target, port1);
37 assert.deepStrictEqual(message.ports, []);
43 port2.onmessage = common.mustCall((message) => {
44 port2.postMessage(message.data * 2);
53 // Check that the message still gets delivered if `port2` has its
54 // `on('message')` handler attached at a later point in time.
56 port2.on('message', common.mustCall((received) => {
69 // Check that the message still gets delivered if `port2` has its
70 // `on('message')` handler attached at a later point in time, even if a
72 port2.addListener('message', dummy);
74 port2.removeListener('message', dummy);
77 port2.on('message', common.mustCall((received) => {
87 port2.on('message', common.mustCall(6));
98 message: 'Optional transferList argument must be an iterable'
109 message: 'Optional options.transfer argument must be an iterable'
132 port2.on('message', common.mustCall((msg) => {
170 c1.port2.addEventListener('message', common.mustCall((ev) => {