That doesn't make sense to me because electromagnetism is both an attractive and repulsive force (can pull objects together or push them apart). Gravity is purely an attractive force which makes sense when explained as warped spacetime. But I'm also not a physicist...