EOSJS added a new feature to their library and now we can specify the resource payer.
I wanted to try and use it but their example doesn't work.
Did you setup your own eosio chain to test the feature? None of the public blockchains I am aware of have activated the RESOURCE_PAYER feature on the blockchain side. (That is none of Jungle, Kylin, EOSIO Testnet, EOS, WAX)
New protocol features are only avalable after feature activation.
here is the link: how to use resource_payer
It's not available on Wax that I had tested!