Set the right flags and attributes for InitEvent

Should fix #2189

This is my first PR for servo (and first time using Rust), so apologies if anything is horribly wrong.