Skip to content

Commit cdd3687

Browse files
Hanks10100yyx990803
authored andcommitted
be able to parse the real tag name for the specific platform (vuejs#4417)
1 parent b141c69 commit cdd3687

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/core/config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export type Config = {
1212
keyCodes: { [key: string]: number };
1313
// platform
1414
isReservedTag: (x?: string) => boolean;
15+
parsePlatformTagName: (x: string) => string;
1516
isUnknownElement: (x?: string) => boolean;
1617
getTagNamespace: (x?: string) => string | void;
1718
mustUseProp: (tag?: string, x?: string) => boolean;
@@ -69,6 +70,11 @@ const config: Config = {
6970
*/
7071
getTagNamespace: noop,
7172

73+
/**
74+
* Parse the real tag name for the specific platform.
75+
*/
76+
parsePlatformTagName: (x: string): string => x,
77+
7278
/**
7379
* Check if an attribute must be bound using property, e.g. value
7480
* Platform-dependent.

src/core/vdom/create-element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function _createElement (
6161
if (config.isReservedTag(tag)) {
6262
// platform built-in elements
6363
vnode = new VNode(
64-
tag, data, children,
64+
config.parsePlatformTagName(tag), data, children,
6565
undefined, undefined, context
6666
)
6767
} else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy