rewriten API for special events

Yep only firefox doesn't support it yet. But it should be supported soon: https://bugzilla.mozilla.org/show_bug.cgi?id=687787