Speed improvements for html texts and SVG texts.
Slight API change: now triggerEventHandlers accepts an array of events only.