lbondaryk/PlayerProto — pull request #86 by ysahnpark (2013-08-08 20:25:06+00:00)
Title: Youngsuk

MessageBroker now implements a dispose() method that releases used references as well as removes event listener. The dispose() is useful when using multiple instances of MessageBroker in unit test avoiding interference.

Now you will need to explicitly invoke the initialize() method. as an optional parameter a logLevel can be passed. Example

MessageBroker mb = new MessageBroker();
mb.initialize({logLevel:1}); // Default is zero, means no logging (to console)

Besides Logging, message counter was added to the MessageBroker for the unit test purpose.

/PrototypeMessageBroker now uses shared messagebroker.js and eventmanager_ex.js libraries (under /js folder)

js/messagebroker.js and js/eventmanager_ex.js have unit tests.

File test/iframe_tests.html includes those unit tests. The main reason for using separate file is because they use iframes, and thus require to
be accessed from web server, opening directly from local file will cause
"Not allowed to load local resource: file://.../js/eventmanager_ex.js" error.