Added view type getter and ensured element render events would get the proper type

Need a new line after this.