Barcodes are one of those special (enterprise level) money makers for Adobe. If they really wanted to make a general purpose barcode field, they would have done just that, instead of perverting the text field and blocking use of it in Reader.
But, because barcodes require a special diversion of the text field to a different field handler, several of the standard text field properties are missing from barcode fields, such as "multiline" and "comb". You can use this to detect barcode fields, i.e. a text field that throws an exception "InvalidGetError" for the "multiline" property.
Of course Adobe could change this at any time, so it is a rather tenous methodology, but so are most things in Acrobat JavaScript 😉
There is of course, no way to create barcode fields with JavaScript. All Adobe would have to do is add a new values to the style property for the type of barcode, and you could reliably create and detect text fields.