Bug 900874 - Register to DOM events instead of system messages

https://bugzilla.mozilla.org/show_bug.cgi?id=900874