-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add static preloads notebook contribution #163512
Conversation
Thanks for this change, I will have a look at this today and get back to you. Should be fine the way it is. |
|
||
export interface INotebookPreloadContribution { | ||
readonly [NotebookPreloadContribution.type]: string; | ||
readonly [NotebookPreloadContribution.entrypoint]: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these scripts have access to the messaging channel, i.e. can the webview scripts send messages back to the exension host?
From what I can tell they can, however I'm not sure how the extension can listen to these messages, as we don't have an identifier to setup a comms channel.
Note: This was never a requirement, just curious about the capabilities.
Thanks for this change, I will have a look at this today and get back to you. Should be fine the way it is. |
Is the requirement to just expose an |
src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts
Show resolved
Hide resolved
Thanks @mjbvz |
Thanks for testing @DonJayamanne! I'll merge this initial version and we can keep iterating on it next week |
For #163511
@DonJayamanne Right now I'm forcing all of these static preloads to be loaded as modules that export an activate function. You can then use this to load additional scripts into the webview
If we need to, we can instead explore loading these preloads as non-module scripts. However these would only be evaluated in the global scope. I do not want to support the old school kernel preload API where we injected global variables with context info