[Pas2js] Initial resource linking support added.
warleyalex
warleyalex at yahoo.com.br
Wed Oct 30 03:48:46 CET 2019
Hey, I added to getHTML method to rtl, and modified the js output, and did a
quick test on Firefox using this getHTML to load async html resources and
another the original using the base64 enconding.
getHTML: async function(u) {
var f;
f = await fetch(u);
return await f.text();
}
rtl.addResource({name: "testres", unit: "consoledemo", format: "text/html",
encoding: "text", data: "", RC: rtl.getHTML("testres.html")});
rtl.addResource({name: "curtain", unit: "consoledemo", format: "text/html",
encoding: "text", data: "", RC: rtl.getHTML("curtain.html")});
rtl.addResource({name: "testb", unit: "unitb", format: "text/html",
encoding: "text", data: "", RC: rtl.getHTML("testb.html")});
rtl.addResource({name: "testa", unit: "unita", format: "text/html",
encoding: "text", data: "", RC: rtl.getHTML("testa.html")});
Encoding: base64 (original)
=================
3 requests
63.07KB resources / 16.68KB transferred
96ms = Finish
23ms = DOMContentLoaded
28ms = Loaded
Encoding: text (async requests)
====================
7 requests
62.44KB resources / 16.65KB transferred
81ms = Finish
26ms = DOMContentLoaded
34ms = Loaded
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list