Ok. I'm didn't mean that you should or shouldn't use setTimeout.
I just want to point out that your code is synchronous and deals with one attribute change there is no diff between your code and:
- var self = this
- can.batch.start(function(){self._startBatch()})
- this.attr("@transition", ...);
- can.batch.stop()
or without callback
- can.batch.start()
- this.attr("@transition", ...);
- can.batch.stop()
- this._startBatch()
or just without all that stuff with batches.
- this.attr("@transition", ...);
- this._startBatch()
And you approach to deal with css transitions seems a little too sophisticated.