Core Docs | Additional Modules Docs
@Description: Write to the sb.consol in white color text on a light blue background. You should reserve this for debugging non-error messages. Only works if sb.debug =1 which it is by default otherwise debugging is turned off.
@File: developer.js
@Param: String message The message to write to the consol in debug style
@Example:sb.consol.debug('You should specify the height of the widget in pixels');
@Description: Dumps an objects properties to the sb.consol
@File: developer.js
@Param: Object/String str Object reference of a string that references an object by ID e.g. '#mYDiv'
@Example:var myObj = {
name: 'paul,
day : 'monday'
};
sb.consol.dump(myObj);
@Description: Write to the sb.consol in white color text on a red background. You should reserve this for debugging error messages. Only works if sb.debug =1 which it is by default otherwise debugging is turned off.
@File: developer.js
@Param: String message The message to write to the consol in error style
@Example:sb.consol.error('OMG there was a horrible error in when trying to make the top div');
@Description: Write to the sb.consol in red color text on a yellow background. You should reserve this for debugging warning messages. Only works if sb.debug =1 which it is by default otherwise debugging is turned off.
@File: developer.js
@Param: String message The message to write to the consol in warning style
@Example:sb.consol.warning('You should specify the height of the widget in pixels');
@Description: Sends surebert debugging info to the surebert consol. It shows window size, agent, version, flashplayer and cookies. This only fires after the document is finsihed loading. If you call it before, it will wait until the document has loaded before firing.
@File: developer.js
@Example:sb.debugMe();
@Description: Creates a new debugging color scheme for use with the sb.consol debugging system.
@File: developer.js
@Param: String color The text color of the debug message produced with the resulting function
@Param: String backgroundColor The background color of the debug message produced with the resulting function
@Example:var paulDebugStyle = new sb.debugStyle('red', 'yellow');
paulDebug('hello world');
//this debugs the message 'hello world' to the surebert debug consol in red text on a yellow background.
@Description: Alerts the properties and their values for an object
@File: developer.js
@Param: Object o The object to alert the properties of
@Example:var o = {name : 'paul, language : 'javascript'};
sb.objects.alert({o});
@Description: The consol is a cross browser debugging area that allows the programmer and surebert to debug messages to the screen in the handy dandy surebert consol. The consol is a element node that gets inserted at the top of the page before all other content. Messages can be written with difference background colors to speficiy what type of message sthey are. By default red is an error, orange is a warning, green is a log message and pink is a debug message. You can make you own combos very easily. ATTENTION: If you specify a function called sb.consol.onlog - the strings that would normally be written to the consol, during debugging are redirected to the function with the string passed as the only argument.
@File: developer.js
@Example://this would override writing to the consol with your own function whenever sb.consol functions were called.
sb.consol.onlog = function(str){
alert(str);
}
@Description: Determines the time it takes to run a function in milliseconds
@File: developer.js
@Param: Function func The function to time
@Return: Number The number of milliseconds required to run the function.
@Example:function getImages(){
var images = sb.$('img');
}
var timeItTakes = sb.performace(getImages);