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
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 an Element from the current Document.
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6InBhc2NhbCB3aWxicmluayIsIm91dHB1dFR5cGUiOiJibG9jayIsImxhc3RNb2RpZmllck5hbWUiOiJwYXNjYWwgd2lsYnJpbmsiLCJsYW5ndWFnZSI6ImVuIiwiZGlhZ3JhbURpc3BsYXlOYW1lIjoiIiwic0ZpbGVJZCI6IiIsImF0dElkIjoiNjg2NzcyNzQiLCJkaWFncmFtTmFtZSI6IlNDTCBFZGl0RXZlbnRzIiwiYXNwZWN0IjoiIiwibGlua3MiOiJhdXRvIiwiY2VvTmFtZSI6Ik9wZW5TQ0QtY29yZSBoYW5kbGluZyBTQ0wgRWRpdHMiLCJ0YnN0eWxlIjoidG9wIiwiY2FuQ29tbWVudCI6ZmFsc2UsImRpYWdyYW1VcmwiOiIiLCJjc3ZGaWxlVXJsIjoiIiwiYm9yZGVyIjp0cnVlLCJtYXhTY2FsZSI6IjEiLCJvd25pbmdQYWdlSWQiOjY4Njc3MjcwLCJlZGl0YWJsZSI6ZmFsc2UsImNlb0lkIjo2ODY3NzI3MCwicGFnZUlkIjoiIiwibGJveCI6dHJ1ZSwic2VydmVyQ29uZmlnIjp7ImVtYWlscHJldmlldyI6IjEifSwib2RyaXZlSWQiOiIiLCJyZXZpc2lvbiI6MSwibWFjcm9JZCI6IjQzYzdjZDRjLThhNDctNDc5Yy04ZDQ2LTAxZDYwMDBjYzVjMSIsInByZXZpZXdOYW1lIjoiU0NMIEVkaXRFdmVudHMucG5nIiwibGljZW5zZVN0YXR1cyI6Ik9LIiwic2VydmljZSI6IiIsImlzVGVtcGxhdGUiOiIiLCJ3aWR0aCI6IjQxMSIsInNpbXBsZVZpZXdlciI6ZmFsc2UsImxhc3RNb2RpZmllZCI6MTY4NzUxMzM1MDgwMCwiZXhjZWVkUGFnZVdpZHRoIjpmYWxzZSwib0NsaWVudElkIjoiIn0=
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. They are handled synchronously: first come, first serve.