mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 21:18:14 +08:00
9 lines
228 B
JavaScript
9 lines
228 B
JavaScript
export default function triggerEvent (el, type) {
|
|
if ('createEvent' in document) {
|
|
// modern browsers, IE9+
|
|
const e = document.createEvent('HTMLEvents')
|
|
e.initEvent(type, false, true)
|
|
el.dispatchEvent(e)
|
|
}
|
|
}
|