Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/flimzy/onload
- Owner: flimzy
- License: mit
- Created: 2016-07-11T20:06:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-11T21:53:53.000Z (almost 8 years ago)
- Last Synced: 2024-10-02T09:55:18.188Z (3 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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.