Skip to content

Commit 68a2d14

Browse files
committed
docs: improve minimal implementation description
1 parent 5caa958 commit 68a2d14

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,26 @@ choices:
6565
- Use the minimal implementation of `customElements` provided by this polyfill
6666
that would allow you to use the customized built-in elements only.
6767

68-
Minimal implementation could be added in the following way:
68+
Note that both minimal implementation or `@webcomponents/webcomponentsjs`
69+
polyfill should be executed **before** the main polyfill because it will
70+
override methods of the `customElements` registry.
71+
72+
Examples of adding minimal implementation:
6973

70-
- via npm:
74+
- via npm and ESM:
7175

7276
```javascript
7377
import '@corpuscule/custom-builtin-elements/lib/customElementsBase';
78+
import '@corpuscule/custom-builtin-elements';
7479
```
7580

76-
- via [https://unpkg.com](https://unpkg.com)
81+
- via [https://unpkg.com](https://unpkg.com) and `script`:
7782

78-
```javascript
79-
import 'https://unpkg.com/@corpuscule/custom-builtin-elements/lib/customElementsBase.js';
83+
```html
84+
<script src="https://unpkg.com/@corpuscule/custom-builtin-elements/lib/customElementsBase.js">
85+
<script src="https://unpkg.com/@corpuscule/custom-builtin-elements">
8086
```
8187
82-
Note that both minimal implementation or `@webcomponents/webcomponentsjs`
83-
polyfill should be executed **before** this polyfill because it will override
84-
methods of `customElements` registry.
85-
8688
## Example
8789
8890
```javascript

0 commit comments

Comments
 (0)