It occurred to me that we should probably check to see what happens if a checkbox already has it's own custom onclick/onchange event handling. I think we'd end up paving right over it. I thought to create that scenario locally to see if we should check for it and return early (before replacing the checkbox), but I ran out of time.
Questions:
- Is there wmf code with custom onClick handlers for checkboxes?
- possible approaches to search:
- Link for getPreferences search: https://codesearch.wmcloud.org/search/?q=function%20onGetPreferences&i=nope&files=&excludeFiles=&repos=
- there doesn't seem to be a handy to do a logical `and` for files also containing 'check' on different lines; perhaps searching github would work better
- traversing the dom on en wikipedia desktop preferences and trying to identify event handlers would be another approach
- If so, how does our toggle code impact these handlers?
- it might actually be most expedient to just implement a custom click handler in an extension and see what happens.