Open GoogleCodeExporter opened 8 years ago
The specific javascript runtime errors, as thrown in Google Chrome, are as
follows:
[The HTML that caused this error was generated by a script.] Unmatched </link>
encountered. Ignoring tag.
www.google.com/uds/api/elements/1.0/23226509013e52ac5d30d65ae4af902d/keyboard.I.
js:47
Uncaught function (inline) {
return (inline !== false ? this : this.toArray())._reverse();
} is not a supported layout.
www.google.com/uds/api/elements/1.0/23226509013e52ac5d30d65ae4af902d/keyboard.I.
js:50
Uncaught TypeError: Object function (inline) {
return (inline !== false ? this : this.toArray())._reverse();
} has no method 'rc'
Original comment by statikef...@gmail.com
on 16 Sep 2009 at 1:19
To fix this problem, Google should, while iterating through an Array object,
perform
type-checking on the array value. If it is a function (i.e. the Prototype
.each()
method) ignore it and continue.
In this case it is picking up the each() method when expecting a KEYBOARD
LAYOUT element.
Original comment by statikef...@gmail.com
on 19 Sep 2009 at 3:05
Original comment by jscud.w...@gmail.com
on 22 Sep 2009 at 8:03
The issue seems to be $.l on line 50 of keyboard.l.js, where a normal for loop
should be used to iterate instead
of for..in. See also http://api.prototypejs.org/language/array.html and
http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harm
ful/, avoiding the use of
for..in in this manner should be done in general to avoid these kinds of
problems.
Original comment by rfbaum...@gmail.com
on 18 Nov 2009 at 9:45
Original issue reported on code.google.com by
statikef...@gmail.com
on 15 Sep 2009 at 8:50Attachments: