Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object.seal() behavior is not correct #676

Closed
RuralHunter opened this issue May 20, 2020 · 0 comments · Fixed by #677
Closed

Object.seal() behavior is not correct #676

RuralHunter opened this issue May 20, 2020 · 0 comments · Fixed by #677

Comments

@RuralHunter
Copy link

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 rhino with 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'; 
        Object.seal(r); 
        r.a='aafter'; 
}; 
fun();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant