You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, when a message is broadcast(), only modules can listen for it. That works fine when you're dealing with just T3 components, but sometimes there are non-T3 components that need to be informed of messages as well.
We can implement this quite simply by firing a message event when broadcast() is called. This would allow non-T3 components to do the following:
Box.Application.on('message',function(event){if(event.data.message==='some_specific_message'){// do something}});
So event.data.message is the message name and event.data.messageData is whatever would be passed in as the second argument to onmessage in a module.
The text was updated successfully, but these errors were encountered:
Right now, when a message is
broadcast()
, only modules can listen for it. That works fine when you're dealing with just T3 components, but sometimes there are non-T3 components that need to be informed of messages as well.We can implement this quite simply by firing a
message
event whenbroadcast()
is called. This would allow non-T3 components to do the following:So
event.data.message
is the message name andevent.data.messageData
is whatever would be passed in as the second argument toonmessage
in a module.The text was updated successfully, but these errors were encountered: