Skip to content

Commit 65edc46

Browse files
committed
Update index.html
1 parent f692d4e commit 65edc46

File tree

1 file changed

+7
-9
lines changed
  • barcode-scanner-api-samples/scan-multiple-barcodes/batch-inventory

1 file changed

+7
-9
lines changed

barcode-scanner-api-samples/scan-multiple-barcodes/batch-inventory/index.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,13 @@
8282
resultListNode.innerText = "";
8383
const countResult = countByFormat(result.barcodeResults);
8484
for (let formatString in countResult) {
85-
const itemLi = document.createElement("li");
86-
const itemFormatSpan = document.createElement("span");
87-
const itemCountSpan = document.createElement("span");
88-
itemFormatSpan.className = "format";
89-
itemCountSpan.className = "decode-count";
90-
itemFormatSpan.innerText = formatString;
91-
itemCountSpan.innerText = countResult[formatString];
92-
itemLi.append(itemFormatSpan, itemCountSpan);
93-
resultListNode.append(itemLi);
85+
const nodeLiStr = `
86+
<li>
87+
<span class="format">${formatString}</span>
88+
<span class="decode-count">${countResult[formatString]}</span>
89+
</li>
90+
`;
91+
resultListNode.insertAdjacentHTML("beforeend", nodeLiStr);
9492
}
9593
}
9694

0 commit comments

Comments
 (0)