Skip to content

Conversation

@pascalwilbrink
Copy link
Contributor

No description provided.

@Sander3003
Copy link
Member

It would be nice to add some examples use-cases where this add-on could help. This will help to provide more context :).


## Context
If we want OpenSCD to be extendable, we should allow OpenSCD to support `addons`. An addon is like a plugin, but without the requirement of needing to extend from `HTMLElement`. An `addon` is a default exported function from a file.
an `addon` function gets the `OpenSCD` class as a parameter. from here, it can fetch the document if needed. it can also subscribe to events dispatched to `open-scd`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution: Using addons

});
}
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution: background plug-in

@Sander3003
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants