Fail to add custom-event emitting for atom


Hello, I tried to handle event when language of system was changed (not language for keypad, whole system language is changed). I success to add and emit event from atom - native level to atom - javascript level. I’ve added small code into atom/browser/, such like:

FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnLanguageChanged(str));

and added OnLanguageChanged into, and use “Emit” like below:

Emit(“language-changed”, locale);

locale is std::string and indicates new locale information.

Event sent from native level was called successfully in Javascript level, but the parameter which I’ve sent as “locale” was not sent properly. Is there other way to pass parameter to Javascript? Please show me the enlightenment idea!