Previously, each call to a Perl sub would "eval" a bunch of JS code,
this allows simplification of that "eval" by providing Perl.dispatch,
on which a JS "bind" can be done.
Although this should fix the "null" appearing in the generated
"baseurl", opening the pages via file:// will most likely still not work
due to the Same-Origin Policy.