-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
Question.
An element should always have a parent that it is referenced to (according to our previous discussion).
How about an element that could possibly have multiple parents ?
What would happen when you stringify this ?
For instance
var hasMultParents = { "hello": "world" };
var b = {};
var c = {};
b.a = hasMultParents;
c.a = hasMultParents;
var d = [ c,b ];
console.log( JSON.stringify( d ) );
This will output
[{"a":{"hello":"world"}},{"a":{"hello":"world"}}]
Which essentially copies the element.
This could be an issue someday.