Can I safely do this:
export const tr = browser.i18n.getMessage;
To have a short function name for translating?
I know this will break the “
this” inside the
getMessage, but if it’s not using it, it will work just fine.
So my questions:
Is this a good idea in the first place?
Is this an implementation detail that I can’t rely on?
Would it also work on other
browser API, like
tabs, etc…? (I will probably not use it, just curious).
Maybe there is a better way using Proxy API?