Closed kbuffington closed 6 years ago
The secondary aim of this object is to avoid property name collisions, which is achieved by having only a single global g_properties. If you create several objects of this type, you lose this functionality.
Good point, I'd overlooked that. What about creating a Properties singleton? I'm thinking something like this pattern: https://stackoverflow.com/a/4842961/911192
Everything would share the same underlying object in that case, but it could be referenced elsewhere using different object names.
What about creating a Properties singleton?
Sure, why not? =)
This method is just ridiculously convenient, and I wanted to use it elsewhere so I didn't have to put my theme's properties in Common.js.