js syntax checking in edit mode