You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
util.inspect shouldn’t format objects with the [[IsHTMLDDA]] internal slot as undefined #31889
I suppose this would matter when using electron, since you could actually do util.inspect(document.all). I can add an upstream Object::IsUndetectable and we could check it here.
We could also hack this in as typeof v === 'undefined' && v !== undefined.
That would take care of that check, as C++ code doesn’t care whether an object is undetectable, since you can pass document.all as the this value to both Function.prototype.toString, Object.prototype.toString and Object.prototype.valueOf.
Activity
devsnek commentedon Feb 20, 2020
I suppose this would matter when using electron, since you could actually do
util.inspect(document.all). I can add an upstream Object::IsUndetectable and we could check it here.We could also hack this in as
typeof v === 'undefined' && v !== undefined.ExE-Boss commentedon Feb 21, 2020
One solution would be to add
util.types.isObject(target), which would perform:That would take care of that check, as C++ code doesn’t care whether an object is undetectable, since you can pass
document.allas thethisvalue to bothFunction.prototype.toString,Object.prototype.toStringandObject.prototype.valueOf.A polyfilled version is:
util: fix inspecting document.all
util: fix inspecting document.all
util: fix inspecting document.all
util: fix inspecting document.all