(el, key, prevValue, nextValue, namespace, parentComponent)
| 7279 | const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter |
| 7280 | key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; |
| 7281 | const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { |
| 7282 | const isSVG = namespace === "svg"; |
| 7283 | if (key === "class") { |
| 7284 | patchClass(el, nextValue, isSVG); |
| 7285 | } else if (key === "style") { |
| 7286 | patchStyle(el, prevValue, nextValue); |
| 7287 | } else if (isOn(key)) { |
| 7288 | if (!isModelListener(key)) { |
| 7289 | patchEvent(el, key, prevValue, nextValue, parentComponent); |
| 7290 | } |
| 7291 | } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { |
| 7292 | patchDOMProp(el, key, nextValue); |
| 7293 | if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { |
| 7294 | patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); |
| 7295 | } |
| 7296 | } else if ( |
| 7297 | // #11081 force set props for possible async custom element |
| 7298 | el._isVueCE && // #12408 check if it's declared prop or it's async custom element |
| 7299 | (shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private |
| 7300 | el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue))) |
| 7301 | ) { |
| 7302 | patchDOMProp(el, camelize(key), nextValue, parentComponent, key); |
| 7303 | } else { |
| 7304 | if (key === "true-value") { |
| 7305 | el._trueValue = nextValue; |
| 7306 | } else if (key === "false-value") { |
| 7307 | el._falseValue = nextValue; |
| 7308 | } |
| 7309 | patchAttr(el, key, nextValue, isSVG); |
| 7310 | } |
| 7311 | }; |
| 7312 | function shouldSetAsProp(el, key, value, isSVG) { |
| 7313 | if (isSVG) { |
| 7314 | if (key === "innerHTML" || key === "textContent") { |
nothing calls this directly
no test coverage detected