You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a situation where a website wants to perform an action once the metrics call is complete, it would be nice to be able to return a promise from the custom adapter (or pass in a callback to be called upon completion). Right now, the invoke method sends off the requests to the adapters, but there is no mechanism to allow something returned from the adapter to be returned back to the app. So even if the adapter is written to return a promise, it cannot.
It might be simpler to allow a callback to be passed along to the adapter, but I think a promise would be the preferable option.
As for a use case, I'm in a situation where we'd like to push an event when the user logs out, but would need to delay a page redirect to login until the call finishes, or the browser just aborts the request (if the request is ever even fired, depending on implementation in the adapter). But I imagine there are plenty of other use cases for knowing when the metrics call is complete.
If there is interest, I may be able to take a look at what it would take to implement.
The text was updated successfully, but these errors were encountered:
In a situation where a website wants to perform an action once the metrics call is complete, it would be nice to be able to return a promise from the custom adapter (or pass in a callback to be called upon completion). Right now, the
invoke
method sends off the requests to the adapters, but there is no mechanism to allow something returned from the adapter to be returned back to the app. So even if the adapter is written to return a promise, it cannot.It might be simpler to allow a callback to be passed along to the adapter, but I think a promise would be the preferable option.
As for a use case, I'm in a situation where we'd like to push an event when the user logs out, but would need to delay a page redirect to login until the call finishes, or the browser just aborts the request (if the request is ever even fired, depending on implementation in the adapter). But I imagine there are plenty of other use cases for knowing when the metrics call is complete.
If there is interest, I may be able to take a look at what it would take to implement.
The text was updated successfully, but these errors were encountered: