Gets a property on an HTML element.
Handles normalized getting of properties on DOM nodes.
Since Dojo 1.7, dojo.getProp
is exposed via the get
method of the dojo/dom-prop
module. An alias is kept in dojo/_base/html
for backward-compatibility.
- node
id or reference to the element to get the property on
- name
the name of the property to get.
When using AMD format in a fully baseless application, get
is accessed from the dojo/dom-prop
module.
Alternatively, you can load dojo base in AMD style and continue using dojo.getProp
in the define
or require
callback:
DOM operations:
dojo.prop <dojo/prop>
dojo.setProp <dojo/setProp>