Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

OpenSCD-Core can edit the current SCL Document by asynchronously listening to CustomEvents. If multiple EditEvents are sent that are depending on each other, it is possible to send a batch of them.
These CustomEvents can be divided into three types:

  • Insert

  • Update

  • Remove

Insert

An Insert EditEvent can be dispatched to insert new Elements into the current Document.


Update

An Update EditEvent can be dispatched to change the Attributes of a provided Element from the current Document.


Remove

a Remove EditEvent can be dispatched to remove an Element from the current Document.


draw.io Diagram
bordertrue
diagramNameSCL EditEvents
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth411
revision1

Dispatching multiple events

If multiple EditEvents are sent that are depending on each other, for example to insert an Element with Sub-Elements, it is possible to send a batch of EditEvents.