Skip to content

j7b/jsplayground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JS Playground

This is a fork of the gopherjs playground. The main differences are the actual compiler and related functionality are as decoupled from the web interface as much as possible using ec2015 promises and the generate script is replaced with a Go program.

Javascript

// Compile returns a Promise that resolves to the compiled Javascript and rejects with any error(s)
Go.Compile(source)
// Format returns a Promise that resolves to the formatted source and rejects with errors
Go.Format(source,imports)
// RedirectConsole redirects standard output from GopherJS code to function(line)
Go.RedirectConsole(function(line))
// PackageURI sets URI for loading packages
Go.PackageURI(uri string)
// SyncImport synchronously loads package dependencies (may be slow)
Go.SyncImport(bool)

TODO

Fix imports.json generation (methods of public types)

About

GopherJS compiler in browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages