Re: Array property of custom object

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On 5/2/16 2:10 PM, Mihai Dobrescu wrote:
> For "info", I need some Array wrapper for objects of type jsChar (it is not a string). jsChar will have some private data of type char.

Sounds like you want to implement a proxy (in the js::Proxy sense) that 
will do whatever it is you want.  It won't be an Array from the point of 
view of JS consumers, but then again you don't want actual Array 
behavior either (e.g. you don't want people doing push() on your thing), 
right?

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.