ivanceras
ivanceras

Reputation: 1455

Is there a way to listen to event when a cookie is changed in a Firefox Extension

I am trying to build a firefox extension which listens to events when a cookie is changed by any domain from any page and handle it accordingly. Is there an easy way to do this in javascript?

Upvotes: 17

Views: 20907

Answers (2)

Hitesh Joshi
Hitesh Joshi

Reputation: 724

http://jsfiddle.net/ArondeParon/5RsTm/4/

try changing the cookie, it will pop up an alert.

Upvotes: 1

sdwilsh
sdwilsh

Reputation: 4682

You can listen to the cookie-changed topic with the observer service.

Upvotes: 7

Related Questions