Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 738 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 738 Bytes

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.