Easiest way to run a command line executable from a Firefox extension?

I wanted to try my hand at making a youtube-dl GUI accessible from Firefox, as practice. However, it doesn’t seem that easy; from what I understand, you can’t launch executables client-side using JavaScript unless you use ActiveXObject which apparently only works on IE. Makes sense for security reasons but doesn’t help my case too much…

My main goal is to have a GUI that doesn’t require the user to leave Firefox. How would this be done ?

Source: Ask Javascript Questions