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

Method Get

value.go:806–808  ·  view source on GitHub ↗

Get an object's property by name. This method will panic with an *Exception if a JavaScript exception is thrown in the process. Use Runtime.Try to catch these.

(name string)

Source from the content-addressed store, hash-verified

804// Get an object's property by name.
805// This method will panic with an *Exception if a JavaScript exception is thrown in the process. Use Runtime.Try to catch these.
806func (o *Object) Get(name string) Value {
807 return o.self.getStr(unistring.NewFromString(name), nil)
808}
809
810// GetSymbol returns the value of a symbol property. Use one of the Sym* values for well-known
811// symbols (such as SymIterator, SymToStringTag, etc...).

Callers 5

TestDefinePropertyFunction · 0.95
ExampleObject_DeleteFunction · 0.95

Calls 2

NewFromStringFunction · 0.92
getStrMethod · 0.65

Tested by 5

TestDefinePropertyFunction · 0.76
ExampleObject_DeleteFunction · 0.76