Do you know about the way (documented or not) to access from function in ECMAScript to Driver/DriverSet GCV?

I use in my drivers special boolean GCV: gcvDebug.
If this gcvDebug=true, I add some information to the trace.

<if-global-variable mode="nocase" name="gcvDebug" op="equal">true</if-global-variable>
<do-trace-message color="brgreen">
<token-local-variable name="var1"/>
I would like to use the similar method from ECMAScript function.

I didn't find any documentation or examples of access from ECMAScript function to Driver/DriverSet GCV.
May be somebody know, how to do it?