You can also get the permission via an entry in the manifest.json file. This is perfect for kiosk or standalone applications.
{ "permissions": [ "serial" ] }