diff --git a/src/sandbox-console.js b/src/sandbox-console.js index 31f024a..758e20d 100644 --- a/src/sandbox-console.js +++ b/src/sandbox-console.js @@ -68,6 +68,17 @@ var Sandbox = { } }, + log: function(val) { + var history = this.get('history'); + var item = { + command : val, + resultHidden : true + }; + history.push(item); + this.set({ history : history}).change(); + this.save(); + }, + // Adds a new item to the history addHistory: function(item) { var history = this.get('history'); @@ -92,6 +103,7 @@ var Sandbox = { iframeSetup : function() { this.sandboxFrame = $('