Dynamically assign a variable depending on window and DOM-element in TypeScript

join shbcf.ru