I think that it works using a Hall effect sensor.
Normally we would expect that with the close proximity of the line and neutral wires, the magnetic fields would cancel, rendering the Hall sensor ineffective.
But if the Hall sensor was positioned so that it was close to either the line or neutral wire, at a point where there was minimal cancellation of the magnetic field by positioning of the device along the cable for best detection, it may be possible to detect the flow of current in the cable.
JimB