i was making the dynamic element by using innerhtml, but i did not get the element id dynamically. //console value i want to get the id value -> #cardvideo_localstream Answer There are two ways: You can get dynamic id by retrieving tag-name or class-name as you prefer. But the structure should be fixed. You need to parse result of output(e.g
Tag: htmlcollection
Typescript,’NodeListOf’ is not an array type or a string type
Converting my JS to TS strict mode. The following syntax looks fine to me but TS is complaining in the for loop on allSubMenus with: What am I missing? Answer You need to set the target compiler option to es6 or higher for NodeListOf<T> to be iterable.