|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
// Stage 0, this gets cached which means we can't change it. boot2-sframe.js is changable.
|
|
|
|
|
// Note that this file is meant to be executed only inside of a sandbox iframe.
|
|
|
|
|
;(function () {
|
|
|
|
|
var req = JSON.parse(decodeURIComponent(window.location.hash.substring(1)));
|
|
|
|
|
var afterLoaded = function (req) {
|
|
|
|
|
req.cfg = req.cfg || {};
|
|
|
|
|
if (req.pfx) {
|
|
|
|
|
req.cfg.onNodeCreated = function (node /*, config, module, path*/) {
|
|
|
|
@ -27,4 +27,14 @@ var onReply = function (msg) {
|
|
|
|
|
require(['/common/sframe-boot2.js'], function () { });
|
|
|
|
|
};
|
|
|
|
|
window.addEventListener('message', onReply);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var intr = setInterval(function () {
|
|
|
|
|
try {
|
|
|
|
|
var req = JSON.parse(decodeURIComponent(window.location.hash.substring(1)));
|
|
|
|
|
clearInterval(intr);
|
|
|
|
|
afterLoaded(req);
|
|
|
|
|
} catch (e) { console.error(e); }
|
|
|
|
|
}, 100);
|
|
|
|
|
|
|
|
|
|
}());
|