03:18 | <sideshowbarker> | I’m confused about why we have an article at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction in MDN for a GeneratorFunction() constructor and global object when there is no such constructor and object in th spec |
03:18 | <sideshowbarker> | but then I look in the spec at https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-generatorfunction-constructor and I see a whole section on The GeneratorFunction Constructor… |
03:19 | <sideshowbarker> | ah I see the spec defines it as an intrinsic |
03:23 | <bakkot> | it exists it's just not a property of the global object |
03:27 | <sideshowbarker> | bakkot: so in looking at the spec, how can I tell that it’s not a property of the global object? |
03:28 | <sideshowbarker> | and does not being a property of the global object mean it’s not callable at all from user JavaScript code? |
03:28 | <sideshowbarker> | not even observable? |
03:32 | <jmdyck> | You can tell it's not a property of the global object because it's not listed as such in section 19. |
03:34 | <jmdyck> | and also because 27.3.1 "The GeneratorFunction Constructor" doesn't have a bullet saying is the initial value of the "Foo" property of the global object |
03:36 | <jmdyck> | But you can't tell by looking at https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-generatorfunction, which is maybe unfortunate. |
03:37 | <sideshowbarker> | yeah |
04:02 | <bakkot> | for the non-global-property ones we could reasonably add a bullet saying "Is not exposed as a property of the global object", I suppose |
04:04 | <jmdyck> | https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object says "does not have a global name or appear as a property of the global object", but it's the only one. |
21:25 | <ljharb> | we could also just … start exposing it |