Desperate Housewives Lawsuit Reveals Spoiler Alert in Court

The courtroom gasped when a spoiler alert for the next episode of Desperate Housewives was revealed during the Nicollette Sheridan lawsuit. INSIDE EDITION has the scoop.

Nicollette Sheridan's lawsuit just turned into a primetime soap opera, just like—well—Desperate Housewives.

The testimony became so shocking there were actually gasps in the courtroom. 

It started when actor James Denton took the stand. It was the first time we've heard from one of Sheridan's former co-stars.  

Denton walked into Los Angeles Superior Court alongside executive producer Marc Cherry who Sheridan accuses of slapping her, then killing off her character when she complained to ABC. Denton said it was painful to get involved in the bitter legal battle.

Denton told INSIDE EDITION, "It's disappointing to have to do it. As I said on the stand, I have tremendous respect and affection for both Marc and Nicolette."

In court, he was asked about the decision to kill off Sheridan's character.

"I can't say I was shocked because people get killed so often." he said.

"Did you ever wonder if your own character would die?" Marc Cherry's lawyer asked.

"Always," Denton replied.

Denton told INSIDE EDITION, "We always joke, 'nobody's safe,' so I wouldn't say I was really surprised."

Now it's time for that spoiler alert. The next witness after James Denton was a show executive on Desperate Housewives. There was pandemonium in the courtroom when he revealed that James Denton's character will be killed off in this Sunday's episode.  

Two female jurors clasped their mouths and Marc Cherry turned beet red that the secret plot twist was revealed in open court.  

Sheridan's lawyer actually asked the judge to impose a gag order but the judge said, "I can't do that."

Attorney Alison Triessl told INSIDE EDITION, "It absolutely hurts her claim. Here we are, a major star, a staple in this program, and he's gone."

It was also revealed in court that Teri Hatcher's character was "under discussion" to be killed off in 2008, the same season Sheridan's character was electrocuted.  

And there was one more moment of high drama in court. As executive producer Marc Cherry left the stand, Sheridan was seen muttering a curse word under her breath.  

Stay tuned.