mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
notebooks: remove impure renderer API
This removes the initial notebook renderer API and keeps the 'pure' renderer API described in #102644 and hacked-in previously. Remaining work in this area, in no particular order: - Add messaging context to postMessage as requested by Don (API proposal TBA) - Cleanups around how state is managed internally in the backLayerWebView - Deprecate the renderer `viewType` in favor of calling it the `id` or `rendererId` Q: I kept around some of the "transform" functions since the mime type picking happens there, not sure if there's a better place for this to happen now, or whether these methods should simply be renamed.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
import { smokeTestActivate } from './notebookSmokeTestMain';
|
||||
|
||||
export function activate(context: vscode.ExtensionContext): any {
|
||||
@@ -117,16 +116,4 @@ export function activate(context: vscode.ExtensionContext): any {
|
||||
},
|
||||
cancelCellExecution: async (_document: vscode.NotebookDocument, _cell: vscode.NotebookCell) => { }
|
||||
}));
|
||||
|
||||
const preloadUri = vscode.Uri.file(path.resolve(__dirname, '../src/customRenderer.js'));
|
||||
context.subscriptions.push(vscode.notebook.registerNotebookOutputRenderer('notebookCoreTestRenderer', {
|
||||
mimeTypes: [
|
||||
'text/custom'
|
||||
]
|
||||
}, {
|
||||
preloads: [preloadUri],
|
||||
render(_document: vscode.NotebookDocument, _request: vscode.NotebookRenderRequest): string {
|
||||
return '<div>test</div>';
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user