-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Webview API prototype 3 #44307
Merged
Merged
Webview API prototype 3 #44307
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 23, 2018
Part of #43713 Third try at refining the webview api. This pass reworks #44165. Major changes: - Adds an `id` field to webviews. The id is provided by the extension and identifies the webview. It is used with the new event handling apis. - Adds a new `onDidChangeActiveEditor` api. This is similar to `onDidChangeActiveTextEditor` but is also fired when you change webviews. It replaces the old `onFocus` and `onBlur` events on the webview itself - Adds an `onDispose` event ot webviews. This is fired when a webview is closed by the user - Perist webview state when the editor group changes. This is enabled for all webviews, not just those with keep alive.
Old behavior was correct
mjbvz
force-pushed
the
webview-api-pass3
branch
from
February 26, 2018 18:03
9480524
to
49ef0ec
Compare
This was referenced Feb 26, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #43713
Third try at refining the webview api. This pass reworks #44165. Major changes:
Adds a
uri
field to webviews. This is provided by the extension and identifies the webview. It is used with the new event handling apis.Adds a new
onDidChangeActiveEditor
api. This is similar toonDidChangeActiveTextEditor
but is also fired when you change webviews. It replaces the oldonFocus
andonBlur
events on the webview itselfAdds an
editorType
identifier on bothWebview
andTextEditor
. This is used with the newonDidChangeActiveEditor
api.Adds an
onDispose
event to webviews. This is fired when a webview is closed by the userMakes
Webview.options
readonlyPerist webview state when the editor group changes. This is enabled for all webviews, not just those with
keepAlive
set. Html previews that useTextDocumentContentProvider
are created and destoryed when changing groups