(e)
| 3 | let lastChecked; |
| 4 | |
| 5 | function handleCheck(e) { |
| 6 | let inBetween = false; |
| 7 | |
| 8 | if (e.shiftKey && this.checked) { |
| 9 | checkboxes.forEach((checkbox) => { |
| 10 | console.log(checkbox); |
| 11 | if (checkbox === this || checkbox === lastChecked) { |
| 12 | inBetween = !inBetween; |
| 13 | console.log("Starting to check"); |
| 14 | } |
| 15 | |
| 16 | if (inBetween) { |
| 17 | checkbox.checked = true; |
| 18 | } |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | lastChecked = this; |
| 23 | } |
| 24 | |
| 25 | checkboxes.forEach((checkbox) => |
| 26 | checkbox.addEventListener("click", handleCheck) |
nothing calls this directly
no outgoing calls
no test coverage detected