added definition field support for javascript bindings