Skip to content

Latest commit

 

History

History
90 lines (60 loc) · 1.95 KB

getProp.rst

File metadata and controls

90 lines (60 loc) · 1.95 KB

dojo.getProp

Gets a property on an HTML element.

Introduction

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.

Usage

node

id or reference to the element to get the property on

name

the name of the property to get.

Examples

Dojo 1.7+ (AMD)

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:

Dojo < 1.7

See also

DOM operations:

  • dojo.prop <dojo/prop>
  • dojo.setProp <dojo/setProp>