From d876ab3542842d51565dfc51f39f57e3524fb8bf Mon Sep 17 00:00:00 2001 From: Yukon123 <82578034+Yukon123@users.noreply.github.com> Date: Sat, 21 Aug 2021 22:08:47 +0800 Subject: [PATCH 1/2] Change `is` prop to `is` attr --- src/guide/migration/custom-elements-interop.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/guide/migration/custom-elements-interop.md b/src/guide/migration/custom-elements-interop.md index 3d2a9cd09b..f4b55de381 100644 --- a/src/guide/migration/custom-elements-interop.md +++ b/src/guide/migration/custom-elements-interop.md @@ -8,7 +8,7 @@ badges: ## Overview - **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. -- **BREAKING:** Special `is` prop usage is restricted to the reserved `` tag only. +- **BREAKING:** Special `is` attr usage is restricted to the reserved `` tag only. - **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. ## Autonomous Custom Elements @@ -69,21 +69,21 @@ The Custom Elements specification provides a way to use custom elements as [Cust ``` -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. +Vue's usage of the `is` special attr 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. -In 3.0, we are limiting Vue's special treatment of the `is` prop to the `` tag only. +In 3.0, we are limiting Vue's special treatment of the `is` attr to the `` tag only. - When used on the reserved `` tag, it will behave exactly the same as in 2.x; -- When used on normal components, it will behave like a normal prop: +- When used on normal components, it will behave like a normal attr: ```html ``` - 2.x behavior: renders the `bar` component. - - 3.x behavior: renders the `foo` component and passing the `is` prop. + - 3.x behavior: renders the `foo` component and passing the `is` attr. -- 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. +- When used on plain elements, it will be passed to the `createElement` call as the `is` attr, and also rendered as a native attribute. This supports the usage of customized built-in elements. ```html @@ -105,7 +105,7 @@ In 3.0, we are limiting Vue's special treatment of the `is` prop to the ` From fd478e8ab392b06d324adbe9f10f0e18411d6bd0 Mon Sep 17 00:00:00 2001 From: Yukon123 <82578034+Yukon123@users.noreply.github.com> Date: Mon, 23 Aug 2021 19:52:59 +0800 Subject: [PATCH 2/2] change attr to attribute --- src/guide/migration/custom-elements-interop.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/guide/migration/custom-elements-interop.md b/src/guide/migration/custom-elements-interop.md index f4b55de381..766aa3ebff 100644 --- a/src/guide/migration/custom-elements-interop.md +++ b/src/guide/migration/custom-elements-interop.md @@ -8,7 +8,7 @@ badges: ## Overview - **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. -- **BREAKING:** Special `is` attr usage is restricted to the reserved `` tag only. +- **BREAKING:** Special `is` attribute usage is restricted to the reserved `` tag only. - **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. ## Autonomous Custom Elements @@ -69,21 +69,21 @@ The Custom Elements specification provides a way to use custom elements as [Cust ``` -Vue's usage of the `is` special attr 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. +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. -In 3.0, we are limiting Vue's special treatment of the `is` attr to the `` tag only. +In 3.0, we are limiting Vue's special treatment of the `is` attribute to the `` tag only. - When used on the reserved `` tag, it will behave exactly the same as in 2.x; -- When used on normal components, it will behave like a normal attr: +- When used on normal components, it will behave like a normal attribute: ```html ``` - 2.x behavior: renders the `bar` component. - - 3.x behavior: renders the `foo` component and passing the `is` attr. + - 3.x behavior: renders the `foo` component and passing the `is` attribute. -- When used on plain elements, it will be passed to the `createElement` call as the `is` attr, and also rendered as a native attribute. This supports the usage of customized built-in elements. +- 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. ```html @@ -105,7 +105,7 @@ In 3.0, we are limiting Vue's special treatment of the `is` attr to the `