microsoft / microsoft/vscode-livepreview

Injected script should be aware of whether it's inside webview or not

Open
#457 0 comments 0 reactions 1 assignee View on GitHub

@andreamah is already working on this.

Since Feb 27, 2023.

debt
Dominant language
TypeScript
Stars
596
Forks
119
Avg merge
1d 4m
Merged PRs (30d)
5

Description

Looking at the injected script, a lot of setup doesn't actually need to happen (ie: overriding console) if you're in a browser window. Knowing whether this is being loaded from the embedded preview would also help with only refreshing if the tab is visible https://github.com/microsoft/vscode-livepreview/issues/454

For perf/functionality reasons, we should consider having some initialization to see if an injected script is linked to a panel in the editor.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.