mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-16 01:41:15 +08:00
9 lines
230 B
JavaScript
9 lines
230 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);
|
|
}
|
|
}
|