// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import { Widget } from '@lumino/widgets'; /** * The default mime type for the extension. */ const MIME_TYPE = 'application/vnd.jupyterlab.certificate'; /** * The class name added to the extension. */ const CLASS_NAME = 'mimerenderer-certificate'; /** * A widget for rendering certificate. */ export class OutputWidget extends Widget { /** * Construct a new output widget. */ constructor(options) { super(); this._mimeType = options.mimeType; this.addClass(CLASS_NAME); } /** * Render certificate into this widget's node. */ renderModel(model) { let data = model.data[this._mimeType]; // this.node.textContent = JSON.stringify(data); let given = data['given']; let event = data['event']; this.node.innerHTML = `