CMS-1653 Improve typescript HTMLElement api
Made name used for prefixing id optional, when null no id is printed