Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58868bc

Browse files
author
Joseph Hager
committed
Merge pull request #3 from shurcooL/patch-2
Minor example tweaks.
2 parents 0b2d0d7 + 070362b commit 58868bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func main() {
2626

2727
gl, err := webgl.NewContext(canvas, attrs)
2828
if err != nil {
29-
panic(err)
29+
js.Global.Call("alert", "Error: "+err.Error())
3030
}
3131

3232
gl.ClearColor(0.8, 0.3, 0.01, 1)
@@ -37,7 +37,7 @@ func main() {
3737
webgl_example.html:
3838

3939
```html
40-
<html><head></head><body><script src="webgl_example.js"></script></body></html>
40+
<html><body><script src="webgl_example.js"></script></body></html>
4141
```
4242

4343
To produce `webgl_example.js` file, run `gopherjs build webgl_example.go`.

0 commit comments

Comments
 (0)