Created
November 24, 2010 10:39
-
-
Save bgerrissen/713461 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event mechanism Require JS (modulejs variant) | |
*Methods* | |
- require.listen( eventType , listener ) | |
- require.deafen( eventType , listener ) | |
- require.notify( eventType , dataObject , messageString ) | |
*Events* | |
loading // fires when a load starts | |
loaded // fires when a load completes | |
complete // fires when a module completes | |
error // fires on fatal errors/exceptions | |
warning // fires on non-fatal errors and decisions | |
*Event object* | |
{ | |
type : eventType, | |
currentListener : listener , // current listener | |
deafen : function(){}, // delegates to require.deafen passing .type and .currentListener | |
record : record, | |
message : message, // error or warning message, otherwise copy of event type | |
error : exceptionObject // object on exception, otherwise null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment