clientside/amplesdk — Issue #119: @ operator in XUL-manipulating javascript
Author: h6w
Created: 2011-12-31 05:03:17+00:00
State: open

I came across this snippet of code in XULGear:

[code]treeitem.treerow.treecell[0].@label = "[#text]";[/code]

According to wikipedia "In certain JavaScript implementations, the at sign (@) can be used in an identifier, this is contrary to the specifications and not supported in newer implementations."

I believe that, in this case, it is actually shorthand for:

[code]treeitem.treerow.treecell[0].setAttribute('label',"[#text]");[/code]

Is there any way we can support such shorthand?