View Full Version : On Change Variable?
Does anyone know how you can get when a variable changes? I was thinking of having a set variable function that called any listeners I attached when it changes a certain var...
Trinithis
07-18-2007, 06:53 PM
Gecko (Mozilla & Firefox) based browsers have something called watch(), which is inherited by all objects. Note that IE and probably most other browser types do not support it.
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Object:watch
If you're going for cross-browser support, though, there's nothing to do but poll it.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.