Function
patchProp
(
el: TestElement,
key: string,
prevValue: any,
nextValue: any,
)
Source from the content-addressed store, hash-verified
| 2 | import { isOn } from '@vue/shared' |
| 3 | |
| 4 | export function patchProp( |
| 5 | el: TestElement, |
| 6 | key: string, |
| 7 | prevValue: any, |
| 8 | nextValue: any, |
| 9 | ): void { |
| 10 | logNodeOp({ |
| 11 | type: NodeOpTypes.PATCH, |
| 12 | targetNode: el, |
| 13 | propKey: key, |
| 14 | propPrevValue: prevValue, |
| 15 | propNextValue: nextValue, |
| 16 | }) |
| 17 | el.props[key] = nextValue |
| 18 | if (isOn(key)) { |
| 19 | const event = key[2] === ':' ? key.slice(3) : key.slice(2).toLowerCase() |
| 20 | ;(el.eventListeners || (el.eventListeners = {}))[event] = nextValue |
| 21 | } |
| 22 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected