MCPcopy
hub / github.com/vuejs/core / shouldSkipAttr

Function shouldSkipAttr

packages/runtime-core/src/compat/attrsFallthrough.ts:5–29  ·  view source on GitHub ↗
(
  key: string,
  instance: ComponentInternalInstance,
)

Source from the content-addressed store, hash-verified

3import { DeprecationTypes, isCompatEnabled } from './compatConfig'
4
5export function shouldSkipAttr(
6 key: string,
7 instance: ComponentInternalInstance,
8): boolean {
9 if (key === 'is') {
10 return true
11 }
12 if (
13 (key === 'class' || key === 'style') &&
14 isCompatEnabled(DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE, instance)
15 ) {
16 return true
17 }
18 if (
19 isOn(key) &&
20 isCompatEnabled(DeprecationTypes.INSTANCE_LISTENERS, instance)
21 ) {
22 return true
23 }
24 // vue-router
25 if (key.startsWith('routerView') || key === 'registerRouteInstance') {
26 return true
27 }
28 return false
29}

Callers 2

updatePropsFunction · 0.90
setFullPropsFunction · 0.90

Calls 2

isCompatEnabledFunction · 0.90
isOnFunction · 0.90

Tested by

no test coverage detected