Re: Rw-asking: a weaklist that doesn't work and an object with elements that can't be copied or queried

Dave Royal<[email protected]> Mon, 22 Feb 2021 08:33:54 -0600
Newsgroups gmane.comp.mozilla.general
Message-ID <[email protected]>
R.Wieser <[email protected]> wrote:
> Hello all,
> 
> Over two weeks ago I posted a question with the subject "JS log-dumping an 
> object and circular references problem".   Although I've been able to create 
> something that seems to work, two questions remain :
> 
> A "weaklist" that could solve the "circular references" problem does not 
> want to have objects added to it.
> Reference : seen.add(value))
> 
> Trying to copy one of the objects elements into a variable fails.  Directly 
> trying to inspect the element fails to
> Reference : var value = arr[item]
> Also : typeof(arr[item])
> 
> I would appriciate it if someone could explain the failure of either of the 
> above to me.
> 
Is 'seen' actually a WeakSet? 
Does the 'weak' make any difference?
How is 'seen' declared, and where (scope)?
Is the extra ) in the .add statement a typo in the post?
Perhaps 'arr' is empty?

Without seeing the code this is just guesswork.
I suggest you share the code.
-- 
(Remove numerics from email address)