Playback starts YouTube’s embedded player (privacy-enhanced mode).
JavaScript Tutorial - "unload" event | Detect when the browser window has closed
ChanneldcodeDescription from the creator
By using the "unload" event in JavaScript you are able to detect when the window has closed. In the case of an iframe, it is possible to detect when the src attribute has been removed or changed.
In this video we take a look at an example of the "unload" event in the case of an iframe, where we send a message to the parent window when the child window (within the iframe) gets un-loaded.
Support me on Patreon:
patreon.com/dcode - with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
developer.mozilla.org/en-US/docs/Web/Events/unl…
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
In this video we take a look at an example of the "unload" event in the case of an iframe, where we send a message to the parent window when the child window (within the iframe) gets un-loaded.
Support me on Patreon:
patreon.com/dcode - with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
developer.mozilla.org/en-US/docs/Web/Events/unl…
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
About this tutorial
dcode published this 5:25 video tutorial on November 1, 2018. It has been watched 43,135 times on YouTube.
Share
This tutorial in other languages
- FRJavaScript Tutoriel - événement « déchargement » | Détecter quand la fenêtre du navigateur est fermé
- ESJavascript Tutorial - evento de "descarga" | Detectar cuando la ventana del navegador se ha cerrado
- PTJavaScript Tutorial - "descarregar" evento | Detectar quando a janela do navegador foi fechado
- ITJavaScript Tutorial - evento "scaricare" | Rileva quando la finestra del browser è stato chiuso
- DEJavaScript Tutorial - "Entladen" Ereignis | Erkennen Sie, wenn das Browserfenster geschlossen hat
- NLJavaScript Tutorial - "unload" event | Detecteren wanneer het browservenster is gesloten
- RUJavaScript Учебник - «выгрузить» событие | Обнаружение, когда окно браузера закрыло
- PLJavaScript Tutorial - "rozładować" wydarzenie | Wykryć, gdy okno przeglądarki jest zamknięty
- JAJavaScriptのチュートリアル - 「アンロード」イベント|ブラウザのウィンドウが閉じたときを検出
- ARجافا سكريبت دروس - "تفريغ" الحدث | كشف عندما نافذة المتصفح قد أغلقت
- HIजावास्क्रिप्ट ट्यूटोरियल - "उतारना" घटना | का पता लगाने जब ब्राउज़र विंडो बंद कर दिया है
- IDJavaScript Tutorial - "membongkar" Acara | Mendeteksi ketika jendela browser telah ditutup