Skip to content

Add [DEPRECATED] to off #7846

Open
Open
@marcusx2

Description

Operating System

macOS

Browser Version

Safari 16.5.2

Firebase SDK Version

10.7.0

Firebase SDK Product:

Database

Describe your project's tooling

index.html with source tag. Just javascript.

Describe the problem

The off method exists but at the same time the documentation says Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from the respective on* callbacks. which leads me to believe that this method comes from the old v8 api and only still exists for compatibility reasons and to facilitate people moving from v8 to v9. Is there a legitimate case where I should use this method instead of the returned callback from the on methods?

Steps and code to reproduce issue

Already explained.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions