I have a form with a table select form element that uses a custom table to fill in the default values. This means that all checkboxes could be ticked already on page load, but currently this is not conveyed in the select all checkbox. Instead, on page load the select all checkbox is unticked and to deselect all of them means clicking it twice (bad user experience). This would be fairly easy to add into tableselect.js. Currently the element is hardcoded to be:
<input type="checkbox" class="form-checkbox" />in the jquery .prepend(). We could instead loop over the child checkboxes first and add the checked attribute on load.