tc39 / proposal-shadowrealm

ECMAScript Proposal, specs, and reference implementation for Realms
https://tc39.es/proposal-shadowrealm/
1.43k stars 67 forks source link

Spec Text for WrappedFunctionCreate: argument not function #366

Closed mgaudet closed 2 years ago

mgaudet commented 2 years ago

Just a nitpick in the spec text: "WrappedFunctionCreate ( callerRealm: a Realm Record, Target: a function object, )"

The second argument isn't a function, but is any callable, based on the guard of GetWrappedValue.

nicolo-ribaudo commented 2 years ago

Isn't that exactly the definition of "function object"? https://tc39.es/ecma262/#function-object

mgaudet commented 2 years ago

Hah. You're right. I didn't realize that. I was mislead by the IsCallable check, so I had assumed callable != function object.