Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14191 closed defect (wontfix)

dojo.style() causes error for DOM node types that do not have a style property

Reported by: Alexander Kläser Owned by: Eugene Lazutkin
Priority: high Milestone: tbd
Component: HTML Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

We came across an error with dojo.style() that was called by dojox.widget.Standby on IE8 with a document fragement node (nodeType == 11) as node parameter. As this node type does not have style property, dojo.style() would raise an error. Attached a patch that fixes this problem.

Attachments (1)

fix_dojo_style.patch (627 bytes) - added by Alexander Kläser 7 years ago.
patch

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Alexander Kläser

Attachment: fix_dojo_style.patch added

patch

comment:1 Changed 7 years ago by bill

Component: CoreHTML
Owner: set to Eugene Lazutkin

Sounds like a misuse of the dojo.style() API rather than a bug.

comment:2 Changed 7 years ago by Eugene Lazutkin

Resolution: wontfix
Status: newclosed

It fails correctly raising an exception in this case so a programmer can debug, and find a cause. The patch silently hides the problem.

One of Dojo philosophies is "to fail early", which is the case here.

comment:3 Changed 7 years ago by Alexander Kläser

Thanks for your answer. Yes, "fail early" is certainly a good thing to do. After thinking it over, it could be a problem with the Standby-Widget. I will have a look again.

Note: See TracTickets for help on using tickets.