flowjs/flow.js

Ability to pass event handlers as part of the Flow constructor

drzraf opened this issue · 1 comments

Currently, a full initialization consist of the constructor, followed by event handler attachment.

I don't quite see how constructor (options, ...) would affect the behavior of fire.
But on the other hand, I a real advantage into being able to pass events handlers straight from the constructor: It allows to do all the configuration with plain a object in one step before passing it to the actual instantiation of the Flow object.
That means instantiation can more easily be delegated to a wrapper (Angular, VueJs, or a similar intermediary layer)

Should I provide a PR supporting this?

Totally agree, you should be able to bind events on the initial step.