This is just not true for basically all of 2017 with the rate at which the value of all the coins has been rising. Especially if it is your desktop on off hours so the hardware is essentially a sunk cost.
At 12c/kwh with a Radeon RX Vega56 consuming 200W and a hashrate of 2000 h/s, mining XMR currently yields has a 61% profit margin; it's 79% ROI if you are getting free power.
This is not the most power efficient setup (as I said, there are far, far more efficient cards, especially when run in tandem) but it is the most sought-after card due to density. Regardless, it's exceptionally profitable to mine if you already own the card.
JS mining only takes a slight performance hit compared to native, actually; asm.js and others provide very good results since the problem is memory-hard, not computationally bound. It is definitely energy efficient and worth doing if all you care about is ROI vs. marginal utility rates in most American cities (perhaps not some of California). Nicehash built their business model around exactly that, which is the real reason people like libraries like the OP's - it's a distributed way to get people mining, not for the individual person themselves.
In that case, thanks for the correction. I suppose I made my original comment with a lot of assumptions that may be less true than I would have thought.
The 64s are occasionally available, the 56s, no shot. Glad I got 7 close to MSRP when I did. There are actually more power efficient alternatives that hash better per dollar assuming that the price of a Vega is $600+, which it easily is. Just requires some heavy lifting.
Extremely unlikely. Even GPU mining with good hardware cuts it close with energy consumption depending on your energy costs.