mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-12 11:55:26 +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)
|
|
}
|
|
}
|