Opened 7 years ago

Closed 3 years ago

#15608 closed enhancement (patchwelcome)

dojo/dom-style should have a consistent interface

Reported by: hector Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.13
Component: HTML Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

As for now, domStyle.get returns values as provided by the browser. For example, it will return the border color in rgb format for most of the browsers, but not for IE8.

I don't necessarily consider this a bug, but I think that the result returned by this method should be the same in all the browsers. Having a consistent interface is one of the main points of using a framework.

It would be nice (or even necessary) to convert the values that differ across browsers and strictly define the output value that is expected.

While this gets implemented (if you decide it's a good idea to do so) you should update your documentation to make the developers aware that the values returned by domStyle.get may defer depending on the browser.

In addition, the tests for domStyle don't perform really useful assertions, this should be improved as well.

Attachments (1)

domstyle_test.html (1.2 KB) - added by hector 7 years ago.
Try this on IE8 and other browsers

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by hector

Attachment: domstyle_test.html added

Try this on IE8 and other browsers

comment:1 Changed 7 years ago by bill

Component: GeneralHTML
Owner: set to Eugene Lazutkin

comment:2 Changed 6 years ago by dylan

Milestone: tbd2.0

comment:3 Changed 3 years ago by dylan

Milestone: 2.01.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.