Show / Hide Table of Contents
Fork me on GitHub

Accessing Chromium API

Neutronium provides some hooks when you need to access some low-level Chromium API

Chromium command line

Neutronium ChromiumFx application: ChromiumFxWebBrowserApp provides a UpdateLineCommandArg method that when overridden allow to provide custom command line switch.

This method receives a CfxOnBeforeCommandLineProcessingEventArgs instance as argument.

Example to disable same-origin-policy:

protected override void UpdateLineCommandArg(CfxOnBeforeCommandLineProcessingEventArgs beforeLineCommand)
{
    beforeLineCommand.CommandLine.AppendSwitch("disable-web-security");
}
  • See example solution Example.ChromiumFX.Vue.SOP for complete example.

  • See here for a list of available Chromium switches: https://peter.sh/experiments/chromium-command-line-switches/

Chromium settings

ChromiumFxWebBrowserApp provides a UpdateChromiumSettings method that when overridden allow to update ChromiumFxSetting.

protected override void UpdateChromiumSettings(CfxSettings settings) 
{
    // edit settings here
}
  • Improve this Doc
Back to top Generated by DocFX