Closed BobStein closed 5 years ago
Hi, thank you for your input.
It is unfortunate that the examples are misleading. In the readme file there is stated that "build" returns the instance and it is only for simplicity that play() is chained.
I might adjust the examples when I get the time :)
I've changed all the examples, hopefully it will be more clear now. Closing issue.
One of the drawbacks to fluent API is you can get confused about return values. This confusion shows up in the very first "working fiddle" at http://jsfiddle.net/98gdLvph/
It has this misleading code:
This assigns undefined to
playlist
, because.play()
has no return value. Instead I suggest:Similarly misleading is the code in README.md at https://github.com/Hagsten/Talkify#user-content-play-all-top-to-bottom
I think it should be more like this: