Skip to content

Instantly share code, notes, and snippets.

pbojinov /
Last active December 8, 2023 21:09
Two way iframe communication- Check out working example here:

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.


Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')


makenova / Difference between debounce and
Last active February 22, 2023 03:09
Javascript function debounce and throttle

Difference between Debounce and Throttle


Debounce a function when you want it to execute only once after a defined interval of time. If the event occurs multiple times within the interval, the interval is reset each time.
Example A user is typing into an input field and you want to execute a function, such as a call to the server, only when the user stops typing for a certain interval, such as 500ms.