isorender/dom-shims

Node.js polyfill for rendering Panel components without a browser. Makes the following objects globally available: Comment, document, Document, Element, HTMLElement, Node, requestAnimationFrame, Text. Most of the available DOM API functionality is provided by html-element, with some patches for the Web Components API.
Source:
Example

Rendering app HTML to stdout

import 'panel/isorender/dom-shims';
import { Component } from 'panel';
customElements.define('my-widget', class extends Component {
  // app definition
});
const myWidget = document.createElement('my-widget');
document.body.appendChild(myWidget);
requestAnimationFrame(() => console.log(myWidget.outerHTML));