[Javascript] Catching property change in Mozilla.

Hakan M (Backbase) hakan at backbase.com
Sun Nov 28 08:07:50 CST 2004


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



More information about the Javascript mailing list