title: How do I account for different "storage" event behavior between browsers?
body: <p><a href="https://stackoverflow.com/questions/4679023/bug-with-chromes-localstorage-implementation">Bug with Chrome&#39;s localStorage implementation?</a> explains very well the spec, and how it behaves differently in Opera and IE9.</p>
  
  <p>But, now what?</p>
  
  <p>That will really mess up my code(any code) that relies on the implementation to be one way on a browser, when it's another.</p>
  
  <p>How do I test to know whether the event is firing on the window that invokes it or not?</p>
  
  <p>The only thing I can figure is to use a setTimeout() to wait and see if the event is firing in the window that calls it or not, and then do something if it doesn't.  But, that can make some terrible bugs when the storage event is called in quick succession.</p>
  
  <p>In my case I need the event firing for all windows, not all but the one calling it.  In Chrome that implements it to the spec correctly this is just a matter of adding an extra function after adding to the localStorage.setItem(), but then in IE, Firefox3.6 and Opera it's going to effectively do that twice.  I could also have different code based on browser, but I should be testing for compatibility not browser version.</p>
  
  <p>Is there a way to "patch" all browsers with localStorage support to have the event handled the same way on them all?</p>