Subj : Re: Convert non-READONLY property to READONLY property. To : J.P. From : Brendan Eich Date : Wed Jul 14 2004 08:00 pm J.P. wrote: > Brendan Eich wrote: >> You might rather use JS_SealObject. > > Thanks, Brendan. That helps. But following this, here's another > quesiton. Say, I sealed object obj1. Then I run script "obj2 = obj1; > obj2.a_property = blah;". It turns out that obj2 is sealed too. Any way > to make obj2 writable? BTW, I couldn't find the entry for JS_SealObject > in C API docs. Careful with passing JS_TRUE for the "deep" parameter to JS_SealObject. You can safely seal an object graph only if it is cut off from the rest of the object graph that you *don't* want to seal. The best way to do this is to use a special JSContext and global object, which you then throw away. /be .