1
votes

in Polymer 0.5 it was possible to set an element on an element via something like scrollTarget="{{$.scroller}}"

Is this possible with 1.0? There is a element-property (positionTarget) for example in iron-dropdown. But I do not find an example for that..

Kind regards!

2
Are you asking how to add a property to your own custom element? If so look here for how to do that. - Ben Thomas
No, thanks, thats clear. I want to have an Element as property in my Element. Like in iron-dropdown. But i can't find a way to set it from outside.. - Torben

2 Answers

2
votes

You could do it imperatively:

this.$.myDropdown.positionTarget = this.$.targetElement;

or you could do it partially declaratively:

positionTarget="[[getElement('targetElement')]]"

where getElement is defined as:

getElement: function(element) {
  return this.$[element];
}
0
votes

As far as I know, this is no longer possible. If you look at the migration guide, it describes that binding to sibling properties is not supported anymore. While you are not trying to bind a property, but to the element itself, you require the same syntax with the $ sign, which appears to have been removed.