Skip to content

Webview API prototype 3 - #44307

Merged
Matt Bierner (mjbvz) merged 21 commits into
masterfrom
webview-api-pass3
Feb 26, 2018
Merged

Matt Bierner (mjbvz) merged 21 commits into
masterfrom
webview-api-pass3

Conversation

@mjbvz

@mjbvz Matt Bierner (mjbvz) commented Feb 23, 2018 •

Copy link
Copy Markdown
Contributor

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

Matt Bierner added 20 commits February 26, 2018 10:02
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
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.

2 participants