# Edel-Elements

Documentation can be found at [Github.io Page](https://conclurer.github.io/edel-elements).

## Edel-Context Element

A new, no UI element which could handle the context for an edel-element. There are some edel-elements (like the viewers) which need a context (endpoint/jwt/etc.). There are two options: Provide the context directly to every element, or using the context element.

The `edel-context` element is an HTML tag which accept `endpoint` and `jwt` as property and also triggers an event on every update of these properties. So if you want to listen to context updates, simply subscribe to the `contextUpdated` event.

Sample usage:
```
<edel-context endpoint="http://localhost:3000/graphql" jwt="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcnkiOiIyMDE5LTAxLTE1VDEzOjU1OjI0LjQ2NloiLCJvcmdJZGVudGlmaWVyIjoiY29uY2x1cmVyIiwiZnFuIjoiYWFyb24uY3ppY2hvbkBjb25jbHVyZXIuY29tIiwidXNlcklkIjoiNjg0YTQ3MmUtZDQwMy00YzkzLWI3ZWMtMTUyYWJhZWE5NDdiIiwiaWF0IjoxNTQ3NDc0MTI0fQ.YGVTny5HCpDrzFIyZf_1yhKkyx1SfA8TfGbXzLf9gOQ"></edel-context>
```

The `jwt` property is also optional. If the `edel-context` element could find a jwt inside the `localStorage` this is also fine.
