-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
This should be a rhino problem.
According to the specification, the values of present properties of a sealed object can be changed as long as they are writable. The code below runs correctly in real browsers but fails in htmlunit with net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot add properties to this object because extensible is false.
fun=function()
{
"use strict";
var r = {};
Object.defineProperties(r, {
a: {
writable: true,
value: 'aaa'
}
});
r.a='abefore';
alert('r.a before='+r.a);
Object.seal(r);
r.a='aafter';
alert('r.a after='+r.a);
};
fun();Metadata
Metadata
Assignees
Labels
No labels