Skip to content

Cancel request before it is sent #369

@Nateowami

Description

@Nateowami

Is it possible to cancel an action before the corresponding HTTP request is sent?

From the readme, here's what we have to work with before a message is sent.

gmail.observe.before('send_message', function(url, body, data, xhr){ }

I was thinking it might be possible to cancel the xhr request, but it hasn't even been sent yet.

The use case it to perform a check and prompt the user for confirmation if certain conditions are met.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions