Stay organized with collections
Save and categorize content based on your preferences.
Functions
isSupported
- isSupported
(
)
:
boolean
-
Returns boolean
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-09-28 UTC.
[null,null,["Last updated 2023-09-28 UTC."],[],[],null,["- [firebase](/docs/reference/js/v8/firebase).\n- messaging \nThe Messaging SDK does not work in a Node.js environment.\n\nCallable\n\n- messaging ( app ? : [App](/docs/reference/js/v8/firebase.app.App) ) : [Messaging](/docs/reference/js/v8/firebase.messaging.Messaging)\n- Gets the [`Messaging`](/docs/reference/js/v8/firebase.messaging.Messaging) service for the\n default app or a given app.\n\n `firebase.messaging()` can be called with no arguments to access the default\n app's [`Messaging`](/docs/reference/js/v8/firebase.messaging.Messaging) service or as\n `firebase.messaging(app)` to access the\n [`Messaging`](/docs/reference/js/v8/firebase.messaging.Messaging) service associated with a\n specific app.\n\n Calling `firebase.messaging()` in a service worker results in Firebase\n generating notifications if the push message payload has a `notification`\n parameter.\n\n The Messaging SDK does not work in a Node.js environment.\n\n example\n :\n\n // Get the Messaging service for the default app\n var defaultMessaging = firebase.messaging();\n\n\n example\n :\n\n // Get the Messaging service for a given app\n var otherMessaging = firebase.messaging(otherApp);\n\n\n namespace\n :\n\n Parameters\n -\n\n Optional app: [App](/docs/reference/js/v8/firebase.app.App) \n The app to create a Messaging service for.\n If not passed, uses the default app.\n\n Returns [Messaging](/docs/reference/js/v8/firebase.messaging.Messaging)\n\nIndex\n\nInterfaces\n\n- [FcmOptions](/docs/reference/js/v8/firebase.messaging.FcmOptions)\n- [MessagePayload](/docs/reference/js/v8/firebase.messaging.MessagePayload)\n- [Messaging](/docs/reference/js/v8/firebase.messaging.Messaging)\n- [NotificationPayload](/docs/reference/js/v8/firebase.messaging.NotificationPayload)\n\nFunctions\n\n- [isSupported](/docs/reference/js/v8/firebase.messaging#issupported)\n\nFunctions\n\nisSupported\n\n- isSupported ( ) : boolean\n-\n\nReturns boolean"]]
The Messaging SDK does not work in a Node.js environment.