var value = obj.getVirtualMode(); obj.setVirtualMode(value); obj.onVirtualModeChanging = function(value){...}; obj.onVirtualModeChanged = function(value){...}; obj.onVirtualModeError = function(value){...};