Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Code Snippets

Zach Teutsch edited this page Jan 27, 2022 · 1 revision

Did you know Progressive Web Applications can integrate with Native Windows (and Android, macOS etc!) features such as the file system, sharing, notifications and more?

Using our Snippets, you can easily implement some of these features in seconds, using the built in snippet system in VSCode.

Just start typing the Trigger of the snippet you would like to use and VSCode will do the rest!

Supported Snippets

Trigger Supported languages Content
pwa-badge-display javascript, typescript Display a badge on a PWA app icon by using the App Badging API
pwa-badge-clear javascript, typescript Remove the badge on the PWA app icon.
pwa-notification-request-permission javascript, typescript Request user's permission to display messages.
pwa-notification-display javascript, typescript Display a notification by creating a Notification object.
pwa-notification-display-sw javascript, typescript Display a notification with actions from app's service worker.
pwa-notification-click-sw javascript, typescript Handle the click of actions in notification.
pwa-file-launch javascript, typescript Access file content when an app is launched by the OS after a file was opened.
pwa-icons json Define the icons member in the web app manifest file.
pwa-theme-color json Define the theme_color member in the web app manifest file.
pwa-file-handlers json Define the file_handlers array member in the app manifest file to declare which types of files an app handles.
Clone this wiki locally