Closed Bug 1321192 Opened 9 years ago Closed 9 years ago

typeof()=='object' being used too much in js

Categories

(Firefox :: Untriaged, defect)

50 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1318907

People

(Reporter: jmichae3, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0 Build ID: 20161123182536 Steps to reproduce: typeof(Array()) typeof(document.getElementById('tableid').getElementsByTagName("tr").childNodes) Actual results: 'object' 'object' Expected results: Array should really return a typeof() of 'array', not 'object', just like HTMLCollection should return 'htmlcollection' not 'object'. 'object is being used as a catch-all type when clearly-defined types exist. htmlcollection should be tossed in favor of the array methods anyway (how do you delete a row or column? certainly not with slice)
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.