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

Method getGeneratorFunctionPrototype

builtin_function.go:361–369  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359}
360
361func (r *Runtime) getGeneratorFunctionPrototype() *Object {
362 var o *Object
363 if o = r.global.GeneratorFunctionPrototype; o == nil {
364 o = &Object{runtime: r}
365 r.global.GeneratorFunctionPrototype = o
366 o.self = r.createGeneratorFunctionProto(o)
367 }
368 return o
369}
370
371func (r *Runtime) createGeneratorFunction(val *Object) objectImpl {
372 o := r.newNativeFuncConstructObj(val, r.builtin_generatorFunction, "GeneratorFunction", r.getGeneratorFunctionPrototype(), 1)

Callers 4

createGeneratorProtoMethod · 0.95
newGeneratorFuncMethod · 0.95
newGeneratorMethodMethod · 0.95

Calls 1

Tested by

no test coverage detected