Recipes
Version 1.0.0 Breaking Changes
With version 1.0.0
of @todesktop/client-core
now released, please make note of the following breaking changes:
Updated signature when unsubscribing from listeners
Previously, creating listeners involved managing an eventId and passing it to an off invocation:
Now, every on
invocation will return a unsubscribe function. You can then execute this function to unsubscribe from the listener (note that unsubscribe is a function that returns a Promise
and can thus be awaited):
Naturally, this means we've removed off
and removeEventListener
from our namespace objects:
For the sake of completeness, we've also removed addEventListener
as the on
function is now preferred:
object
namespace
New For version 1.0.0
, we're exposing a new object
namespace. The object
namespace allows you to programmatically control resources that you have defined in the ToDesktop Builder interface. For now, we're including support for controlling trays. See the following for an example:

You can find a full recipe here.
releaseMemoryBindings
moved to object namespace
Finally, we've moved releaseMemoryBindings
from the performance namespace to the object namespace. This is particularly useful if you're managing a lot of object references and want to optimize performance.
Before:
After: