Answer:
Your answer would be that the sentence contains a present participial phrase with a direct object.
Step-by-step explanation:
The sentence above contains a present participial phrase with a direct object. As this is a present participle, it ends in -ing. What is more, the participle phrase includes objects and modifiers that complete the thought. In the sentence above, the present participle wanting takes the NP direct object a cookie. This participle phrase modifies the pronoun he.