Safari Extension - How to respond to Settings changes?

Posted by Martin Marlow on Stack Overflow See other posts from Stack Overflow or by Martin Marlow
Published on 2010-06-13T16:17:46Z Indexed on 2010/06/13 16:22 UTC
Read the original article Hit count: 350

Filed under:
|

Hi,

I'm currently working on an Extension for Safari 5 and I want to run a listener function whenever Settings changes are made. Apple provides an example for that, but it doesn't work for me. I currently have this listener function in my global html file:

function numberChanged() 
{
     if(event.key == "number")
         alert("Number has changed!");
}

safari.self.addEventListener("change", numberChanged, false);

I hope somebody can help me. Does somebody know what I'm doing wrong?

© Stack Overflow or respective owner

Related posts about safari

Related posts about safari-extension