Add docstring to init_enable_on_pageload.

This commit is contained in:
voussoir 2020-09-03 11:51:30 -07:00
parent 8dd7fb987d
commit d4cad47b78

View file

@ -307,6 +307,11 @@ function init_button_with_confirm()
common.init_enable_on_pageload = common.init_enable_on_pageload =
function 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")); var elements = Array.from(document.getElementsByClassName("enable_on_pageload"));
elements.forEach(function(element) elements.forEach(function(element)
{ {