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

Method GetOwnPropertyNames

value.go:833–839  ·  view source on GitHub ↗

GetOwnPropertyNames returns a list of all own string properties of the Object, similar to Object.getOwnPropertyNames() This method will panic with an *Exception if a JavaScript exception is thrown in the process. Use Runtime.Try to catch these.

()

Source from the content-addressed store, hash-verified

831// GetOwnPropertyNames returns a list of all own string properties of the Object, similar to Object.getOwnPropertyNames()
832// This method will panic with an *Exception if a JavaScript exception is thrown in the process. Use Runtime.Try to catch these.
833func (o *Object) GetOwnPropertyNames() (keys []string) {
834 for item, next := o.self.iterateStringKeys()(); next != nil; item, next = next() {
835 keys = append(keys, item.name.String())
836 }
837
838 return
839}
840
841// Symbols returns a list of Object's enumerable symbol properties.
842// This method will panic with an *Exception if a JavaScript exception is thrown in the process. Use Runtime.Try to catch these.

Callers 1

Calls 2

iterateStringKeysMethod · 0.65
StringMethod · 0.65

Tested by 1