Question regarding ES5

Irakli Gozalishvili rfobic at gmail.com
Wed Feb 16 17:09:43 PST 2011


Hi,

I've run into one issue and even after reading ES5 specs several times it's
not clear to me what should be an expected behavior:

Currently on Firefox nightly following code:

(function() {
"use strict";

function Type() {}
Object.freeze(Type.prototype);
var object = Object.create(Type.prototype);
object.constructor = function Foo() {};

return object
})();

throws TypeError: object.constructor is read-only
while on chrome

it returns object with constructor Foo

I would like to know what is an expected behavior to fill a bug to an
appropriate project.


Thanks!
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/
Address: 29 Rue Saint-Georges, 75009 Paris, France <http://goo.gl/maps/3CHu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110217/1940bb94/attachment.html>


More information about the es-discuss mailing list