Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parenting elements #48

Open
NPellet opened this issue Jan 22, 2014 · 0 comments
Open

Parenting elements #48

NPellet opened this issue Jan 22, 2014 · 0 comments
Assignees
Labels

Comments

@NPellet
Copy link
Owner

NPellet commented Jan 22, 2014

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.

@ghost ghost assigned lpatiny Jan 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants