Web-based GUIs for Julia
Julia JavaScript CSS HTML
Clone or download
NHDaly Merge pull request #136 from NHDaly/synchronous
Add `async` option to make `body!()` and `content!()` (a)synchronous.
Latest commit 3eff499 Aug 15, 2018



Linux, OSX: Build Status

Blink.jl provides a API for communicating with web pages from Julia. Pages may be served over the internet and controlled from the browser, or served locally via an Electron window. Blink can therefore be used as a GUI toolkit – DevTools.jl for an example use.

To install, do:


Basic usage:

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

julia> using Blink

julia> w = Window() # Open a new 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)

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.