_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
-
-
John-David Dalton June 24th, 2008 @ 05:54 PM
- → State changed from new to bug
-
John-David Dalton June 27th, 2008 @ 03:10 PM
- → Title changed from _attributeTranslations.read.values._getEv use Function.prototype.toString to _attributeTranslations.read.values._getEv fix for IE
- → Tag changed from patched to needs_failing_test_case needs_tests patched
-
John-David Dalton July 12th, 2008 @ 06:34 AM
- → Tag changed from needs_failing_test_case needs_tests patched to needs_tests patched
Added a patch that doesn't use Function.prototype.toString (for Caja support)
-
-
John-David Dalton August 7th, 2008 @ 07:36 PM
- → State changed from bug to not_for_core
- → Tag changed from needs_tests patched to patched
We are going to abandon support for this in 1.6.1 so no need to patch it.
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.
