Closed loicgasser closed 4 years ago
Usually, we pass the type of the input via [attr.type], currently the code doesn't account for that.
[attr.type]
In the tests when you do:
inputElement.type = 'url';
it changes the attribute of the HTML element and therefore this._type was always set to text.
this._type
text
With this pull request I suggest to use directly the value stored in the HTML element.
I added a test that would fail before this pull request.
Usually, we pass the type of the input via
[attr.type]
, currently the code doesn't account for that.In the tests when you do:
it changes the attribute of the HTML element and therefore
this._type
was always set totext
.With this pull request I suggest to use directly the value stored in the HTML element.
I added a test that would fail before this pull request.