Anne van Kesteren

More simplified initializing and creation(!) of synthetic events

Remember the example from yesterday?

var ev = document.createEvent("UIEvent")
ev.initUIEvent("test", false, false, null, 1) // obsolete

That will become:

var ev = new UIEvent("test", {view:null, detail:1})

Or indeed:

document.dispatchEvent(new UIEvent("test", {view:null, detail:1}))

Defined by the DOM Standard today, in browsers, well, that will take a little longer :-)