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

Method initBaseJsFunction

runtime.go:599–607  ·  view source on GitHub ↗
(f *baseJsFuncObject, strict bool)

Source from the content-addressed store, hash-verified

597}
598
599func (r *Runtime) initBaseJsFunction(f *baseJsFuncObject, strict bool) {
600 v := &Object{runtime: r}
601
602 f.class = classFunction
603 f.val = v
604 f.extensible = true
605 f.strict = strict
606 f.prototype = r.getFunctionPrototype()
607}
608
609func (r *Runtime) newMethod(name unistring.String, length int, strict bool) (f *methodFuncObject) {
610 f = &methodFuncObject{}

Callers 7

newFuncMethod · 0.95
newAsyncFuncMethod · 0.95
newGeneratorFuncMethod · 0.95
newMethodMethod · 0.95
newGeneratorMethodMethod · 0.95
newAsyncMethodMethod · 0.95
initArrowFuncMethod · 0.95

Calls 1

getFunctionPrototypeMethod · 0.95

Tested by

no test coverage detected