Skip to content

Files

Latest commit

8e0d379 · Jan 20, 2025

History

History
16 lines (9 loc) · 522 Bytes

is_postmessages_synchronous.md

File metadata and controls

16 lines (9 loc) · 522 Bytes

Is postMessages synchronous?

The postMessage API is asynchronous. The message is posted to the message queue and handled later, allowing the rest of the script to continue executing without blocking.

Example:

window.postMessage('message', 'https://example.com');
console.log('Message sent');  // Output: Message sent

Tags: intermediate, JavaScript, Web APIs