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

Method isExtensible

proxy.go:335–345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

333}
334
335func (p *proxyObject) isExtensible() bool {
336 target := p.target
337 if booleanTrapResult, ok := p.checkHandler().isExtensible(p.target); ok {
338 if te := target.self.isExtensible(); booleanTrapResult != te {
339 panic(p.val.runtime.NewTypeError("'isExtensible' on proxy: trap result does not reflect extensibility of proxy target (which is '%v')", te))
340 }
341 return booleanTrapResult
342 }
343
344 return target.self.isExtensible()
345}
346
347func (p *proxyObject) preventExtensions(throw bool) bool {
348 target := p.target

Callers

nothing calls this directly

Calls 3

checkHandlerMethod · 0.95
NewTypeErrorMethod · 0.80
isExtensibleMethod · 0.65

Tested by

no test coverage detected