Page 1 of 1

Headless client and scope method

PostPosted: Wed Jan 27, 2021 7:11 pm
by steve1376656734
Looking at the documentation for plugins.headlessclient I can see that you can queue a method to be run in the headless client using client.queueMethod(). The first argument to the function is the context for the method and the documentation says to set it to the name of a form to run a form method or null for a global method. Is it possible to run a scope method (scopes.scopeName.methodName) and if so how?

Thanks
Steve

Re: Headless client and scope method

PostPosted: Wed Jan 27, 2021 7:21 pm
by jcompagner
scopes are also "global" methods

so you can give ("scopes.somescope", "functionname")

or even (null , scopes.somescope.functionname")

because of the scopes is null we try to extract it from the method name