MCPcopy
hub / github.com/gopherjs/gopherjs / New

Method New

js/js.go:56–56  ·  view source on GitHub ↗

New creates a new instance of this type object. This will fail if it not a function (constructor).

(args ...any)

Source from the content-addressed store, hash-verified

54
55// New creates a new instance of this type object. This will fail if it not a function (constructor).
56func (o *Object) New(args ...any) *Object { return o.object.New(args...) }
57
58// Bool returns the object converted to bool according to JavaScript type conversions.
59func (o *Object) Bool() bool { return o.object.Bool() }

Callers 15

mainFunction · 0.45
MakeWrapperFunction · 0.45
MakeFullWrapperFunction · 0.45
experiments.goFile · 0.45
scanFileMethod · 0.45
testmain.goFile · 0.45
RlimitStackFunction · 0.45
GetMethod · 0.45
TestReflectSetForEmbedFunction · 0.45
TestIssue780Function · 0.45
Test_parseCallFrameFunction · 0.45
TestGoroutineJsObjectFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestReflectSetForEmbedFunction · 0.36
TestIssue780Function · 0.36
Test_parseCallFrameFunction · 0.36
TestGoroutineJsObjectFunction · 0.36
TestNewFunction · 0.36
TestReadingJsFieldFunction · 0.36
TestWritingJsFieldFunction · 0.36
TestCallingJsFieldFunction · 0.36
TestReflectionOnJsFieldFunction · 0.36
TestUnboxingFunction · 0.36
TestBoxingFunction · 0.36
TestDateFunction · 0.36