#49: Object.freeze is IE9+

28 views
Skip to first unread message

tomByrer

unread,
Jan 8, 2014, 12:59:08 AM1/8/14
to js-drip-d...@googlegroups.com
Great article, & thanks for teaching me something I didn't know existed!
Seems `Object.freeze` will not work in IE8 or less, 8% or so of market share.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze#Browser_compatibility

BTW, a great opportunity was missed:
var artist = {
    name: "Vanilla Ice",
    hitSong: "Ice Ice Baby"
};
Object.freeze(artist);
(function() {
    "use strict";
    artist.hitSong = "Ninja Rap";  //stop, we won't listen!
})();

Joshua Clanton

unread,
Feb 22, 2014, 4:50:06 PM2/22/14
to js-drip-d...@googlegroups.com
Glad I could be of help. :-)

I try to mention notable browser compatibility issues, but this one slipped past me.

Thanks for reading!

Joshua
Reply all
Reply to author
Forward
0 new messages