Added Perl.noMountIdbfs and updated changelog

master
Hauke D 7 years ago
parent 7b15fc5f5f
commit 62e9b19fe3

@ -3,11 +3,13 @@ WebPerl Changelog
================= =================
not yet released: v0.05-beta 2018-09-02: v0.05-beta
---------------------------- ----------------------------
- Added Perl.addStateChangeListener and deprecated Perl.stateChanged - Added Perl.addStateChangeListener and deprecated Perl.stateChanged
- Added WebPerl::js_new() - Added WebPerl::js_new()
- ... - Added regex_tester.html
- Added Perl.noMountIdbfs
- A few other minor fixes and updates
2018-08-14: v0.03-beta 2018-08-14: v0.03-beta

@ -91,8 +91,8 @@ textarea.samp_ta {
</style> </style>
<script src="webperl.js"></script> <script src="webperl.js"></script>
<!--script src="https://webperlcdn.zero-g.net/v0.03-beta/webperl.js" <!--script src="https://webperlcdn.zero-g.net/v0.05-beta/webperl.js"
integrity="sha256-PWdMdWEx3axFU/29XiOPUwenmlsBM+5f+kc2omoKxPs=" crossorigin="anonymous"></script--> integrity="sha256-0RqUAQu0lcyxE1cPEuyrchvz0YkDITr41FYfTL4Prtk" crossorigin="anonymous"></script-->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" <script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>

@ -27,6 +27,8 @@ var Module;
var Perl = { var Perl = {
trace: false, // user may enable this trace: false, // user may enable this
endAfterMain: false, // user may enable this (before Perl.init) endAfterMain: false, // user may enable this (before Perl.init)
noMountIdbfs: false, // user may enable this (before Perl.start)
WebPerlVersion: 'v0.05-beta',
Util: {}, Util: {},
// internal variables: // internal variables:
initStepsLeft: 2, // Must match number of Perl.initStepFinished() calls! initStepsLeft: 2, // Must match number of Perl.initStepFinished() calls!
@ -51,7 +53,10 @@ var Perl = {
/* TODO: Embedded script should be able to influence the running of Perl, /* TODO: Embedded script should be able to influence the running of Perl,
* the cleanest would probably be to set properties on the Perl object, * the cleanest would probably be to set properties on the Perl object,
* such as Perl.autorun = false or Perl.argv = [...]. */ * such as Perl.autorun = false or Perl.argv = [...]. It should be possible
* for the user to do this for embedded scripts also! Will probably need
* to change the initialization of Perl so that the user can set its properties
* *before* loading webperl.js. */
window.addEventListener("load", function () { window.addEventListener("load", function () {
// Note: to get the content of script tags with jQuery: $('script[type="text/perl"]').html() // Note: to get the content of script tags with jQuery: $('script[type="text/perl"]').html()
@ -223,6 +228,11 @@ Perl.init = function (readyCallback) {
}, },
preRun: [ preRun: [
function () { function () {
if (Perl.noMountIdbfs) {
console.debug("Perl: doing preRun, skipping IndexDB filesystem");
Perl.initStepFinished();
return;
}
console.debug("Perl: doing preRun, fetching IndexDB filesystem..."); console.debug("Perl: doing preRun, fetching IndexDB filesystem...");
try { FS.mkdir('/mnt'); } catch(e) {} try { FS.mkdir('/mnt'); } catch(e) {}
try { FS.mkdir('/mnt/idb'); } catch(e) {} try { FS.mkdir('/mnt/idb'); } catch(e) {}

Loading…
Cancel
Save