This is in the context of having just been involved in a near miss with the car. And only applies at traffic lights whereby the car is stationary very soon after the near miss. So, generally the near miss is to do with the car pulling across a cycle lane shortly before a set of traffic lights.
If their window is open it's easy to speak to the driver in order to elicit a response to "Do you know you nearly just hit me?". If their window is closed it's more difficult.
Knocking on the window is one option, and if that's ignored I've been tempted before now to simply open the door. Simply to prevent them from driving away before I've made them aware of their mistake.
So, my question is: is it legal, in the UK, to do so? The question of whether or not it's sensible to do so is one for another time.