Refactor the old code, modularize it, and split a large js file into many js files. The original namespace object has been split into js files. So where should the events that were previously bound to the object be bound now? Is it written as a function and can be called when an event is triggered?
I don’t quite understand the question, but do you think the observer pattern is feasible?