You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[set-unknown-attribute] - data-* attributes must be accessed as attributes.
i.e. you must write: data-for-export$="{{dataForExport}}"
As of now, Polymer 1.x accepts such properties, though. They don't get reflected into attributes, neither are they being put into dataset.
Would it be disallowed by 2.0 release? Should we avoid such names?
If so, having this documented would be nice.
If not, I'd expect not to see those errors at all.
The text was updated successfully, but these errors were encountered:
So, this is in that category of legal but suspicious code, as the user may be trying to interact with dataset, and would be surprised when that doesn't happen.
Most lint warnings do have some false negatives, as there's a lot of wrong code that won't throw.
OTOH, it may be more common to have dataFoo properties than to intentionally use the dataset field. I'm not sure that it actually sees much real world use?
Hm, oh! If there's a known property like dataForExport that you're setting, then we should not warn. Only if it's an unknown property and it starts with data- should we give the special warning about data-* attributes.
An example of such a false positive is vaadin-grid which has a dataProvider property. I almost incorrected this when it was flagged up by the linter :/
...but, yeah, so old now surely no one is going to bother fixing it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I get this error in several cases:
As of now, Polymer 1.x accepts such properties, though. They don't get reflected into attributes, neither are they being put into
dataset
.Would it be disallowed by 2.0 release? Should we avoid such names?
If so, having this documented would be nice.
If not, I'd expect not to see those errors at all.
The text was updated successfully, but these errors were encountered: