Skip to content

Commit

Permalink
Improving documentation for how to use this project.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning committed Oct 11, 2018
1 parent e852c50 commit be652e9
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,32 @@ A polyfill for the [custom elements](https://html.spec.whatwg.org/multipage/scri
v1 spec.

## Using
#### Standalone script tag
Include a script tag at the beginning of your page, *before* any code that
manipulates the DOM. The custom-elements.min.js can be loaded from a CDN:
```html
<script src="https://unpkg.com/@webcomponents/custom-elements"></script>
```

Include `custom-elements.min.js` at the beginning of your page, *before* any code that
manipulates the DOM:
Or you can build it yourself and then load it:
```html
<script src="custom-elements.min.js"></script>
```

#### Via npm:
If you're using npm, webpack, or similar tools, this package can be installed and imported:
```bash
npm install @webcomponents/custom-elements
```

```js
// Do this import before any code that manipulates the DOM.
import '@webcomponents/custom-elements'
```

#### Via the webcomponents polyfill
Alternatively, you can use this polyfill via the [webcomponentjs polyfills](https://github.com/WebComponents/webcomponentsjs).

## Developing

1. Install and build
Expand Down

0 comments on commit be652e9

Please sign in to comment.