The way it is now is not safe, but we could also remove the `type` attribute setting.