From https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/661995/:
We like to keep the number of modules as small as possible - which we could also do separate files with a dispatcher. I personally find separate files preferable, but I was thinking we should untangle the modules in a separate commit. Does that sound OK?
The js in modules/ext.securepoll.htmlform.js manages two independent features and can be split up as mentioned. An example of this architecture can be found in IPInfo.