Socket
Socket
Sign inDemoInstall

vscode-notebook-error-overlay

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-notebook-error-overlay

Provides a notebook-aware error overlay in VS Code notebooks built with the webpack-dev-server


Version published
Weekly downloads
66
decreased by-30.53%
Maintainers
1
Weekly downloads
 
Created
Source

vscode-notebook-error-overlay

This provides a Notebook-aware error overlay, somewhat like that which create-react-app provides. This is used in our renderer starter.

Usage

First, install it:

npm i --save-dev vscode-notebook-error-overlay

Then in your notebook's render function:

import errorOverlay from 'vscode-notebook-error-overlay';

function renderOutput(domNode) {
  // When you render in an element, install the overlay in it:
  errorOverlay.install(domNode);

  renderMyOutput(domNode); // then render your output
}

You can alternatively install and render in a wrapped function, which has the advantage of displaying any errors synchronously thrown from the render() function:

import errorOverlay from 'vscode-notebook-error-overlay';

const renderOutput = domNode => errorOverlay.wrap(domNode, () => {
  renderMyOutput(domNode);
});

If any build errors happen when running from the webpack-dev-server, an appropriate error message will be shown wherever the overlay is installed.

FAQs

Package last updated on 10 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc