Created
November 17, 2015 15:57
-
-
Save nadako/f2485473972546abb710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@:jsRequire("remote") | |
extern class Remote { | |
static function require(module:String):Dynamic; | |
} | |
extern class BrowserWindow { | |
function new(); | |
} | |
@:jsRequire("browser-window") | |
extern class LocalBrowserWindow extends BrowserWindow { | |
} | |
extern class RemoteBrowserWindow extends BrowserWindow { | |
static function __init__():Void { | |
untyped RemoteBrowserWindow = Remote.require("browser-window"); | |
} | |
} | |
class Main { | |
static function main() { | |
var localWin = new LocalBrowserWindow(); | |
var remoteWin = new RemoteBrowserWindow(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by Haxe | |
(function () { "use strict"; | |
var Remote = require("remote"); | |
var LocalBrowserWindow = require("browser-window"); | |
var Main = function() { }; | |
Main.main = function() { | |
var localWin = new LocalBrowserWindow(); | |
var remoteWin = new RemoteBrowserWindow(); | |
}; | |
RemoteBrowserWindow = Remote.require("browser-window"); | |
Main.main(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment