Skip to content

Commit

Permalink
docs: improve API.md grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-d committed Sep 11, 2024
1 parent 11dda8f commit be0be6e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ An **OpenSCD menu plugin** is an OpenSCD plugin with an additional `run()` insta

An **OpenSCD editor plugin** is a OpenSCD plugin that is only rendered as long as the user has its tab selected in OpenSCD's tab bar. It is meant for rendering the main part of OpenSCD's user interface.

The **OpenSCD core API** is:
- the way in which OpenSCD core communicates relevant data to the plugins and
- the way in which plugins communicate user intent to OpenSCD core.
- the way in which OpenSCD sets CSS fonts and colors for plugins
The **OpenSCD core API** describes the ways in which:
- OpenSCD core communicates relevant data to the plugins,
- plugins communicate user intent to OpenSCD core, and
- OpenSCD sets CSS fonts and colors for plugins.

## Communicating data to plugins

OpenSCD core communicates the data necessary for editing SCL documents by setting the following [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) on the plugin's [DOM Element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement):


```typescript
export default class MyPlugin extends LitElement {
export default class MyPlugin extends HTMLElement {
docs: Record<string, XMLDocument> = {};
doc?: XMLDocument;
docName?: string;
Expand Down

0 comments on commit be0be6e

Please sign in to comment.