Use electron.main.App.commandLine type
`electron.main.App.commandLine` is now defined in electron externs, no need for untyped workaround anymore.
This commit is contained in:
@@ -7,7 +7,7 @@ class ElectronSetup {
|
||||
|
||||
static function main()
|
||||
{
|
||||
untyped (electron.main.App).commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
|
||||
electron.main.App.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
|
||||
|
||||
var windows:Array<OpenFLWindow> = [
|
||||
::foreach windows::
|
||||
@@ -46,9 +46,7 @@ class ElectronSetup {
|
||||
if (height == 0) height = 600;
|
||||
var frame:Bool = window.borderless == false;
|
||||
|
||||
var commandLine = Reflect.getProperty(electron.main.App, "commandLine");
|
||||
var appendSwitch:haxe.Constraints.Function = Reflect.getProperty(commandLine, "appendSwitch");
|
||||
appendSwitch('--autoplay-policy','no-user-gesture-required');
|
||||
electron.main.App.commandLine.appendSwitch('--autoplay-policy','no-user-gesture-required');
|
||||
|
||||
electron.main.App.on( 'ready', function(e) {
|
||||
var config:Dynamic = {
|
||||
@@ -100,4 +98,4 @@ typedef OpenFLWindow =
|
||||
width:Int,
|
||||
x:Int,
|
||||
y:Int
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user