Status: New
Owner: ----

New issue 308 by mkterra: Javascript 1.6 Array generics don't work?
http://code.google.com/p/v8/issues/detail?id=308

I ran into this issue while trying out someone's userscript in Chrome
2.0.169.1 (the 2.0 Beta).

According to the last two examples on this page:
https://developer.mozilla.org/en/DOM/document.getElementsByClassName

As of Javascript 1.6 it's possible to do something like the following, to
find all div elements that have a class of 'test':

  Array.filter( document.getElementsByClassName('test'), function(elem){
    return elem.nodeName == 'DIV';
  });

In Chrome, however, the Error Console says:
Uncaught TypeError: Object function Array() { [native code] } has no method
'filter'

Not sure if this only happens with Array.filter, or all of the Array extras.

More info here:
https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Arrays#Working_with_Array-like_objects

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to