Open Nemo64 opened 10 years ago
Sorry for the late reply :)
Instead of:
Inject.obj('translator-namespaces', {...});
Inject.obj('translator-language', {...});
Can't you just:
Inject.obj('translator', {
namespaces: ...
language: ...
});
Yeah, it could be nice to save on the bytes for cases where multiple / different packages are all using it. I do think though that it's quite nice to so clearly see where all the data comes from, but I guess in production the speed is more important. So yes, this is definitely something we can consider.
Just as an idea, if multiple packages inject stuff into the app there are multiple script tags. Alone my translator package injects 2 things and because of that there are 2 script tags. This also pollutes the global id namespace.
I just thought if it would be possible to combine all object injects into one with an id that is long enough to not interfere with other id's.