SImple cross-browser onload (document ready) handler written in go for gopherjs.

Jonathan Hall df05696124 A couple small fixes 5 years ago
LICENSE.txt 883053bff3 initial commit 6 years ago
README.md 5b82b1d2f0 Add a little documentation 6 years ago
onload.go df05696124 A couple small fixes 5 years ago

README.md

GoDoc

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, 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.