fix(runtime-dom): fix patching for attributes starting with on
fix #949 BREAKING CHANGE: Only props starting with `on` followed by an uppercase letter or a non-letter character are considered event listeners.
This commit is contained in:
@@ -24,7 +24,8 @@ export const NOOP = () => {}
|
||||
*/
|
||||
export const NO = () => false
|
||||
|
||||
export const isOn = (key: string) => key[0] === 'o' && key[1] === 'n'
|
||||
const onRE = /^on[^a-z]/
|
||||
export const isOn = (key: string) => onRE.test(key)
|
||||
|
||||
export const extend = <T extends object, U extends object>(
|
||||
a: T,
|
||||
|
||||
Reference in New Issue
Block a user