Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
Issue waterbearlang#51: for now, catch errors and put in an alert. I'…
Browse files Browse the repository at this point in the history
…m open to suggestions for better error reporting.
  • Loading branch information
delza committed Dec 28, 2011
1 parent ac239ab commit eb45386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jQuery.fn.extend({
wrap_script: function(){
// wrap the top-level script to prevent leaking into globals
var script = this.pretty_script();
return 'var global = new Global();(function($){var local = new Local();' + script + '})(jQuery);';
return 'var global = new Global();(function($){var local = new Local();try{' + script + '}catch(e){alert(e);}})(jQuery);';
},
pretty_script: function(){
return js_beautify(this.map(function(){ return $(this).extract_script();}).get().join(''));
Expand Down

0 comments on commit eb45386

Please sign in to comment.