A quaternary ammonium-functionalized poly(arylene ether sulfone) copolymer for moisture-swing CO2 capture, comprising a polysulfone copolymer having a copolymerization unit based on diallyl bisphenol A (DABA) and comprising quaternary ammonium functionalities, wherein the quaternary ammonium functionalities are pendant from a backbone of the polysulfone copolymer at allyl sites of the copolymerization unit based on DABA, and wherein the allyl functionalities are converted to tertiary amines via a thiol-ene click reaction using a tertiary-amine-containing thiol group and a photoinitiator.