[Javascript] Catching property change in Mozilla.

Jeff Greenberg jeffreyag at earthlink.net
Sun Nov 28 16:03:28 CST 2004


Javascript in Mozilla supports the "watch" method:

http://www.devguru.com/Technologies/ecmascript/quickref/watch.html

-JG

Hakan M (Backbase) wrote:

> I want to know when the property window.location.hash is being 
> changed, through automated means. I already have a solution using 
> setTimeout, which is a bit ugly, but what I essentially need is a 
> working __defineSetter__, or something similar to the onpropertychange 
> (IE) that triggers every time location/location.hash gets modified in 
> any way.
>
> Components.interfaces.nsISHistoryListener is unfortunately read-only, 
> otherwise I think the OnHistoryGoBack-method is basically what I need? 
> Can I use some signed script voodoo to get access to these methods?
>
> Appriciate any input.
>
> Regards,
> H
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>



More information about the Javascript mailing list