class_docstr: Custom HTML iframe widget for trame viewer.
class_docstr_tok: ["Custom","HTML","iframe","widget","for","trame","viewer","."]
docstr: Initialize.
docstr_tok: ["Initialize","."]
code: def __init__(
      self,
      viewer,
      src,
      width=None,
      height=None,
      iframe_attrs=None,
      **kwargs,
  ):
      """Initialize."""
      if HTML is object:
          raise ImportError("Please install `ipywidgets`.")
      # eventually we could maybe expose this, but for now make sure we're at least
      # consistent with matplotlib's color (light gray)
  
      if iframe_attrs is None:
          iframe_attrs = {}
  
      border = "border: 1px solid rgb(221,221,221);"
  
      iframe_attrs = {
          **iframe_attrs,
          "src": src,
          "class": "pyvista",
          "style": f"width: {width}; height: {height}; {border}",
      }
  
      iframe_attrs_str = " ".join(
          f'{key}="{str(value)}"' for key, value in iframe_attrs.items()
      )
  
      value = f"<iframe {iframe_attrs_str}></iframe>"
  
      super().__init__(value, **kwargs)
      self._viewer = viewer
      self._src = src
  
imports: import asyncio
  import logging
  import os
  import warnings
  from trame.widgets import html, vtk, vuetify, vuetify3
  import pyvista
  from pyvista.trame.ui import UI_TITLE, get_viewer
  from pyvista.trame.views import CLOSED_PLOTTER_ERROR, get_server
label_desc: Use image node_id 1 to create a new Widget object from inherited base classes: HTML with example: obj = Widget(viewer, src, width, height, iframe_attrs)