Skip to content

Commit

Permalink
Learn about gopherjs/gopherjs#319.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitshur committed Oct 8, 2015
1 parent 43169be commit c66364e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 161/index.html
@@ -0,0 +1,13 @@
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script type="text/javascript">
document.write("[JavaScript] text and 😀 both work <br/>");
document.write("[JavaScript es6] text and \u{1F600} also works? <br/>");
</script>

<script type="text/javascript" src="161.js"></script>
</body>
</html>
25 changes: 25 additions & 0 deletions 161/script.go
@@ -0,0 +1,25 @@
// +build js

package main

import (
"github.com/gopherjs/gopherjs/js"
)

func main() {
js.Global.Get("document").Call("write", "[GopherJS] text works, but 😀 fails")
}

/*
package main
import "fmt"
func main() {
in := 128512
fmt.Printf(`\u{%X}`, in)
// Output: \u{1F600}
}
*/

0 comments on commit c66364e

Please sign in to comment.