Opened 15 years ago
Closed 14 years ago
#94 closed defect (wontfix)
Remove dojo.widget._cssFiles in favor of using feature built into insertCssFile
Reported by: | 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 15 years ago by
comment:2 Changed 15 years ago by
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 15 years ago by
Component: | General → Widgets |
---|---|
severity: | enhancement → minor |
Summary: | Can dojo.widget._cssFiles registry become an API? → Remove dojo.widget._cssFiles in favor of using feature built into insertCssFile |
comment:4 Changed 15 years ago by
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 15 years ago by
checkDuplicates is failing because of problem comparing URI objects with ==. See #97:http://dojotoolkit.org/trac/ticket/97.
comment:6 Changed 15 years ago by
Milestone: | → 0.5 |
---|
comment:7 Changed 14 years ago by
Owner: | changed from Alex to alex |
---|
comment:8 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
_cssFiles is gone altogether in dijit.
As I should have included, I use it like so:
turbo.loadCss = function(inPath) {
}