/**
 *
 * @param {HTMLElement} domElement
 * @param {boolean} visibility
 */
export function setElementVisibility(domElement, visibility) {
    const style = domElement.style;

    if (!visibility) {
        style.display = 'none';
    } else {
        // remove display property, this allows style re-flow whereby previous display type is assumed
        style.removeProperty('display');
    }
}