Event

An event is a direction useful only in standalone stories. The event system is a programming paradigm that allows anyone to create a function that should be executed when certain situations occur.

The tutorial system is build with stories as well. These stories leverage events to click, scroll and type in the story editor. In the example of an event below, you can see how CSS selectors are required for the app to find the correct direction to change. [ { action: 'click', args: ['.direction-type-choice'] }, { action: 'goto', args: ['.direction:nth-child(2) textarea'] }, { action: 'type', args: ['You haven\'t seen my final form!'] }, { action: 'click', args: ['.direction-type-choice'] }, { action: 'goto', args: ['.direction:nth-child(3) textarea'] }, { action: 'type', args: ['Fine I give up'] }, ]