mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-21 03:36:14 +01:00
Remove onmessage wrapper
This commit is contained in:
@@ -89,13 +89,8 @@
|
||||
};
|
||||
|
||||
const onMessage = (message) => {
|
||||
if (enableWrappedPostMessage) {
|
||||
// Modern webview. Forward wrapped message
|
||||
ipcRenderer.sendToHost('onmessage', message.data);
|
||||
} else {
|
||||
// Old school webview. Forward exact message
|
||||
ipcRenderer.sendToHost(message.data.command, message.data.data);
|
||||
}
|
||||
// Old school webview. Forward exact message
|
||||
ipcRenderer.sendToHost(message.data.command, message.data.data);
|
||||
};
|
||||
|
||||
var isHandlingScroll = false;
|
||||
@@ -191,7 +186,7 @@
|
||||
acquired = true;
|
||||
return Object.freeze({
|
||||
postMessage: function(msg) {
|
||||
return originalPostMessage(msg, '*');
|
||||
return originalPostMessage({ command: 'onmessage', data: msg }, '*');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user