1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-13 10:06:23 +02:00

stop main frame updation in detached mode. fixes #223

This commit is contained in:
Kushagra Gour
2017-10-25 01:03:45 +05:30
parent 214f0d89b4
commit a034fc6aae

View File

@ -1065,13 +1065,15 @@ globalConsoleContainerEl
// CSP from affecting it. // CSP from affecting it.
writeFile('script.js', blobjs, function() { writeFile('script.js', blobjs, function() {
writeFile('preview.html', blob, function() { writeFile('preview.html', blob, function() {
frame.src = const frameSrc =
'filesystem:chrome-extension://' + 'filesystem:chrome-extension://' +
chrome.i18n.getMessage('@@extension_id') + chrome.i18n.getMessage('@@extension_id') +
'/temporary/' + '/temporary/' +
'preview.html'; 'preview.html';
if (scope.detachedWindow) { if (scope.detachedWindow) {
scope.detachedWindow.postMessage(frame.src, '*'); scope.detachedWindow.postMessage(frame.src, '*');
} else {
frame.src = frameSrc;
} }
}); });
}); });