It's even sillier than that. It just retrieves the terminal window with XGetInputFocus, and then stomps on top of another client's window, along with a pile of heuristics to prevent drawing on top of tabs, scrollbars, etc.
Yes, that is horrible. But also goddamn awesome. Sure, I'd never think of doing something similar where it was critical, but you've got to admit that is a fairly clever hack.
https://github.com/shinh/w3m/blob/d286acbf58b72d05a55453c134...