Opened 13 years ago

Closed 13 years ago

#7305 closed defect (fixed)

dojo.attr() doesn't handle style or innerHTML values well

Reported by: alex Owned by: alex
Priority: high Milestone: 1.2
Component: Core Version: 1.1.1
Keywords: attr, dom Cc:
Blocked By: Blocking:


Passing styles into dojo.attr() should be easier. e.g.:

dojo.attr("nodeId", {
  tabIndex: "-1",
  style: {
    opacity: 0.5,
    border: "5px dotted blue"

Doesn't currently work as you'd expect. Obviously, style is a special case here, but one which we should handle.

Likewise, specifying content is too hard. This should be possible:

dojo.attr("nodeId", {
  tabIndex: "-1",
  innerHTML: "howdy!"

Change History (1)

comment:1 Changed 13 years ago by alex

Resolution: fixed
Status: newclosed

(In [14608]) update dojo.attr() to handle the case of innerHTML and style: {...} being passed in as values. Fixes #7305. !strict

Note: See TracTickets for help on using tickets.