The electromagnetic model of gamma-ray bursts