cryptpad/www/common/sframe-boot.js
Caleb James DeLisle 4b25ab80d6 wip
2017-08-09 14:45:39 +02:00

9 lines
No EOL
542 B
JavaScript

// 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 = JSON.parse(msg.data);
if (data.q !== 'INIT') { return; }
msg.source.postMessage(JSON.stringify({ txid: data.txid, content: 'OK' }), '*');
if (data.content && data.content.requireConf) { require.config(data.content.requireConf); }
require(['/common/sframe-boot2.js'], function () { });
});