Skip to content

triggerCustomEvent

Mike Byrne edited this page Jan 25, 2022 · 3 revisions

🚨Deprecation notice🚨

Q3 of 2019 this will be removed from a17-helpers. Consider using CustomEvent instead. BP v6.0.3+ has a polyfill for CustomEvent for IE11's lack of new constructor.

description

Triggers a custom event

requires

  • nothing

parameters

  • el - required - the node the event is attached to
  • type - required - the type, or name of your event
  • data - optional - any data that lives with your event

returns

  • nothing

example usage:

triggerCustomEvent(document,'session_open',{
  verified:true
});