Skip to content

Parenting elements #48

@NPellet

Description

@NPellet

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions