fix(rumtime-core): custom dom props should be cloned when cloning a hoisted DOM (#3080)
fix #3072
This commit is contained in:
12
packages/runtime-dom/__tests__/nodeOps.spec.ts
Normal file
12
packages/runtime-dom/__tests__/nodeOps.spec.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { nodeOps } from '../src/nodeOps'
|
||||
|
||||
describe('nodeOps', () => {
|
||||
test('the _value property should be cloned', () => {
|
||||
const el = nodeOps.createElement('input') as HTMLDivElement & {
|
||||
_value: any
|
||||
}
|
||||
el._value = 1
|
||||
const cloned = nodeOps.cloneNode!(el) as HTMLDivElement & { _value: any }
|
||||
expect(cloned._value).toBe(1)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user