(el: HTMLElement, styles: { [prop: string]: string | string[] })
| 665 | // } |
| 666 | |
| 667 | public static addElStyles(el: HTMLElement, styles: { [prop: string]: string | string[] }): void { |
| 668 | if (styles instanceof Object) { |
| 669 | for (const s in styles) { |
| 670 | if (styles.hasOwnProperty(s)) { |
| 671 | if (Array.isArray(styles[s])) { |
| 672 | // support fallback value |
| 673 | (styles[s] as string[]).forEach(val => { |
| 674 | el.style[s] = val; |
| 675 | }); |
| 676 | } else { |
| 677 | el.style[s] = styles[s]; |
| 678 | } |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | public static initEvent<T>(e: DragEvent | MouseEvent, info: { type: string; target?: EventTarget }): T { |
| 685 | const evt = { type: info.type }; |
no outgoing calls
no test coverage detected