overleaf/services/web/frontend/js/features/utils/disableElement.js
Jakob Ackermann c9e22f7ddf Merge pull request #5190 from overleaf/jpa-sso-oauth-de-ng
[web] de-ng sso/oauth/institutional account linking pages

GitOrigin-RevId: 50718cefff68142431aa411cb4f8644a3d8ab93f
2021-09-28 08:03:31 +00:00

9 lines
226 B
JavaScript

export function disableElement(el) {
el.setAttribute('disabled', '')
el.setAttribute('aria-disabled', 'true')
}
export function enableElement(el) {
el.removeAttribute('disabled')
el.removeAttribute('aria-disabled')
}