and I also cannot find a way to do this from the Javascript code.
If you want I can try to add on our side of the code a default constructor for "WSOptionListener" and an extra method "setKey", in this way the Javascript which would add the listener: