/* * When two or more script files contain a * window.onload function only the last one * listed in the html file will run. That * is because the 'window.onload' variable is * assigned to the last function encountered * in the loading process. * * So to facilitate multiple 'window.onload' * functions we must use the 'load' event to * call them. * * kjr-2017.03.17 */ window.addEventListener('load', onloadMain); function onloadMain() { //console.log('In main.js onload.'); } function closeDetail(detailsElement) { detailsElement.removeAttribute("open"); window.location = '#' + detailsElement.id; }