In the first part of the recipe, we did the following:
- Importing using importScripts considering it a script tag with src attribute in HTML, the firebase app, and messaging libraries. Then, we're introducing our Firebase Config object. We've already discussed where you can grab that object content in the previous chapters.
- Initializing our Firebase app with our config file.
- Creating a new reference from firebase.messaging library--always remember that everything in Firebase starts with a reference.
Let's discuss what we did previously in the section where we talked about getting the registration_token value:
- We're using the Firebase messaging reference that we created earlier and executing the requestPermission() function, ...