UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

15 lines (14 loc) 410 B
/** * * @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'); } }