Files
wangxiaowei 5d7b75a14e first commit
2025-12-09 13:35:21 +08:00

10 lines
330 B
JavaScript

const acceptValue = ['input','textarea','option','select']
module.exports = (tag, type, attr) => {
return (
(attr === 'value' && acceptValue.includes(tag)) && type !== 'button' ||
(attr === 'selected' && tag === 'option') ||
(attr === 'checked' && tag === 'input') ||
(attr === 'muted' && tag === 'video')
)
}