This recent blog post says that this is how you go about Triggering events in plain JavaScript

Code Javascript:
 var elem = document.getElementById('myForm');
    var event = new Event('submit');
    elem.dispatchEvent(event);

Now why is this better than using addEventListener, or the .onsubmit property?