which sentence includes a dependent clause?

A. The boy received a dog named Rover for his birthday.
B. They gave sandwiches to the children on paper plates.
C. On the way to the store, Nicole saw a lost cat.
D. When looking out the window, they saw the first leaf fall.

D. When looking out the window, they saw the first leaf fall.