Just take note on this. You have a single javascript called notifications.js in which you're declaring multiple classes belonging to webNotification. If you were in rails, would you do this? you could move to a propper folders / namespaces, like for example

webnotification.js
webnotification/
    check_permission.js
    get_permission.js
    ...

remember the hierarchy of the files and its structure