其他分享
首页 > 其他分享> > [HTML5 DOM] dispatchEvent

[HTML5 DOM] dispatchEvent

作者:互联网

Most of the time,we use DOMElement.click():

button.click()

 

Actually it is a shortcut for:

button.dispatchEvent(
    new MouseEvent('click', {
        bubble: true,
        cancelable: true,
        composed: true, 
button: 0 }) )

 

标签:composed,use,DOM,button,HTML5,dispatchEvent,true,click
来源: https://www.cnblogs.com/Answer1215/p/15790902.html