PolymerElements / iron-list

Element for a virtual, "infinite" list
https://www.webcomponents.org/element/PolymerElements/iron-list
217 stars 131 forks source link

iron-list gives error when the objects have a field named "children" in them. #351

Open satyanath opened 7 years ago

satyanath commented 7 years ago

Description

iron-list element gives an error when the list of objects passed to it has the field "children" in the objects. It gives an "Illegal Invocation" exception.

I use google chrome browser on windowws 10 - version - 54.0.2840.87 m

Expected outcome

The exception should not occur and the page should display

Hawkins Parrish Dena Sweeney Saundra Mcbride

Actual outcome

Exception is raised. polymer.html:2053 Uncaught TypeError: Illegal invocation(…) in the debug console.

Live Demo

html file

<!DOCTYPE html>

Iron list test

data2.json file

[ { "posttext": "Hawkins Parrish", "havechildren": "true", "children": "dddd" }, { "posttext": "Dena Sweeney", "havechildren": "true", "children": "dddd" }, { "posttext": "Saundra Mcbride", "havechildren": "true", "children": "dddd" } ]

Steps to reproduce

Browsers Affected

Not checked on others PolymerTest.zip

blasten commented 7 years ago

Yep, I have seen this issue in the past. This is because it's overriding Node.children. Unfortunately, this is a limitation of v1, probably solved in v2.

satyanath commented 7 years ago

OK then.

Regards,

S.Satyanath

On 23-12-2016 00:55, Emmanuel Garcia wrote:

Yep, I have seen this issue in the past. This is because it's overriding |Node.children|. Unfortunately, this is a limitation of v1, probably solved in v2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PolymerElements/iron-list/issues/351#issuecomment-268871919, or mute the thread https://github.com/notifications/unsubscribe-auth/AFQiA_FJ0k9NQMHu3BCEZFP9mNpCMzKXks5rKs6ugaJpZM4Kvb0X.