Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 325ca46

Browse files
Robert-FramptonRobert-Frampton
Robert-Frampton
authored and
Robert-Frampton
committed
Update references
1 parent dd98d6b commit 325ca46

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/pages/docs/guides/web-components.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: "Web Components"
3-
description: "Using metal components as custom elements (web components)."
3+
description: "Using metal components as web components (custom elements)."
44
layout: "guide"
55
weight: 230
66
---
77

88
<article id="web_components">
99

10-
## [Custom Elements](#custom_elements)
10+
## [Web Components](#web_components)
1111

1212
Metal components are generally invoked in one of three ways.
1313

@@ -33,7 +33,7 @@ new metal.MyComponent({
3333
<MyComponent title="Hello, World" />
3434
```
3535

36-
However, with the help of the [metal-custom-element](https://www.npmjs.com/package/metal-custom-element) package, Metal components can be invoked as [Custom Elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements) in
36+
However, with the help of the [metal-web-component](https://www.npmjs.com/package/metal-web-component) package, Metal components can be invoked as [Custom Elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements) in
3737
plain HTML.
3838

3939
```xml
@@ -46,29 +46,29 @@ plain HTML.
4646

4747
## [Install](#install)
4848

49-
First step is to install the `metal-custom-element` package.
49+
First step is to install the `metal-web-component` package.
5050

5151
```bash
52-
npm i --save metal-custom-element
52+
npm i --save metal-web-component
5353
```
5454

55-
Currently custom elements do not work on every browser, so a pollyfill must be
55+
Currently web components do not work on every browser, so a pollyfill must be
5656
used. Include the [webcomponents-lite pollyfill](https://www.webcomponents.org/polyfills) if
57-
you intend to use custom elements on Firefox, Edge, or IE11.
57+
you intend to use web components on Firefox, Edge, or IE11.
5858

5959
</article>
6060

61-
<article id="define_custom_elements">
61+
<article id="define_web_components">
6262

63-
## [Define custom elements](#define_custom_elements)
63+
## [Define web components](#define_web_components)
6464

6565
This package exposes a single helper function that can be used to wrap any Metal
66-
component in a custom element. It receives two arguments, the tag name you want
67-
the custom element to receive, and the constructor of the Metal component.
66+
component in a web component. It receives two arguments, the tag name you want
67+
the web component to receive, and the constructor of the Metal component.
6868

6969
```javascript
7070
import JSXComponent from 'metal-jsx';
71-
import defineWebComponent from 'metal-custom-element';
71+
import defineWebComponent from 'metal-web-component';
7272

7373
class MyComponent extends JSXComponent {
7474
render() {
@@ -85,7 +85,7 @@ MyComponent.PROPS = {
8585
defineWebComponent('my-component', MyComponent);
8686
```
8787

88-
Now that the custom element is defined, it can be invoked in plain html.
88+
Now that the web component is defined, it can be invoked in plain html.
8989

9090
```xml
9191
<my-component message="This is a web component" />
@@ -98,7 +98,7 @@ This will then result in the following HTML on the page.
9898
```
9999

100100
If you would like the component's markup to be rendered using the Shadow DOM,
101-
simply set the `useshadowdom` attribute to `true` when calling the custom element.
101+
simply set the `useshadowdom` attribute to `true` when calling the web component.
102102

103103
```xml
104104
<my-component message="This is a web component" useshadowdom="true" />

0 commit comments

Comments
 (0)