capacitor-community / capacitor-community/electron

Detecting electron

Open
#199 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
398
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Apologies if this is in the documentation, I've looked through them and couldn't find the answer. What is the appropriate way of detecting that capacitor is running through electron? The best way I've found is that `Capacitor.getPlatform() !== "web"` AND `Device.getInfo()` (from the @capacitor/device plugin) returns an object with `platform` set to `"web"` which is pretty weird!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.