Tuesday, 11 September 2012

beforeunload events in Internet Explorer 9

is my weapon of choice for development. This means spending a little bit of time with when development's almost over, learning to play with its little ways. We were taking beforeunload to display a dialog whenever the user risks losing data by navigating away — but only then. IE9 (oddly) displays null in a dialog when null is returned from beforeunload. Returning undefined instead means harmony amongst browsers. Another little trick to add to the playbook...

No comments:

Post a Comment