Added configuration option for JS callbacks