Skip to content
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 21 commits into from
Feb 26, 2018
Merged

Webview API prototype 3 #44307

merged 21 commits into from
Feb 26, 2018

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Feb 23, 2018

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 to onDidChangeActiveTextEditor but is also fired when you change webviews. It replaces the old onFocus and onBlur events on the webview itself

  • Adds an editorType identifier on both Webview and TextEditor. This is used with the new onDidChangeActiveEditor api.

  • Adds an onDispose event to webviews. This is fired when a webview is closed by the user

  • Makes Webview.options readonly

  • Perist webview state when the editor group changes. This is enabled for all webviews, not just those with keepAlive set. Html previews that use TextDocumentContentProvider are created and destoryed when changing groups

    cat counter

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 mjbvz self-assigned this Feb 26, 2018
@mjbvz mjbvz added this to the February 2018 milestone Feb 26, 2018
@mjbvz mjbvz merged commit 2038b8f into master Feb 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants