I have tried that no " around cmd also works well, and followed the style that screen_orientation_api.js do.

Such kind of command seems more readable, and also want to add 'readyState=complete' and "DOMContentLoaded" commands before.
But I have tried that, it seems the extension js file is not the right place to listen these events. Need to hook from content side maybe.
So there will be only one command here, a simple string will be enough too.