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.

<do-if>
<arg-conditions>
<and>
<if-global-variable mode="nocase" name="gcvDebug" op="equal">true</if-global-variable>
</and>
</arg-conditions>
<arg-actions>
<do-trace-message color="brgreen">
<arg-string>
<token-local-variable name="var1"/>
</arg-string>
</do-trace-message>
</arg-actions>
<arg-actions/>
</do-if>
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?