> Le 20 févr. 2015 à 02:11, Kyle Simpson <[email protected]> a écrit : > > Just curious… for RegExp, Date, String and the others that *are* changing to > plain objects… does that mean `Object.prototype.toString.call( .. )` will > return "[object Object]" on them? > > Sorry, I've kinda gotten lost on what the default @@toStringTag behavior is > going to be here.
The definitive algorithm is here: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring For pre-ES6 builtin constructors and prototypes, there is no pre-installed @@toStringTag property, but there are checks for internal structure determining a legacy builtin tag. For example, since `RegExp.prototype` is a plain vanilla object, its builtin tag is "Object". —Claude _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

