I have some global object CD and it has set of properties as follows:
window.cd = {
config:{
title:"..."
}
a:func...,
b:56,
c:..
}
I want user to allow add properties to cd and cd.config but properties cd.a, cd.b, cd.config.title
to be sealed (no modification allowed) .
User should not be able to delete window.cd or these properties as well (Other properties he can delete or modify).
I tried with following:
window.cd.a.seal();
window.cd.b.seal();
window.cd.config.title.seal();
but it thrown following error:
window.cd.config.title.seal is not a function