Opened 11 years ago

Closed 7 years ago

#9342 closed defect (invalid)

dojo1.3: dojo.attr() did not work for attribute "src" in IE8.

Reported by: william829 Owned by: Eugene Lazutkin
Priority: high Milestone: future
Component: HTML Version: 1.3.0
Keywords: attr IE8 Cc:
Blocked By: Blocking:

Description

Here is a sample:

HTML code: <img id="img01" src=""></img>
JS code: var imgNode = dojo.byId("img01"); dojo.attr(imgNode, "src", "../image/icon01.jpg");

It did not work in IE8. I looked into dojo source code, it seems dojo.attr() used node.setAttribute(name, value) to implement its function, but node.setAttribute("src", value) not work in IE8. The methods listed below works:

node.src = value or node[ "src" ] = value

Change History (3)

comment:1 Changed 10 years ago by dante

Owner: changed from anonymous to Eugene Lazutkin

looks like this needs added to the attr map for one-offs?

comment:2 Changed 10 years ago by Eugene Lazutkin

Component: GeneralHTML
Milestone: tbdfuture

comment:3 Changed 7 years ago by Colin Snover

Resolution: invalid
Status: newclosed

Please set the property instead of using the function for setting attributes.

Note: See TracTickets for help on using tickets.