rather than purely being petty, it's moreso that she wanted him to hate her rather than continue his indifference, since like she said "the very essence of anger is love" (you have to have strong feelings about something to hate it). prior to this, she was unable to hold his attention at all, and her feelings for him were completely one-sided. by cursing him she forced him to acknowledge her in order to remain in his thoughts until after she died, even though it wasn't affection