Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#1795 closed defect (fixed)

Deprecation of dojo.style doesn't actually work

Reported by: [email protected] Owned by: alex
Priority: high Milestone:
Component: Style Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.style was deprecated moving from 0.3.1 to 0.4, with the replacement for dojo.style.X() being dojo.html.X(). When you dojo.require() dojo.style in 0.4 the deprecation warning appears but dojo.style.X() functions fail to work.

quick patch (CCLA: One Track Mind Ltd.):

Index: src/style.js
===================================================================
--- src/style.js        (revision 6334)
+++ src/style.js        (working copy)
@@ -3,3 +3,4 @@
        browser: ["dojo.html.style"]
 });
 dojo.deprecated("dojo.style", "replaced by dojo.html.style", "0.5");
+dojo.style = dojo.html;

Change History (6)

comment:1 Changed 14 years ago by bill

Owner: changed from anonymous to Bryan Forbes

comment:2 Changed 14 years ago by alex

Owner: changed from Bryan Forbes to alex
Status: newassigned

not sure why we haven't knocked this down yet...it's pretty brutal.

comment:3 Changed 14 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [6493]) fixes #1795

comment:4 Changed 14 years ago by [email protected]

Resolution: fixed
Status: closedreopened

While the deprecation warning says "use dojo.html.style" and that is the correct package to load, the style functions are actually methods of dojo.html, not dojo.html.style (which is an empty object).

So i think the fix should be something like:

dojo.lang.mixin(dojo.style, dojo.html); 

Maybe the deprecation message should change too?

comment:5 Changed 14 years ago by alex

Resolution: fixed
Status: reopenedclosed

(In [6537]) fixes #1795

Thanks to Robert Coup for spotting the bogus fix that was committed earlier

comment:6 Changed 13 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.