github.com/gopherjs/gopherjs@v1.19.0-beta1.0.20240506212314-27071a8796e4/js/js_test.go (about)

     1  //go:build js
     2  // +build js
     3  
     4  package js_test
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/gopherjs/gopherjs/js"
    10  )
    11  
    12  func TestInternalizeCircularReference(t *testing.T) {
    13  	// See https://github.com/gopherjs/gopherjs/issues/968.
    14  	js.Global.Call("eval", `
    15  	var issue968a = {};
    16  	var issue968b = {'a': issue968a};
    17  	issue968a.b = issue968b;`)
    18  	_ = js.Global.Get("issue968a").Interface()
    19  }