Green’s Dictionary of Slang

cool v.1

[backsl.; thus cool him, look at him, ‘a phrase frequently used when one costermonger warns another of the approach of a policeman’ (Hotten, 1867); note: cite 1683 fits the sense, but may suggest a cool glance, and is unlikely to be backsl]

[late 17C; mid-19C+] to look at; esp. in cool the esclop! look, the police!