use type instead of name to be consistent with DOM events