@@ -27,6 +27,8 @@ var Module;
2727var Perl = {
2828 trace : false , // user may enable this
2929 endAfterMain : false , // user may enable this (before Perl.init)
30+ noMountIdbfs : false , // user may enable this (before Perl.start)
31+ WebPerlVersion : 'v0.05-beta' ,
3032 Util : { } ,
3133 // internal variables:
3234 initStepsLeft : 2 , // Must match number of Perl.initStepFinished() calls!
@@ -51,7 +53,10 @@ var Perl = {
5153
5254/* TODO: Embedded script should be able to influence the running of Perl,
5355 * the cleanest would probably be to set properties on the Perl object,
54- * such as Perl.autorun = false or Perl.argv = [...]. */
56+ * such as Perl.autorun = false or Perl.argv = [...]. It should be possible
57+ * for the user to do this for embedded scripts also! Will probably need
58+ * to change the initialization of Perl so that the user can set its properties
59+ * *before* loading webperl.js. */
5560
5661window . addEventListener ( "load" , function ( ) {
5762 // Note: to get the content of script tags with jQuery: $('script[type="text/perl"]').html()
@@ -223,6 +228,11 @@ Perl.init = function (readyCallback) {
223228 } ,
224229 preRun : [
225230 function ( ) {
231+ if ( Perl . noMountIdbfs ) {
232+ console . debug ( "Perl: doing preRun, skipping IndexDB filesystem" ) ;
233+ Perl . initStepFinished ( ) ;
234+ return ;
235+ }
226236 console . debug ( "Perl: doing preRun, fetching IndexDB filesystem..." ) ;
227237 try { FS . mkdir ( '/mnt' ) ; } catch ( e ) { }
228238 try { FS . mkdir ( '/mnt/idb' ) ; } catch ( e ) { }
0 commit comments