You will need to write add-ons to make this work.
For Internet Explorer; you can write a browser helper object (BHO) .
For Firefox, Chrome and Safari; I think your only option is to write Netscape Plugin using NPAPI . FireBreath is a very useful foundation for creating such plugins, as it takes care of a lot of dirty work for you, allowing you to focus on the plugin itself. This will allow you to knock out these three stones with one stone - you can also write it as a cross platform (support many operating systems) if you want. Each of these browsers has its own extension models, which can be written in pure JavaScript; but they do not expose the serial port API due to lack of need and security concerns; making NPAPI the only viable solution.
, , , , . .
. Windows, , Silverlight 4 Out-of-Browser Active-X ( Silverlight API ). ; .