Opened 5 years ago
Closed 3 years ago
#18244 closed defect (wontfix)
lang.js fix up the isAlien and _toArray
Reported by: | Owned by: | dylan | |
---|---|---|---|
Priority: | high | Milestone: | 1.13 |
Component: | Core | Version: | 1.10.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Hi sir, I have two question as following
(1) isAlien will return true if it is a built in function, but the source file of this method, why it has a !lang.isFunction(it)
?
isAlien: function(it){ return it && !lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean }
(2) IE9 and above browser can cover the HTMLCollection to Javascript object, In the source, it will call the slow function.
_toArray: has("ie") ? (function(){ function slow(obj, offset, startWith){ var arr = startWith||[]; for(var x = offset || 0; x < obj.length; x++){ arr.push(obj[x]); } return arr; } return function(obj){ return ((obj.item) ? slow : efficient).apply(this, arguments); //IE 9 and above, will call the slow function }; })() : efficient,
Change History (8)
comment:1 Changed 5 years ago by
Milestone: | tbd → 1.11 |
---|---|
Priority: | undecided → high |
comment:2 Changed 5 years ago by
comment:3 Changed 4 years ago by
Owner: | set to dylan |
---|---|
Status: | new → assigned |
comment:4 Changed 4 years ago by
Component: | General → Core |
---|---|
Description: | modified (diff) |
comment:5 Changed 4 years ago by
Description: | modified (diff) |
---|
As I wrote in the PR, ISTM that isAlien()
is obeying it's spec, which implies that it returns false for normal functions.
comment:6 Changed 4 years ago by
Milestone: | 1.11 → 1.12 |
---|
comment:7 Changed 3 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
comment:8 Changed 3 years ago by
Milestone: | 1.15 → 1.13 |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
Closing this as wontfix, but please reopen if there's a new patch that addresses feedback.
Pull request for isAlien issue: https://github.com/dojo/dojo/pull/123