set the right flags and attrs for InitEvent
auto merge of #2196 : hazz/servo/initevent, r=Ms2ger

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