window.onMove

JavaScript1.2+ Nav4+ Syntax

onMove="command"

Description

The onMove event handler of a property of a Window object is fired when the window it is referenced in is moved. The user physically moving the window or a script moving it can fire this event.

Example

Listing 7.560 pops up an alert box if the user tries to move the window.

Listing 7.560 Using the onMove Event to Display an Alert Box
<body onMove='alert("Do NOT move this window!")'>
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.