There are even times when a wounded and cornered stray dog will attack a human.
In my TL I have guessed that ことだって、ある is ことがある (there are times when...) with the が being replaced by だって to give the meaning "there are even times when...". Is this correct? Why is there a comma here?
My other thought was that って might be quoting the stuff before it, but I got stuck with that line of reasoning.