Safari includes “bound ” in the name of bound functions.
mbostock opened this issue · comments
Mike Bostock commented
Which… is weird.
Promise.resolve.bind(Promise)
ƒ bound resolve()
And
Promise.resolve.bind(Promise).name
"bound resolve"
But
Promise.resolve.bind(Promise) + ""
`function resolve() {
[native code]
}`
Not sure if we should workaround this or just let Safari be Safari.
Tom MacWright commented
This actually looks pretty uniform - MDN documents it and I can replicate in Chrome, Firefox, and Node that binding a method adds the bound
prefix to its name.
I think... we have no responsibility to be pedantic about showing functions with exactly what function.name
gives us, and we should remove the bound
prefix. Eh?
Tom MacWright commented
Okay, we're following developer console precedent and keeping the bound
in.