Could be at least one of several possibilities.
If she was definitely known to be epileptic, there is a phenomenon known as
SUDEP
Seizures/syncope (fainting sometime associated with seizure like jerking not of epileptic origin can also precede cardiac arrest
Link
The other possibility, though not always seen is that there can be a short period of seizure like activity accompanying a sudden cardiac arrest. In someone this young, you would strongly suspect a congenital problem, like prolonged QT Syndrome. It looks like the seizure preceded the arrest but it actually was the other way around. Its just hard to check a pulse on a seizing person.... Unless you already had them on EKG monitoring and could see the cardiac problem come first you wouldn't know
The differential on all these can be complex as both cardiac disturbances, and seizures can mimic one another.
As a medic I try to quickly determine which it is, but this can be very difficult.
In fact, in some patients continuous monitoring of both EKG and EEG is done for up to a week or more under video observation in hospital is performed if there are indications of both. It might happen to cost around $3k/day for a service like this at an internationally known facility, and I might just have accompanied someone for this week long process.....