2

I need it for my firefox extension. I don't care about waiting the page load completely, I want only observe URL and get an event every time it changes, also when I do history back and forward.

edit: I saw An observer for URL changes (Firefox Extension), but i wondering if there is something much simpler, like an event that fires every time the url is part of an action, like page request, history back and forward ecc..

Community
  • 1
  • 1
Manuel Bitto
  • 5,073
  • 6
  • 39
  • 47
  • I think somebody asked the exact some question yesterday and got an answer. You might find it in the list or through the search. – Pekka Jan 14 '10 at 12:25
  • The helpfully suggested http://stackoverflow.com/questions/1549831/an-observer-for-url-changes-firefox-extension is actually mistitled and probably is not relevant. – Nickolay Jan 14 '10 at 18:14

2 Answers2

1

https://developer.mozilla.org/en/Code_snippets/Progress_Listeners#Example.3a_Notification_when_the_value_in_Address_Bar_changes

Also How can i check if url of current browser tab is changed?

Community
  • 1
  • 1
Nickolay
  • 31,095
  • 13
  • 107
  • 185
  • If someone have the same problem, i found another solution, it's more quik and maybe less "professional", but it works: use DOMTitleChanged event. It's fired every time the content of browser change, including history back and forward and new tabs. – Manuel Bitto Jan 14 '10 at 21:16
0

SWFAddress has a Javascript library that lets you do just that.

Matti Lyra
  • 12,828
  • 8
  • 49
  • 67