Skip to content

Commit

Permalink
Merge pull request #169 from webcomponents/ce-readme
Browse files Browse the repository at this point in the history
[Custom Elements] Update README.md
  • Loading branch information
aomarks authored Apr 24, 2020
2 parents 072b828 + 454247d commit e0617bc
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions packages/custom-elements/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 e0617bc

Please sign in to comment.