Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript: Distinguish between native and non-native member

Is there any way to detect whether a given function, say Array.prototype.forEach, is a native function (e.g. the browser implements ECMAScript5) or a function added by a page's JavaScript script(s)?

like image 655
FoobarisMaximus Avatar asked May 01 '26 20:05

FoobarisMaximus


1 Answers

You can try putting it to the console and seeing what comes up there.

like image 141
Naftali Avatar answered May 05 '26 08:05

Naftali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!