File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
barcode-scanner-api-samples/scan-multiple-barcodes/batch-inventory Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments