Having the function in this template didn't really add much and is an obstacle to using a pure HTML template format (.htmlt files)
Preparing to support JS modules generated from the new .htmlt format (widget HTML templates).