@finos/perspective-viewer
Version:
The `<perspective-viewer>` Custom Element, frontend for Perspective.js
43 lines (27 loc) • 1.56 kB
Markdown
# @finos/perspective-viewer
Module for the `<perspective-viewer>` custom element. This module has no
(real) exports, but importing it has a side effect: the
`PerspectiveViewerElement`class is registered as a custom element, after
which it can be used as a standard DOM element.
Though `<perspective-viewer>` is written mostly in Rust, the nature
of WebAssembly's compilation makes it a dynamic module; in order to
guarantee that the Custom Elements extension methods are registered
synchronously with this package's import, we need perform said registration
within this wrapper module.
The documentation in this module defines the instance structure of a
`<perspective-viewer>` DOM object instantiated typically, through HTML or any
relevent DOM method e.g. `document.createElement("perspective-viewer")` or
`document.getElementsByTagName("perspective-viewer")`.
## Table of contents
### Classes
- [PerspectiveViewerElement](classes/PerspectiveViewerElement.md)
- [PerspectiveViewerPluginElement](classes/PerspectiveViewerPluginElement.md)
### Interfaces
- [IPerspectiveViewerPlugin](interfaces/IPerspectiveViewerPlugin.md)
### Type aliases
- [PerspectiveViewerConfig](README.md#perspectiveviewerconfig)
## Type aliases
### PerspectiveViewerConfig
Ƭ **PerspectiveViewerConfig**: `perspective.ViewConfig` & { `plugin?`: `string` ; `plugin_config?`: `any` ; `settings?`: `boolean` }
#### Defined in
[rust/perspective-viewer/src/ts/viewer.ts:16](https://github.com/finos/perspective/blob/e19cc4010/rust/perspective-viewer/src/ts/viewer.ts#L16)