extclp
7 months ago
committed by
GitHub
23 changed files with 30 additions and 45 deletions
@ -1,8 +0,0 @@
|
||||
export default function triggerEvent(el: Element, type: string) { |
||||
if ('createEvent' in document) { |
||||
// modern browsers, IE9+
|
||||
const e = document.createEvent('HTMLEvents'); |
||||
e.initEvent(type, false, true); |
||||
el.dispatchEvent(e); |
||||
} |
||||
} |
Loading…
Reference in new issue