This commit is contained in:
Caleb James DeLisle
2017-08-07 17:23:28 +02:00
parent 65dfd99171
commit 35a55a15ed
6 changed files with 113 additions and 62 deletions

View File

@@ -1,10 +1,9 @@
// 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.
window.addEventListener('message', function (msg) {
var data = msg.data;
var data = JSON.parse(msg.data);
if (data.q !== 'INIT') { return; }
msg.source.postMessage({ txid: data.txid, res: 'OK' }, '*');
if (data.requireConf) { require.config(data.requireConf); }
msg.source.postMessage({ txid: data.txid, content: 'OK' }, '*');
if (data.content && data.content.requireConf) { require.config(data.content.requireConf); }
require(['/common/sframe-boot2.js'], function () { });
});
console.log('boot');
});