Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 0003-ADR-for-addons.md #117

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Create 0003-ADR-for-addons.md #117

wants to merge 1 commit into from

Conversation

pascalwilbrink
Copy link
Member

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.

2 participants