#765 ✓resolved
Jason Purdy

Follow ES 5 spec for native object extensions

Reported by Jason Purdy | August 10th, 2009 @ 08:39 PM | in 1.7.0.1

I'm trying to use YUI Test v3 on some pre-existing Prototype code and whenever I create the Console object and render it, it causes an error back in Prototype:

Error: this.each is not a function
Source File: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
Line: 631

I opened a ticket w/ Yahoo:
http://yuilibrary.com/projects/yui3/ticket/2528161

This error doesn't appear in the Google Chrome browser for Ubuntu (v 3.0.197.11).

Yahoo developers report:

Y.Array.some(arr, fn) in this case is being called with arr === an HTMLCollection. This works in a native environment, but is failing because Prototype's implementation of some relies on its 'this' object also having an 'each' method, which doesn't allow for leveraging Apply invocation as is done by YUI.

I'm attaching a simple test html file...

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Attachments

Referenced by

Pages