Opened 11 years ago

Closed 11 years ago

#7602 closed defect (wontfix)

Dojo not working with prototype.js

Reported by: laurea Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.2beta
Keywords: prototype.js incompatibility Cc: dante
Blocked By: Blocking:

Description

See "http://www.dojotoolkit.org/forum/dojo-core-dojo-0-9/dojo-core-support/dojo-not-working-prototype-js-liferay-portal-uses-prototy#comment-18254"

We found an incompatibility between DOJO (1.1 and 1.2.0b) and prototype.js (1.4, 1.5. 1.6).

Attached example:

Attachments (1)

example.zip (11.4 KB) - added by laurea 11 years ago.
You must add DOJO version in directory example.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by laurea

Attachment: example.zip added

You must add DOJO version in directory example.

comment:1 Changed 11 years ago by Adam Peller

Cc: dante added
Milestone: tbd
Resolution: wontfix
Status: newclosed

In prototype 1.4, there is an override to shift() (why do they do things like that?) which chooses to throw an exception on an empty array. That's not what browsers do, and it's not in the ECMAScript spec.

[].shift() // throws an exception after loading prototype

I would consider this a prototype bug, and apparently they fixed it. I can only reproduce this with the prototype 1.4, as attached. Array.shift() is not documented at prototypejs.org. With prototype 1.6, this problem goes away. I don't think we should alter our code to support an old version of prototype.

Note: See TracTickets for help on using tickets.