Skip to content

Commit

Permalink
Edge browser support and information (trailheadapps#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
muenzpraeger authored Oct 11, 2019
1 parent 8f248ce commit ba3e11d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ yarn watch
```

4. Enjoy the app!

## Modifications for Edge browser users

The Edge browser currently doesn't support native shadow DOM. If you want to use this application you have to manually add the synthetic shadow DOM to your clone. Add to the first line of the [index.js](https://github.com/trailheadapps/lwc-recipes-oss/blob/master/src/index.js#L1) this code:

```javascript
import '@lwc/synthetic-shadow';
```
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ <h1 class="title">Lightning Web Components Recipes</h1>
</ul>
</header>

<ui-app></ui-app>
<div id="main"></div>
</main>
</html>
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { buildCustomElementConstructor, register } from 'lwc';
import { createElement, register } from 'lwc';
import { registerWireService } from '@lwc/wire-service';
import UiApp from 'ui/app';

registerWireService(register);

customElements.define('ui-app', buildCustomElementConstructor(UiApp));
const app = createElement('my-app', { is: UiApp });
// eslint-disable-next-line @lwc/lwc/no-document-query
document.querySelector('#main').appendChild(app);

0 comments on commit ba3e11d

Please sign in to comment.