Closed gsedlacz closed 4 years ago
A template model can never be an HasElement as it is used pass properties to the client-side PolymerTemplate and thus will never have an element itself.
Also the model wouldn't actually execute the default method at any point as we create a proxy of the model and try to read the value specialValue that would never be synced from the client as it doesn't exist.
If you have non-standard properties you should just have the getter/setter on the PolymerTemplate component and not the model.
You are absolutely right. I have no idea why I assumed this would make sense in the first place.
Im sorry for waisting your time.
Description of the bug Stackoverflow during page load if a
TemplateModel
extendsHasElement
.Minimal reproducible example Define a
PolymerElement
(in my caseorg.demo.web.test.internal.TEST_SUB_COMPONENT
) whosTemplateModel
looks like this:If you remove
HasElement
and restart the server everything loads perfectly fine.Expected behavior no stackoverflow :)
Actual behavior
Usecase: Adding getter / setter for non-standard properties like
:value
.