Opened 14 years ago

Closed 13 years ago

#94 closed defect (wontfix)

Remove dojo.widget._cssFiles in favor of using feature built into insertCssFile

Reported by: sjmiles@… Owned by: alex
Priority: high Milestone: 0.9
Component: Widgets Version: 0.1
Keywords: Cc:
Blocked By: Blocking:

Description

Seems like the dojo.widget._cssFiles registry and it's usage here

line 42, DomWidget?.js: if((cpath)&&(!dojo.widget._cssFiles[cpath])){

dojo.xml.htmlUtil.insertCssFile(cpath); dojo.widget._cssFiles[cpath] = true;

}

is something that would be good in the API somewhere.

Fwiw, I'm already using the array in my code.

Change History (8)

comment:1 Changed 14 years ago by sjmiles@…

As I should have included, I use it like so:

turbo.loadCss = function(inPath) {

if ((inPath)&&(!dojo.widget._cssFiles[inPath])) {

dojo.xml.htmlUtil.insertCssFile(inPath); dojo.webui._cssFiles[inPath] = true;

}

}

comment:2 Changed 14 years ago by schontz@…

For what it's work, insertCssFile already allows you to avoid duplicates. The widget code should be updated to take advantage of this.

dojo.xml.htmlUtil.insertCssFile(cssFile, null, true); // checks for dups

comment:3 Changed 14 years ago by schontz@…

Component: GeneralWidgets
severity: enhancementminor
Summary: Can dojo.widget._cssFiles registry become an API?Remove dojo.widget._cssFiles in favor of using feature built into insertCssFile

comment:4 Changed 14 years ago by anonymous

Fwiw, I tried using the 'checkDuplicates' feature of insertCssFile and I ended up with multiple copies of some of my CSS files and no copies of others.

The registry solution seems much simpler as less prone to browser-issues, but maybe I'm channeling Cassandra.

comment:5 Changed 14 years ago by sjmiles@…

checkDuplicates is failing because of problem comparing URI objects with ==. See #97:http://dojotoolkit.org/trac/ticket/97.

comment:6 Changed 13 years ago by dylan

Milestone: 0.5

comment:7 Changed 13 years ago by dylan

Owner: changed from Alex to alex

comment:8 Changed 13 years ago by bill

Resolution: wontfix
Status: newclosed

_cssFiles is gone altogether in dijit.

Note: See TracTickets for help on using tickets.