From d4cad47b78739c9f79a191651143bf68aace99df Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 3 Sep 2020 11:51:30 -0700 Subject: [PATCH] Add docstring to init_enable_on_pageload. --- frontends/ycdl_flask/static/js/common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontends/ycdl_flask/static/js/common.js b/frontends/ycdl_flask/static/js/common.js index cbe96a9..7bd9efc 100644 --- a/frontends/ycdl_flask/static/js/common.js +++ b/frontends/ycdl_flask/static/js/common.js @@ -307,6 +307,11 @@ function init_button_with_confirm() common.init_enable_on_pageload = function init_enable_on_pageload() { + /* + To create an input element which is disabled at first, and is enabled when + the DOM has completed loading, give it the disabled attribute and the + class "enable_on_pageload". + */ var elements = Array.from(document.getElementsByClassName("enable_on_pageload")); elements.forEach(function(element) {