* @param {Element} liveList
(liveList)
| 658 | * @param {Element} liveList |
| 659 | */ |
| 660 | function liveListTombstone(liveList) { |
| 661 | const tombstoneId = Math.floor(Math.random() * itemCtr); |
| 662 | logWithoutTimestamp(`trying to tombstone #list-item-${tombstoneId}`); |
| 663 | // We can tombstone any list item except item-1 since we always do a |
| 664 | // replace example on item-1. |
| 665 | if (tombstoneId != 1) { |
| 666 | const item = liveList./*OK*/ querySelector(`#list-item-${tombstoneId}`); |
| 667 | if (item) { |
| 668 | item.setAttribute('data-tombstone', ''); |
| 669 | } |
| 670 | } |
| 671 | } |
| 672 | |
| 673 | /** |
| 674 | * Generate a random number between min and max |
no test coverage detected