liferay - AlloyUI - difference between node.attr("id") and node.getAttribute("id") -


in aui, difference between

node.attr("id") 

and

node.getattribute("id") 

where node object of type node.

the documentation on getattribute says "allows getting attributes on dom nodes, normalizing in cases." don't understand normalizing means, , in case applied.

thanks, alain

node.attr both getter , setter.

if pass second argument attr, set value of attribute (the first argument).

node.getattribute getter.

node.getattribute normalizes value ie , ie < 8. without falling in many details, means may pass w3c standard attribute , work on browsers.

hope helps!


Comments

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

python - Finding intersection between ellipse and a line -

c++ - NetBeans Remote Development with additional configuration -