add hook for chat data
This commit is contained in:
@ -24,9 +24,15 @@
|
||||
// the Leaflet CircleMarker for the portal in "portal" var.
|
||||
// portalDetailsUpdated: fired after the details in the sidebar have
|
||||
// been (re-)rendered
|
||||
// publicChatDataAvailable: this hook runs after data for any of the
|
||||
// public chats has been received and processed, but not
|
||||
// yet been displayed. The data hash contains both the un-
|
||||
// processed raw ajax response as well as the processed
|
||||
// chat data that is going to be used for display.
|
||||
|
||||
window._hooks = {}
|
||||
window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated'];
|
||||
window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated',
|
||||
'publicChatDataAvailable'];
|
||||
|
||||
window.runHooks = function(event, data) {
|
||||
if(VALID_HOOKS.indexOf(event) === -1) throw('Unknown event type: ' + event);
|
||||
|
Reference in New Issue
Block a user