Online marketplaces such as Amazon and eBay will have to pay their "fair share" of the costs of recycling electrical waste under new government proposals.