( element: HTMLElement, enable: boolean, importantProperties?: Set<string>, )
| 69 | * @docs-private |
| 70 | */ |
| 71 | export function toggleVisibility( |
| 72 | element: HTMLElement, |
| 73 | enable: boolean, |
| 74 | importantProperties?: Set<string>, |
| 75 | ) { |
| 76 | extendStyles( |
| 77 | element.style, |
| 78 | { |
| 79 | position: enable ? '' : 'fixed', |
| 80 | top: enable ? '' : '0', |
| 81 | opacity: enable ? '' : '0', |
| 82 | left: enable ? '' : '-999em', |
| 83 | }, |
| 84 | importantProperties, |
| 85 | ); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Combines a transform string with an optional other transform |
no test coverage detected