You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GopherJS is able to turn itself (and all packages it uses) into pure JavaScript code that runs in all major browsers. This suggests a quite good coverage of Go's specification. However, there are some known exceptions listed below and some unknown exceptions that I would love to hear about when you find some.
7
6
8
-
Not yet supported
9
-
-----------------
7
+
### Not yet supported
10
8
Those features are not implemented yet, but on the roadmap:
11
9
12
10
- implicit panics (division by zero, etc.)
@@ -15,13 +13,11 @@ Those features are not implemented yet, but on the roadmap:
15
13
- goroutines, channels, select
16
14
- goto
17
15
18
-
Derivations from Go specification
19
-
---------------------------------
16
+
### Derivations from Go specification
20
17
Some tradeoffs have to be made in order to avoid huge performance impacts. Please get in contact if those are deal breakers for you.
21
18
22
19
- int32, uint32, int64 and uint64 have emulated overflow, all other integer types do not
23
20
- calls on nil cause a panic except for slice types
24
21
25
-
Interface to external JavaScript
26
-
--------------------------------
22
+
### Interface to external JavaScript
27
23
A function's body can be written in JavaScript by putting the code in a string constant with the name `js_[function name]` for package functions and `js_[type name]_[method name]` for methods. In that case, GopherJS disregards the Go function body and instead generates `function(...) { [constant's value] }`. This allows functions to have a Go signature that the type checker can use while being able to call external JavaScript functions.
0 commit comments