dist/crocodoc.viewer.js
function broadcast(messageName, data) {
            var i, len, instance, messages;
            for (i = 0, len = instances.length; i < len; ++i) {
                instance = instances[i];
                if (!instance) {
                    continue;
                }
                messages = instance.messages || [];

                if (util.inArray(messageName, messages) !== -1) {
                    if (util.isFn(instance.onmessage)) {
                        instance.onmessage.call(instance, messageName, data);
                    }
                }
            }
        }
function broadcast(messageName, data) {
            var i, len, instance, messages;
            for (i = 0, len = instances.length; i < len; ++i) {
                instance = instances[i];
                if (!instance) {
                    continue;
                }
                messages = instance.messages || [];

                if (util.inArray(messageName, messages) !== -1) {
                    if (util.isFn(instance.onmessage)) {
                        instance.onmessage.call(instance, messageName, data);
                    }
                }
            }
        }
function broadcast ( messageName , data ) { var i , len , instance , messages ; for ( i = 0 , len = instances . length ; i < len ; ++ i ) { instance = instances [ i ] ; if ( ! instance ) { continue ; } messages = instance . messages || [ ] ; if ( util . inArray ( messageName , messages ) !== - 1 ) { if ( util . isFn ( instance . onmessage ) ) { instance . onmessage . call ( instance , messageName , data ) ; } } } }
Broadcast a message to all components in this scope that have registered
a listener for the named message type
@param  {string} messageName The message name
@param  {any} data The message data
@returns {void}
@private
Broadcast a message to all components in this scope that have registered a listener for the named message type