#184 √ not_for_core
John-David Dalton

_attributeTranslations.read.values._getEv fix for IE

Reported by John-David Dalton | June 24th, 2008 @ 05:53 PM | in 1.6.0.3

This is an IE issue:

Garrett Smith pointed out that Element._attributeTranslations.read.values._getEv should not use toString.

This is not entirely possible but we can use Function.prototype.toString.

Also it should return a value only if wrapped in an anonymous function.

Example page: http://www.apple.com/itunes/

javascript:alert($(document.body).readAttribute('onload'))
// Will result in partial string representation of a serialized function. The string begins with ')'.

OR try

$('someDiv').onclick = function() { var foobar = 'somereallylongstringsoyoucanseehowmessedupthisis'; }
alert($('someDiv').readAttribute('onclick')); // will alert "= 'somereallylongstringsoyoucanseehowmessedupthisis';"

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

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

Tags