Closed
Bug 1183687
Opened 10 years ago
Closed 10 years ago
[gaia-switch] 'type' getter called on an object that does not implement interface HTMLInputElement.
Categories
(Firefox OS Graveyard :: Gaia::Components, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: yzen, Unassigned)
Details
Attachments
(1 file)
I'm experimenting with various types of automation testing available for a11y, to be possibly used for our gaia-components. One issue I found was related to the inheritance from the HTMLElements, in case of gaia-switch, from HTMLInputElement (it drives some of the tests).
It seems like there's an issue accessing its type getter, and it might be a bug.
HTMLInputElement.type runs without error but
HTMLInputElement.prototype.type throws:
'type' getter called on an object that does not implement interface HTMLInputElement. which is what happens if we call gaiaSwitchObject.type
If this is not a bug, feel free to close the bug.
| Reporter | ||
Comment 1•10 years ago
|
||
Wilson, have you seen the above issue with any of our components?
Also it looks like if we were to registerElement with extends instead of prototype it seems to work as expected.
Flags: needinfo?(wilsonpage)
Comment 2•10 years ago
|
||
register with option {extends: } was not work with gecko's custom element implementation.
gaia-component's `extends` attribute is actually the prototype.
Is HTMLInputElement.type is called inside of component?
| Reporter | ||
Comment 3•10 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #2)
> register with option {extends: } was not work with gecko's custom element
> implementation.
yeah
>
> gaia-component's `extends` attribute is actually the prototype.
>
>
> Is HTMLInputElement.type is called inside of component?
Not inside the component, but by the automated testing tools (e.g. external).
Comment 4•10 years ago
|
||
It seems like the simplest fix for this is to remove this line [1]. IIRC Fred added this. Fred is there any issue if we remove this?
[1] https://github.com/gaia-components/gaia-switch/blob/master/gaia-switch.js#L22
Flags: needinfo?(wilsonpage) → needinfo?(gasolin)
Comment 5•10 years ago
|
||
I added this for general accessibility concern (but it seems not work well :( ), its fine to remove this if it does not help the accessibility.
Flags: needinfo?(gasolin)
Comment 6•10 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #5)
> I added this for general accessibility concern (but it seems not work well
> :( ), its fine to remove this if it does not help the accessibility.
OK let's strip this for the time being if it fixes this? Yzen?
Flags: needinfo?(yzenevich)
| Reporter | ||
Comment 7•10 years ago
|
||
Yes in this case it should probably be removed, especially since we do not specify the type.
Flags: needinfo?(yzenevich)
| Reporter | ||
Comment 8•10 years ago
|
||
Attachment #8640726 -
Flags: review?(wilsonpage)
Comment 9•10 years ago
|
||
Comment on attachment 8640726 [details] [review]
Github pull request.
LANDED
Attachment #8640726 -
Flags: review?(wilsonpage) → review+
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•