MCPcopy Create free account
hub / github.com/dop251/goja / Export

Method Export

value.go:791–793  ·  view source on GitHub ↗

Export the Object to a plain Go type. If the Object is a wrapped Go value (created using ToValue()) returns the original value. If the Object is a class function, returns func(ConstructorCall) *Object. See the note about exceptions below. If the Object is a function, returns func(FunctionCall) Val

()

Source from the content-addressed store, hash-verified

789//
790// This method will panic with an *Exception if a JavaScript exception is thrown in the process. Use Runtime.Try to catch these.
791func (o *Object) Export() interface{} {
792 return o.self.export(&objectExportCtx{})
793}
794
795// ExportType returns the type of the value that is returned by Export().
796func (o *Object) ExportType() reflect.Type {

Callers 1

TestExportCircularFunction · 0.95

Calls 1

exportMethod · 0.65

Tested by 1

TestExportCircularFunction · 0.76