OK I'm back online. :)
I created the following page called weblib_demo.html inside the deflated zip-dir (webperl_prebuilt_v0.07-beta.zip) from your webpage:
<!doctype html>
<html lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebPerl <script> Demos</title>
<script type="text/javascript">
function xfetch(url) {
var req = new XMLHttpRequest();
req.open('GET', 'http://localhost:5000/emperl.js', false);
req.send(null);
if(req.status == 200) {
return req.responseText;
} else {
return "FAILED";
}
}
alert(xfetch('http://localhost:5000/emperl.js'));
</script>
<script src="webperl.js"></script>
<!-- Please see the documentation at http://webperl.zero-g.net/using.h
+tml -->
<script type="text/perl">
use warnings;
use strict;
use WebPerl qw/js/;
print js('window.xfetch("http://localhost:5000/emperl.js")');
</script>
<!-- Optional STDOUT/STDERR text area (if you don't use this, output g
+oes to Javascript console) -->
<script>
window.addEventListener("load", function () {
document.getElementById('output')
.appendChild( Perl.makeOutputTextarea() );
});
</script>
</head>
<body>
<p>This is a demo of <a href="http://webperl.zero-g.net" target="_blan
+k">WebPerl</a>!</p>
<div id="output"></div>
<div id="buttons">
<button id="my_button">Testing!</button>
</div>
</body>
</html>
It shows the alert box from JS but the Perl execution blocks the tab till I get a "Tab crashed" message (in German) after a minute or so.
Reproducible in FF and chrome.
I'm suspecting it has to do with error handling of the deprecation warning.
I tried to copy the democode directory directly from github, but calling demo.html creates an endless loop of "Perl initializing" and "ended" messages.
I suppose the webperl versions are not compatible and I need to clone the whole github rep.
That's the messages I get on the console
127.0.0.1 - - [08/Nov/2018:18:33:51 +0100] "GET /webperl.js HTTP/1.1"
+200 13452 "http://localhost:5000/democode/perlrunner.html" "Mozilla/5
+.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:51 +0100] "GET /emperl.js HTTP/1.1" 2
+00 404633 "http://localhost:5000/democode/perlrunner.html" "Mozilla/5
+.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:51 +0100] "GET /emperl.data HTTP/1.1"
+ 200 11957600 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:61.0) Geck
+o/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:51 +0100] "GET /emperl.wasm HTTP/1.1"
+ 200 3743906 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko
+/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:51 +0100] "GET /emperl.wasm HTTP/1.1"
+ 200 3743906 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko
+/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:51 +0100] "GET /democode/perlrunner.h
+tml HTTP/1.1" 200 6168 "http://localhost:5000/democode/demo.html" "Mo
+zilla/5.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko/20100101 Firefox/61
+.0"
127.0.0.1 - - [08/Nov/2018:18:33:52 +0100] "GET /webperl.js HTTP/1.1"
+200 13452 "http://localhost:5000/democode/perlrunner.html" "Mozilla/5
+.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:52 +0100] "GET /emperl.js HTTP/1.1" 2
+00 404633 "http://localhost:5000/democode/perlrunner.html" "Mozilla/5
+.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:52 +0100] "GET /emperl.data HTTP/1.1"
+ 200 11957600 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:61.0) Geck
+o/20100101 Firefox/61.0"
127.0.0.1 - - [08/Nov/2018:18:33:52 +0100] "GET /emperl.wasm HTTP/1.1"
+ 200 3743906 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:61.0) Gecko
+/20100101 Firefox/61.0"
Terminating on signal SIGINT(2)
I think creating a new zip including the "democode" stuff would be helpful for causal tests.