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:
@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user