Fix indentation and use const where preferable
All checks were successful
deployment-on-pull-request / deployment (pull_request) Successful in 1m17s
All checks were successful
deployment-on-pull-request / deployment (pull_request) Successful in 1m17s
This commit is contained in:
parent
9f95e704b9
commit
c9cda14f38
1 changed files with 8 additions and 8 deletions
|
@ -67,19 +67,19 @@ function knownTypes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get location in document.
|
// Get location in document.
|
||||||
let known_types = document.getElementById('knowntypes');
|
const known_types = document.getElementById('knowntypes');
|
||||||
known_types.textContent = `Known types: `;
|
known_types.textContent = `Known types: `;
|
||||||
|
|
||||||
// Create a button for every known type.
|
// Create a button for every known type.
|
||||||
for (let label of Object.keys(map).sort()) {
|
for (let label of Object.keys(map).sort()) {
|
||||||
btn = document.createElement('button');
|
btn = document.createElement('button');
|
||||||
btn.setAttribute('type', 'button');
|
btn.setAttribute('type', 'button');
|
||||||
btn.textContent = label;
|
btn.textContent = label;
|
||||||
btn.addEventListener('click', function() {
|
btn.addEventListener('click', function() {
|
||||||
document.getElementById('type').value = label;
|
document.getElementById('type').value = label;
|
||||||
});
|
});
|
||||||
|
|
||||||
known_types.appendChild(btn);
|
known_types.appendChild(btn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue