Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flimzy/onload

Onload handler for GopherJS without the bloat of jQuery
https://github.com/flimzy/onload

Last synced: 2 months ago
JSON representation

Onload handler for GopherJS without the bloat of jQuery

Awesome Lists containing this project

README

        

[![GoDoc](https://godoc.org/github.com/flimzy/onload?status.png)](http://godoc.org/github.com/flimzy/onload)

**onload** is a very simple module, designed to provide cross-browser, jQuery-like onload
functionality without the bloat of jQuery. It is writen entirely in Go. To use it:

package main

import (
"fmt"
"github.com/flimzy/onload"
)

func main() {
onload.Ready( func() {
fmt.Print("The document is ready!\n")
})
}

This code is based on [this StackOverflow answer](http://stackoverflow.com/a/9899701/13860),
but somewhat simplified, and of course adapted to Go.

This software is released under the terms of the MIT license. See LICENSE.txt for details.