[ https://issues.apache.org/jira/browse/GUACAMOLE-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645865#comment-17645865 ]
Nick Couchman commented on GUACAMOLE-1402: ------------------------------------------ [~mjumper]: Thanks for merging the client code changes - any documentation that needs to be updated for this one? > Expose client state enum values > ------------------------------- > > Key: GUACAMOLE-1402 > URL: https://issues.apache.org/jira/browse/GUACAMOLE-1402 > Project: Guacamole > Issue Type: Improvement > Components: guacamole-common-js > Reporter: Joel Berger > Assignee: Nick Couchman > Priority: Major > Fix For: 1.6.0 > > > In Client.js you have what is essentially an enum of state values > ([https://github.com/apache/guacamole-client/blob/a54c78554f855bb5a0f49011a8f6e576a6bde164/guacamole-common-js/src/main/webapp/modules/Client.js#L35-L40]) > and these are exposed to the user via the onstatechange callback, however > the enum names are not exposed to the user, being function-scoped variables. > Having access to these states by name would allow the user to write more > self-documenting code and insulate from changes in the underlying state > values. This practice is common in compiled languages. > Indeed you do so correctly in Tunnel.js where you have a very similar > construct that IS properly exposed to the user > ([https://github.com/apache/guacamole-client/blob/a54c78554f855bb5a0f49011a8f6e576a6bde164/guacamole-common-js/src/main/webapp/modules/Tunnel.js#L190-L224]). > Could the state values in Client.js please be similarly exposed? -- This message was sent by Atlassian Jira (v8.20.10#820010)