Skip to content

ghuba/Blink.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blink.jl

Build Status

Blink.jl is the Julia wrapper around Electron. It can serve HTML content in a local window, and allows for communication between Julia and the web page. In this way, therefore, Blink can be used as a GUI toolkit for building HTML-based applications for the desktop.

To install, do:

julia> Pkg.add("Blink")
# ... Blink builds and downloads Electron ...
julia> using Blink
julia> Blink.AtomShell.install()

Basic usage:

julia> using Blink

julia> w = Window() # Open a new window
Blink.AtomShell.Window(...)

julia> body!(w, "Hello World") # Set the body content

julia> loadurl(w, "http://julialang.org") # Load a web page

For options see the functions defined in window.jl, which closely follow electron's API.

You can also use the JS API to interact with the window. For example:

julia> @js w Math.log(10)
2.302585092994046

If that's not convincing enough, open the console (Cmd-Alt-I on OS X) and evaluate:

@js w console.log("hello, web-scale world")

Issues & Caveats

  • On Windows, the spawned process dumps its output into Julia's STDOUT, which is kind of annoying.

About

Web-based GUIs for Julia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 72.0%
  • JavaScript 15.3%
  • CSS 10.4%
  • HTML 2.3%