0

The language Google Desktop gadgets use resembles JavaScript, but it's different in subtle ways. For example, I saw this line in a gadget:

options(HISTORY_OPTIONS_NAME) = items_.join("|");

which looks like it's assigning to a function call. That's just not OK in JavaScript... what language is this? And what exactly is that line doing?

Claudiu
  • 224,032
  • 165
  • 485
  • 680

1 Answers1

1

As far as I know, the gadgets use JavaScript. Where did you get this line from? Are you sure it's not

options[HISTORY_OPTIONS_NAME] = items_.join("|");

(note brackets)

Matti Virkkunen
  • 63,558
  • 9
  • 127
  • 159
  • A quick googling reveals that he probably saw it here[1], but that does indeed confirm that it is Javascript. [1]: http://code.google.com/p/google-wikipedia/source/browse/trunk/wikipedia_history.js?spec=svn3&r=3#77 – Daniel DiPaolo Apr 10 '10 at 19:56
  • That file does indeed have the mysterious line in it though, and it's definitely illegal in JavaScript. Is that file just broken? – Matti Virkkunen Apr 10 '10 at 20:00
  • @Daniel: yea thats just the code i looked at. i think it works.. i put an alert in after that line, and it gets called and nothing complains. – Claudiu Apr 10 '10 at 20:27