If you are using handsontable, why don't you use its built in functionality?
Have a look at HTs conditional formatting
Also, in version 0.9.5 a column option was added validator
. Details here.
validator (value: Mixed, callback: Function)
or
validator : RegExp Object
Then using the event (details here):
afterValidate (isValid: Boolean, value: Mixed, row: Number, prop: String, source: String)
do the formatting of the cell
Also, in your example, you are setting the renderer, but is the cell actually being rendered? Do you need to re-render?