triggerEvent
triggerEvent(
element,type,bubbles?):void
Defined in: core/dom/events.ts:128
Dispatches a plain event, as the browser does for its own (change, click, …). It bubbles unless
bubbles is false, and it carries no data: use customEventTrigger for that.
new Event() does not exist in IE10, so the event is made with document.createEvent().
Parameters
Section titled “Parameters”element
Section titled “element”EventTarget
Element, document or window to dispatch on.
string
Event type, e.g. change.
bubbles?
Section titled “bubbles?”boolean
Whether the event bubbles. Defaults to true.
Returns
Section titled “Returns”void
Example
Section titled “Example”select.selectedIndex = 2;triggerEvent(select, 'change');