iron-form icon indicating copy to clipboard operation
iron-form copied to clipboard

Lint accuses `databind-with-unknown-property` warning on iron-form

Open wikedo opened this issue 5 years ago • 1 comments

Description

Running polymer linter on iron-form (2.x) gives warnings on the internal submission form due to the databinds with undeclared properties (action, method, enctype). I assume it should also happen for 3.x since the implementation is basically the same.

Expected outcome

Polymer linter should not accuse any warnings or errors.

Actual outcome

Polymer linter accuses databind-with-unknown-property on the iron-form's internal form:

    <form id="helper" action$="[[action]]" method$="[[method]]" enctype$="[[enctype]]"></form>
                                 ~~~~~~

.../bower_components/iron-form/iron-form.html(100,34) warning [databind-with-unknown-property] - action is not declared or used more than once. Did you mean: _init


    <form id="helper" action$="[[action]]" method$="[[method]]" enctype$="[[enctype]]"></form>
                                                      ~~~~~~

.../bower_components/iron-form/iron-form.html(100,55) warning [databind-with-unknown-property] - method is not declared or used more than once. Did you mean: detached


    <form id="helper" action$="[[action]]" method$="[[method]]" enctype$="[[enctype]]"></form>
                                                                            ~~~~~~~

.../bower_components/iron-form/iron-form.html(100,77) warning [databind-with-unknown-property] - enctype is not declared or used more than once. Did you mean: title

Steps to reproduce

Run polymer linter on iron-form (2.x)

wikedo avatar Apr 03 '19 14:04 wikedo

A straightforward solution would be to just declare those properties, but after going through the code I was wondering if those binds and the properties are actually needed. The properties are not cited in the public API docs and even if someone decided to actually bind them on an iron-form instance, the values bound to the submission form would be overwritten on submission, since the attributtes are either copied from the slotted form, or set to a default value. Maybe I'm missing something though...

wikedo avatar Apr 03 '19 15:04 wikedo