Capacitor plugins vs HTML5 features?

Many of the capacitor plugins have HTML5 equivalents… for example, geolocation, camera access, google maps, and notifications can all be done with plain old HTML5 and javascript.

For these features, what is the advantage of using a capacitor plugin over browser-native HTML5 capabilities?

(I assume that, even when compiled to android/ios apps, the HTML5 features will still work as it would in the browser/PWA.)

ionic is just a builder, do javascript you want :slight_smile:

Many Capacitor plugins provide web equivalencies so that the plugin can be used both when running on device as well as in the browser. If a plugin does not have web compatibility, that’s something a developer would need to work around as that code wouldn’t function when running in a browser, which is the primary place where you are doing dev work for your app.

One of the great things though, is that you can mostly rely on web APIs when they are available instead of plugins. Ex. <input type="file" /> will work on both web and on devices to allow a user to upload a picture because it is a standard web API. However using the Camera plugin is able to provide additional native interactions to help it feel more natural when running on device. It very much comes down your preferences and where you’re deploying to