by geocar · 5y ago · 0 comments
Are you sure? You can make “native code” functions with .bind(null)
(function(){ var a=function(){};a.prototype.toString=navigator.credentials.create.toString.bind(navigator.credentials.create); return new a();})().toString()toString.name
Which results "bound toString" wheres real one results "toString"
(function(){ var a=function(){};a.prototype.toString=navigator.credentials.create.toString.bind(navigator.credentials.create); return new a();})().toString == Function.prototype.toString
yields false where
navigator.credentials.create.toString == Function.prototype.toString
yields true