Skip to content

Commit 9ed94d8

Browse files
authored
Change is prop to is attr (#1197)
* Change `is` prop to `is` attr * change attr to attribute
1 parent 042a0be commit 9ed94d8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/guide/migration/custom-elements-interop.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ badges:
88
## Overview
99

1010
- **BREAKING:** The checks to determine whether tags should be treated as custom elements are now performed during template compilation, and should be configured via compiler options instead of runtime config.
11-
- **BREAKING:** Special `is` prop usage is restricted to the reserved `<component>` tag only.
11+
- **BREAKING:** Special `is` attribute usage is restricted to the reserved `<component>` tag only.
1212
- **NEW:** To support 2.x use cases where `is` was used on native elements to work around native HTML parsing restrictions, prefix the value with `vue:` to resolve it as a Vue component.
1313

1414
## Autonomous Custom Elements
@@ -69,21 +69,21 @@ The Custom Elements specification provides a way to use custom elements as [Cust
6969
<button is="plastic-button">Click Me!</button>
7070
```
7171

72-
Vue's usage of the `is` special prop was simulating what the native attribute does before it was made universally available in browsers. However, in 2.x it was interpreted as rendering a Vue component with the name `plastic-button`. This blocks the native usage of Customized Built-in Element mentioned above.
72+
Vue's usage of the `is` special attribute was simulating what the native attribute does before it was made universally available in browsers. However, in 2.x it was interpreted as rendering a Vue component with the name `plastic-button`. This blocks the native usage of Customized Built-in Element mentioned above.
7373

74-
In 3.0, we are limiting Vue's special treatment of the `is` prop to the `<component>` tag only.
74+
In 3.0, we are limiting Vue's special treatment of the `is` attribute to the `<component>` tag only.
7575

7676
- When used on the reserved `<component>` tag, it will behave exactly the same as in 2.x;
77-
- When used on normal components, it will behave like a normal prop:
77+
- When used on normal components, it will behave like a normal attribute:
7878

7979
```html
8080
<foo is="bar" />
8181
```
8282

8383
- 2.x behavior: renders the `bar` component.
84-
- 3.x behavior: renders the `foo` component and passing the `is` prop.
84+
- 3.x behavior: renders the `foo` component and passing the `is` attribute.
8585

86-
- When used on plain elements, it will be passed to the `createElement` call as the `is` prop, and also rendered as a native attribute. This supports the usage of customized built-in elements.
86+
- When used on plain elements, it will be passed to the `createElement` call as the `is` attribute, and also rendered as a native attribute. This supports the usage of customized built-in elements.
8787

8888
```html
8989
<button is="plastic-button">Click Me!</button>
@@ -105,7 +105,7 @@ In 3.0, we are limiting Vue's special treatment of the `is` prop to the `<compon
105105
106106
### 2.x Syntax
107107
108-
In Vue 2 we recommended working around with these restrictions by using the `is` prop on a native tag:
108+
In Vue 2 we recommended working around with these restrictions by using the `is` attribute on a native tag:
109109
110110
```html
111111
<table>

0 commit comments

Comments
 (0)