PVC has good resistance to HCl and to chlorine gas, but not to the ion. However, negative ions being attracted to the surface of an anode is not enough to cause current to flow, as the ions must actually remove electrons for that to happen. Until current flows, there will be no hydrogen release from the cathode, and the electrolysis reaction will stop .
Catch-22 if and when current flows, chlorine ions convert to gas preferentially, and PVC is resistant to the gas. Bottom line, it would not be easy to chlorinate PVC by electrolysis. From: James Bowery Let's say you have a solution of NaCl and place an anode and a cathode into it. Ordinarily you'll get chlorine evolving at the anode and hydrogen at the cathode. What if you sealed the anode in (insulating) polyvinyl chloride? Would the PVC convert to chlorinated polyvinyl chloride and liberate hydrogen gas there as well? I mean Cl- ions are being attracted to the positive electric potential of the anode even through its surface is not conducting, and quoting the Wikipedia article on CPVC <http://en.wikipedia.org/wiki/Chlorinated_polyvinyl_chloride> production: Chlorinated Polyvinyl Chloride (CPVC) is PVC (polyvinyl chloride) that has been chlorinated via a free radical chlorination <http://en.wikipedia.org/wiki/Free_radical_halogenation> reaction. This reaction is typically initiated by application of thermal or UV <http://en.wikipedia.org/wiki/Ultraviolet> energy utilizing various approaches. In the process, chlorine <http://en.wikipedia.org/wiki/Chlorine> gas is decomposed into free radical <http://en.wikipedia.org/wiki/Radical_(chemistry)> chlorine which is then reacted with PVC in a post-production step, essentially replacing a portion of the hydrogen in the PVC with chlorine.

