Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** @class
- Mixin to allow for safe console actions
- @author Colin Campbell
- @version 0.1
- @since 0.1
- */
- SC.Console = SC.Object.extend({
- /* Console Mixin */
- // ..........................................................
- // PROPERTIES
- //
- /**
- Computed property that checks for the existence of a console
- within the web browser
- @property {Boolean}
- */
- exists: function() {
- return typeof(this._console) !== 'undefined' && this._console != null;
- }.property().cacheable(),
- // ..........................................................
- // INTERNAL SUPPORT
- //
- /**
- @private
- Enables ability to override the console object in order to test
- @property {Object}
- */
- _console: console
- });
Add Comment
Please, Sign In to add comment