Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#8697 closed defect (fixed)

prototype and dojo conflict in dojo.query

Reported by: ttilley Owned by: alex
Priority: high Milestone: 1.3
Component: Query Version: 1.3.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by alex)

Being the not-even-close-to-good-citizen prototype is, it extends document with getElementsByClassName, which dojo.query tests for to see if it can use a fast path. Of course, this fails horribly when using IE7 with prototype and dojo in the same page.

The following check does the right thing, even with prototype extending document:

(document.getElementsByClassName && /\{\s*\[native code\]\s*\}/.test(String(document.getElementsByClassName)))

Attachments (1)

dojo-prototype-query-workaround.diff (580 bytes) - added by ttilley 11 years ago.
dojo.query workaround for using dojo with prototype

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by ttilley

dojo.query workaround for using dojo with prototype

comment:1 Changed 11 years ago by ttilley

slightlyoff wanted this assigned to him:

slightlyoff: want to make sure we can add a regex test and that it'll be fast enough slightlyoff: ok, they get cached slightlyoff: +1 slightlyoff: Aphelion: post a bug report and a patch? slightlyoff: ('cause I can't check this fix in w/o a bug anyway)

comment:2 Changed 11 years ago by Eugene Lazutkin

Milestone: 1.3tbd
Owner: changed from anonymous to alex
severity: criticalnormal

comment:3 Changed 11 years ago by alex

Priority: normalhigh
severity: normalmajor
Status: newassigned

comment:4 Changed 11 years ago by alex

Description: modified (diff)

comment:5 Changed 11 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [16936]) fixes Prototype's bug for document.getElementsByClassName(), opens up our margin on byId-rooted tests on QSA, updates the case-sensitivity bug tests, and brings the docs into alignment w/ the code. Fixes #8697. !strict

comment:6 Changed 11 years ago by Adam Peller

Milestone: tbd1.3

batch move of tickets marked 'tbd' fixed in the 1.3 timeframe

comment:7 Changed 10 years ago by bill

Component: CoreQuery
Note: See TracTickets for help on using tickets.