Detect edge://flags/#edge-click-once enabled in Chromium Edge

Viewed 2827

We have an application that starts via Click Once in the browser. Since Chromium Edge, Click Once isn't enabled by default. You can enable this setting via edge://flags/#edge-click-once.

I would like to detect if this setting is enabled. If not i would like to direct them to a support page with instructions to enable it.

I don't have access to clients browser in anyway. So I would like to detect this via JavaScript.

1 Answers

I think the flags can't be accessed through js, because js codes can be executed in any browsers. We can't only target the features in a certain browser. I also searched a lot and find no way. Maybe Extension can do this, but I think that will take a lot of effort to research.

As this feature is not enabled by Edge Chromium by default, I think the easiest workaround is to detect the browser version, if Edge Chromium, then remind the user to check if the feature is enabled:

var checkbrowser = (function(agent) {

  if (agent.indexOf("edg") > -1) {  //check if Edge Chromium
    return "the page of showing how to enable clickonce support";
  } else {
    return "not Edge Chromium"
  }

})(window.navigator.userAgent.toLowerCase());

document.body.innerHTML = checkbrowser;

Besides, if your application is used in an enterprise and someone has access to the group policy, you can also suggest IT department to set this group policy: ClickOnceEnabled to enable clickonce in Edge Chromium.

Related