[quickjs-devel] Re: questions on custom class

  • From: Ondřej Jirman <deibeemoocheuguhumoh@xxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Tue, 11 Feb 2020 16:51:07 +0100

On Tue, Feb 11, 2020 at 08:51:43PM +0530, JM wrote:

I managed to create a custom class for quick. However, I need some help:

1) how to prevent javascript from creating custom properties on my class

say,
myclassinstance.xys = "some value";

Can I prevent this?

Lookup Object.seal()

        o,

2) if not possible, how to free these properties when the class instance
finalizes.

thanks

Other related posts: